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

◆ ModSlotCheck()

bool Terraria.ModLoader.AccessorySlotLoader.ModSlotCheck ( Item checkItem,
int slot,
int context )
inline

Checks if the provided item can go in to the provided slot. Includes checking if the item already exists in either of Player.Armor or ModSlotPlayer.exAccessorySlot Invokes directly ItemSlot.AccCheck & ModSlot.CanAcceptItem.

Definition at line 590 of file AccessorySlotLoader.cs.

591 {
592 if (CanAcceptItem(slot, checkItem, context))
593 {
594 return !ItemSlot.AccCheck_ForLocalPlayer(Player.armor.Concat(ModSlotPlayer(Player).exAccessorySlot).ToArray(), checkItem, slot + Player.armor.Length);
595 }
596 return false;
597 }
bool CanAcceptItem(int index, Item checkItem, int context)
static ModAccessorySlotPlayer ModSlotPlayer(Player player)
static bool AccCheck_ForLocalPlayer(Item[] itemCollection, Item item, int slot)
Definition ItemSlot.cs:4230

References Terraria.UI.ItemSlot.AccCheck_ForLocalPlayer(), Terraria.Player.armor, Terraria.ModLoader.AccessorySlotLoader.CanAcceptItem(), and Terraria.ModLoader.AccessorySlotLoader.ModSlotPlayer().

Referenced by Terraria.UI.ItemSlot.PickItemMovementAction().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: