tModLoader v2024.03
A mod to make and play Terraria mods
TravellingMerchantShop Class Reference

Inherits AbstractNPCShop.

Public Member Functions

 TravellingMerchantShop (int npcType)
 
TravellingMerchantShop AddInfoEntry (int item, params Condition[] conditions)
 
TravellingMerchantShop AddInfoEntry (Item item, params Condition[] conditions)
 
override void FillShop (ICollection< Item > items, NPC npc)
 Unbounded variant of FillShop(Item[], NPC, out bool), for future forwards compatibility with tabbed or scrolling shops. More...
 
override void FillShop (Item[] items, NPC npc, out bool overflow)
 Fills a shop array with the contents of this shop, evaluating conditions and running callbacks. More...
 
- Public Member Functions inherited from AbstractNPCShop
 AbstractNPCShop (int npcType, string name="Shop")
 
abstract void FillShop (ICollection< Item > items, NPC npc)
 Unbounded variant of FillShop(Item[], NPC, out bool), for future forwards compatibility with tabbed or scrolling shops. More...
 
abstract void FillShop (Item[] items, NPC npc, out bool overflow)
 Fills a shop array with the contents of this shop, evaluating conditions and running callbacks. More...
 
virtual void FinishSetup ()
 
void Register ()
 

Properties

new record Entry(Item Item, IEnumerable< Condition > Conditions) override IEnumerable< AbstractNPCShop.EntryActiveEntries [get]
 
- Properties inherited from AbstractNPCShop
abstract IEnumerable< EntryActiveEntries [get]
 
string FullName [get]
 
string Name [get]
 
int NpcType [get]
 

Member Function Documentation

◆ FillShop() [1/2]

override void TravellingMerchantShop.FillShop ( ICollection< Item items,
NPC  npc 
)
virtual

Unbounded variant of FillShop(Item[], NPC, out bool), for future forwards compatibility with tabbed or scrolling shops.

Parameters
itemsThe collection to be filled
npcThe NPC the player is talking to

Implements AbstractNPCShop.

◆ FillShop() [2/2]

override void TravellingMerchantShop.FillShop ( Item[]  items,
NPC  npc,
out bool  overflow 
)
virtual

Fills a shop array with the contents of this shop, evaluating conditions and running callbacks.

Parameters
itemsArray to be filled.
npcThe NPC the player is talking to
overflowTrue if some items were unable to fit in the provided array

Implements AbstractNPCShop.