public override bool NewRightClick(int tX, int tY) { Player player = Main.LocalPlayer; CampingModPlayer modPlayer = player.GetModPlayer <CampingModPlayer>(); int logic = GetTileLogic(tX, tY); // https://github.com/tModLoader/tModLoader/blob/master/ExampleMod/Tiles/ExampleChest.cs switch (logic) { case ItemID.PiggyBank: TileUtils.TogglePiggyBank(tX, tY, player); break; case ItemID.Safe: TileUtils.ToggleSafe(tX, tY, player); break; case ItemID.GPS: TileUtils.DisplayTimeInChat(); break; default: TileUtils.GetTentSpawnPosition(tX, tY, out int spawnX, out int spawnY, _FRAMEWIDTH, _FRAMEHEIGHT, 6, -2); TileUtils.ToggleTemporarySpawnPoint(modPlayer, spawnX, spawnY); break; } return(true); }
public override bool NewRightClick(int tX, int tY) { Player player = Main.LocalPlayer; CampingModPlayer modPlayer = player.GetModPlayer <CampingModPlayer>(); TileUtils.GetTentSpawnPosition(tX, tY, out int spawnX, out int spawnY, _FRAMEWIDTH, _FRAMEHEIGHT, 2); TileUtils.ToggleTemporarySpawnPoint(modPlayer, spawnX, spawnY); return(true); }
public override void MouseOver(int tX, int tY) { int logic = GetTileLogic(tX, tY); int itemIcon = dropItem; switch (logic) { case ItemID.PiggyBank: itemIcon = ItemID.PiggyBank; break; case ItemID.Safe: itemIcon = ItemID.Safe; break; case ItemID.GPS: itemIcon = ItemID.DepthMeter; break; } TileUtils.ShowItemIcon(tX, tY, itemIcon); }
public override void MouseOver(int tX, int tY) { TileUtils.ShowItemIcon(tX, tY, GetItemTypeFromStyle(Main.tile[tX, tY].frameY)); }
public override void MouseOver(int tX, int tY) { TileUtils.ShowItemIcon(tX, tY, dropItem); }