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

◆ ShouldDrawSacrificeArea()

bool Terraria.GameContent.Creative.CreativeUI.ShouldDrawSacrificeArea ( )
inline

Definition at line 254 of file CreativeUI.cs.

255 {
256 if (!_itemSlotsForUI[0].IsAir)
257 {
258 return true;
259 }
260 Item mouseItem = Main.mouseItem;
261 if (mouseItem.IsAir)
262 {
263 return false;
264 }
265 if (!CreativeItemSacrificesCatalog.Instance.TryGetSacrificeCountCapToUnlockInfiniteItems(mouseItem.type, out var amountNeeded))
266 {
267 return false;
268 }
269 if (Main.LocalPlayerCreativeTracker.ItemSacrifices.GetSacrificeCount(mouseItem.type) < amountNeeded)
270 {
271 return true;
272 }
273 return false;
274 }

References Terraria.GameContent.Creative.CreativeUI._itemSlotsForUI, Terraria.GameContent.Creative.CreativeItemSacrificesCatalog.Instance, Terraria.Item.IsAir, Terraria.Main.LocalPlayerCreativeTracker, Terraria.Main.mouseItem, and Terraria.Item.type.