TModLoader v1.4.4.9
TModLoader source code documentation
Loading...
Searching...
No Matches

◆ ForceConsumption

? bool [] Terraria.ID.ItemID.Sets.ForceConsumption
static
Initial value:
= Factory.CreateCustomSet<bool?>(null, new object[12]
{
(short)2350,
false,
(short)4870,
false,
(short)2351,
false,
(short)2756,
false,
(short)4343,
true,
(short)4344,
true
})
static SetFactory Factory
Used for creating sets indexed by item type (F:Terraria.Item.type).
Definition ItemID.cs:84

If true for a given item type (F:Terraria.Item.type), then that item will always be consumed on use if F:Terraria.Item.consumable is true.
If false for a given item type, then that item will never be consumed on use if F:Terraria.Item.consumable is true.
If null for a given item type, then vanilla decides if that item will be consumed on use if F:Terraria.Item.consumable is true.
Defaults to null.

You may also use M:Terraria.ModLoader.GlobalItem.ConsumeItem(Terraria.Item,Terraria.Player) or M:Terraria.ModLoader.ModItem.ConsumeItem(Terraria.Player) to prevent consumption. However, these methods cannot force consumption.

Definition at line 275 of file ItemID.cs.

Referenced by Terraria.Player.ItemCheck_Inner().