![]() |
tModLoader v2023.10
A mod to make and play Terraria mods
|
Inherits AbstractNPCShop.
Classes | |
class | Entry |
Public Member Functions | |
NPCShop (int npcType, string name="Shop") | |
NPCShop | Add (int item, params Condition[] condition) |
NPCShop | Add (Item item, params Condition[] condition) |
NPCShop | Add (params Entry[] entries) |
NPCShop | Add< T > (params Condition[] condition) |
NPCShop | AllowFillingLastSlot () |
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. Does not fill the entire array if there are insufficient entries. The last slot will be kept empty (null) if FillLastSlot is false More... | |
override void | FinishSetup () |
Entry | GetEntry (int item) |
NPCShop | InsertAfter (Entry targetEntry, Item item, params Condition[] condition) |
NPCShop | InsertAfter (int targetItem, int item, params Condition[] condition) |
NPCShop | InsertAfter (int targetItem, Item item, params Condition[] condition) |
NPCShop | InsertBefore (Entry targetEntry, Item item, params Condition[] condition) |
NPCShop | InsertBefore (int targetItem, int item, params Condition[] condition) |
NPCShop | InsertBefore (int targetItem, Item item, params Condition[] condition) |
bool | TryGetEntry (int item, out Entry entry) |
![]() | |
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 | |
override IEnumerable< Entry > | ActiveEntries [get] |
IReadOnlyList< Entry > | Entries [get] |
bool | FillLastSlot [get] |
![]() | |
abstract IEnumerable< Entry > | ActiveEntries [get] |
string | FullName [get] |
string | Name [get] |
int | NpcType [get] |
NPCShop NPCShop.Add< T > | ( | params Condition[] | condition | ) |
T | : | ModItem | |
T | : | Add | |
T | : | ModContent.ItemType<T>() | |
T | : | condition |
Unbounded variant of FillShop(Item[], NPC, out bool), for future forwards compatibility with tabbed or scrolling shops.
items | The collection to be filled |
npc | The NPC the player is talking to |
Implements AbstractNPCShop.
Fills a shop array with the contents of this shop, evaluating conditions and running callbacks.
Does not fill the entire array if there are insufficient entries.
The last slot will be kept empty (null) if FillLastSlot is false
items | Array to be filled. |
npc | The NPC the player is talking to, for Entry.OnShopOpen(Item, NPC) calls. |
overflow | True if some items were unable to fit in the provided array. |
Implements AbstractNPCShop.
|
virtual |
Reimplemented from AbstractNPCShop.