![]() |
tModLoader v2025.05
A mod to make and play Terraria mods
|
This serves as a central place to store equipment slots and their corresponding textures. You will use this to obtain the IDs for your equipment textures. More...
Inherits Loader< ModAccessorySlot >.
Public Member Functions | |
bool | CanAcceptItem (int index, Item checkItem, int context) |
bool | CanPlayerAcceptItem (Player player, int index, Item checkItem, int context) |
AccessorySlotType | ContextToEnum (int context) |
void | CustomUpdateEquips (int index, Player player) |
bool | Draw (int skip, bool modded, int slot, Color color) |
Draws Vanilla and Modded Accessory Slots | |
void | DrawAccSlots (int num20) |
ModAccessorySlot | Get (int id) |
ModAccessorySlot | Get (int id, Player player) |
bool | IsAccessoryInConflict (Player player, Item checkItem, int slot, int context) |
Similar to ModSlotCheck(Item, int, int) except it ignores the item in slot since that item is being passed in as checkItem . | |
bool | IsHidden (int index) |
bool | ModdedCanSlotBeShown (int index) |
bool | ModdedIsItemSlotUnlockedAndUsable (int index, Player player) |
Checks if the ModAccessorySlot at the given index is enabled. Does not account for the functional or vanity slots individually being disabled due to conflicts arising from shared accessory slots. | |
bool | ModdedIsSpecificItemSlotUnlockedAndUsable (int index, Player player, bool vanity) |
Like ModdedIsItemSlotUnlockedAndUsable(int, Player), except this also checks if the functional or vanity slot specifically is disabled due to conflicts arising from switching loadouts while using shared accessory slots. | |
void | ModifyDefaultSwapSlot (Item item, ref int accSlotToSwapTo) |
After checking for empty slots in ItemSlot.AccessorySwap, this allows for changing what the target slot will be if the accessory isn't already equipped. DOES NOT affect vanilla behavior of swapping items like for like where existing in a slot | |
bool | ModSlotCheck (Item checkItem, int slot, int context) |
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 Note that this doesn't check for conflicts of shared slots with the items of other loadouts, that check is done in ModAccessorySlotPlayer.DetectConflictsWithSharedSlots to prevent a confusing user experience. The accessory slot acts like a disabled slot while in conflict, allowing the player to choose how to fix the issue. | |
void | OnHover (int index, int context) |
bool | PreferredGolfBall (ref int projType) |
Mirrors Player.GetPreferredGolfBallToUse. Provides the golf ball projectile from an accessory slot. | |
Static Public Attributes | |
const int | MaxVanillaSlotCount = 2 + 5 |
static string[] | scrollStackLang = { Language.GetTextValue("tModLoader.slotStack"), Language.GetTextValue("tModLoader.slotScroll") } |
Properties | |
static Vector2 | DefenseIconPosition [get] |
The variable that determines where the DefenseIcon will be drawn, after considering all slot information. | |
static int | DrawVerticalAlignment [get] |
The variable known as num20 used to align all equipment slot drawing in Main. Represents the y position where equipment slots start to be drawn from. | |
This serves as a central place to store equipment slots and their corresponding textures. You will use this to obtain the IDs for your equipment textures.