1068 {
1069 Player player = Main.player[Main.myPlayer];
1070 TileEntity tileEntity = player.tileEntityAnchor.GetTileEntity();
1072 {
1073 return instruction;
1074 }
1075 if (inv[slot].
type > 0 && inv[slot].stack > 0)
1076 {
1077 if (!inv[slot].favorited)
1078 {
1079 switch (context)
1080 {
1081 case 0:
1082 case 1:
1083 case 2:
1084 if (Main.npcShop > 0 && !inv[slot].favorited)
1085 {
1086 return Lang.misc[75].Value;
1087 }
1088 if (Main.player[Main.myPlayer].chest != -1)
1089 {
1090 if (ChestUI.TryPlacingInChest(inv[slot], justCheck: true, context))
1091 {
1092 return Lang.misc[76].Value;
1093 }
1094 }
1095 else if (Main.InGuideCraftMenu && inv[slot].material)
1096 {
1097 return Lang.misc[76].Value;
1098 }
1099 if (Main.mouseItem.type > 0 && (context == 0 || context == 1 || context == 2 || context == 6 || context == 15 || context == 7 || context == 4 || context == 32 || context == 3))
1100 {
1101 return null;
1102 }
1103 return Lang.misc[74].Value;
1104 case 3:
1105 case 4:
1106 case 32:
1107 if (Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory)
1108 {
1109 return Lang.misc[76].Value;
1110 }
1111 break;
1112 case 5:
1113 case 8:
1114 case 9:
1115 case 10:
1116 case 11:
1117 case 12:
1118 case 16:
1119 case 17:
1120 case 18:
1121 case 19:
1122 case 20:
1123 case 25:
1124 case 27:
1125 case 33:
1126 if (Main.player[Main.myPlayer].ItemSpace(inv[slot]).CanTakeItemToPersonalInventory)
1127 {
1128 return Lang.misc[68].Value;
1129 }
1130 break;
1131 }
1132 }
1133 bool flag = false;
1134 if ((uint)context <= 4u || context == 32)
1135 {
1136 flag = player.chest == -1;
1137 }
1138 if (flag)
1139 {
1140 if (Main.npcShop > 0 && !inv[slot].favorited)
1141 {
1142 _ = Main.instance.shop[Main.npcShop];
1143 if (inv[slot].
type >= 71 && inv[slot].
type <= 74)
1144 {
1145 return "";
1146 }
1147 return Lang.misc[75].Value;
1148 }
1149 if (!inv[slot].favorited)
1150 {
1151 return Lang.misc[74].Value;
1152 }
1153 }
1154 }
1155 return "";
1156 }
virtual bool TryGetItemGamepadOverrideInstructions(Item[] inv, int context, int slot, out string instruction)