tModLoader v2024.10
A mod to make and play Terraria mods
NPCShop.Entry Class Reference

Inherits AbstractNPCShop.Entry.

Public Member Functions

 Entry (int item, params Condition[] condition)
 
 Entry (Item item, params Condition[] condition)
 
Entry AddCondition (Condition condition)
 
Entry AddShopOpenedCallback (Action< Item, NPC > callback)
 
bool ConditionsMet ()
 
Entry Disable ()
 
void OnShopOpen (Item item, NPC npc)
 
Entry OrderLast ()
 
Entry ReserveSlot ()
 Reserves a slot for this entry even if its conditions are not met (ConditionsMet). This can be used to create a defined shop layout similar to the Tavernkeep shop. More...
 
Entry SortAfter (Entry target)
 
Entry SortBefore (Entry target)
 

Properties

IEnumerable< Condition > Conditions [get]
 
bool Disabled [get]
 
Item Item [get]
 
bool OrdersLast [get]
 
bool SlotReserved [get]
 
- Properties inherited from AbstractNPCShop.Entry
IEnumerable< Condition > Conditions [get]
 
Item Item [get]
 

Member Function Documentation

◆ ReserveSlot()

Entry NPCShop.Entry.ReserveSlot ( )

Reserves a slot for this entry even if its conditions are not met (ConditionsMet). This can be used to create a defined shop layout similar to the Tavernkeep shop.

Returns

Property Documentation

◆ Conditions

IEnumerable<Condition> NPCShop.Entry.Conditions
get

Implements AbstractNPCShop.Entry.

◆ Item

Item NPCShop.Entry.Item
get

Implements AbstractNPCShop.Entry.