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

◆ LeftClick_SellOrTrash()

static bool Terraria.UI.ItemSlot.LeftClick_SellOrTrash ( Item[] inv,
int context,
int slot )
inlinestaticprivate

Definition at line 989 of file ItemSlot.cs.

990 {
991 bool flag = false;
992 bool result = false;
993 if (NotUsingGamepad && Options.DisableLeftShiftTrashCan)
994 {
995 if (!Options.DisableQuickTrash)
996 {
997 if ((uint)context <= 4u || context == 7 || context == 32)
998 {
999 flag = true;
1000 }
1001 if (ControlInUse && flag)
1002 {
1003 SellOrTrash(inv, context, slot);
1004 result = true;
1005 }
1006 }
1007 }
1008 else
1009 {
1010 if ((uint)context <= 4u || context == 32)
1011 {
1012 flag = Main.player[Main.myPlayer].chest == -1;
1013 }
1014 if (ShiftInUse && flag && (!NotUsingGamepad || !Options.DisableQuickTrash))
1015 {
1016 SellOrTrash(inv, context, slot);
1017 result = true;
1018 }
1019 }
1020 return result;
1021 }
static void SellOrTrash(Item[] inv, int context, int slot)
Definition ItemSlot.cs:1023
static bool NotUsingGamepad
Definition ItemSlot.cs:175
static bool ShiftInUse
Definition ItemSlot.cs:162
static bool ControlInUse
Definition ItemSlot.cs:173

References Terraria.UI.ItemSlot.ControlInUse, Terraria.UI.ItemSlot.Options.DisableLeftShiftTrashCan, Terraria.UI.ItemSlot.Options.DisableQuickTrash, Terraria.Main.myPlayer, Terraria.UI.ItemSlot.NotUsingGamepad, Terraria.Main.player, Terraria.UI.ItemSlot.SellOrTrash(), and Terraria.UI.ItemSlot.ShiftInUse.

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