From 638b7cc54f9a011e1169e68ce1ea167a2cca7ada Mon Sep 17 00:00:00 2001 From: Arthri <41360489+Arthri@users.noreply.github.com> Date: Wed, 18 Aug 2021 17:39:28 +0800 Subject: [PATCH] Remove multiblock tiles --- TShockAPI/Bouncer.cs | 52 ------------------------------------ TShockAPI/GetDataHandlers.cs | 3 --- 2 files changed, 55 deletions(-) diff --git a/TShockAPI/Bouncer.cs b/TShockAPI/Bouncer.cs index 182ce54b..45dfa76c 100644 --- a/TShockAPI/Bouncer.cs +++ b/TShockAPI/Bouncer.cs @@ -154,22 +154,6 @@ namespace TShockAPI return actualItemPlaceStyle; } }); - PlaceStyleCorrectors.Add(TileID.Jackolanterns, - (player, requestedPlaceStyle, actualItemPlaceStyle) => - { - // Jack O' Lanterns is a tile with 9 variations, but only 1 item. - // The item uses the first style a.k.a. 0. - // RNG only generates placeStyles less than 9, so permit only <9 - if (actualItemPlaceStyle == 0 && requestedPlaceStyle < 9) - { - return requestedPlaceStyle; - } - else - { - // Return 0 for now, but ideally 0-8 should be returned. - return 0; - } - }); PlaceStyleCorrectors.Add(TileID.Presents, (player, requestedPlaceStyle, actualItemPlaceStyle) => { @@ -216,42 +200,6 @@ namespace TShockAPI return 0; } }); - PlaceStyleCorrectors.Add(TileID.SnowballLauncher, - (player, requestedPlaceStyle, actualItemPlaceStyle) => - { - // Check the direction the player is facing. - // 1 is right and -1 is left, these are the only possible values. - if (player.direction == 1) - { - // Right-facing snowball launcher. - return 1; - } - else if (player.direction == -1) - { - // Left-facing snowball launcher. - return 0; - } - else - { - throw new InvalidOperationException("Unrecognized player direction"); - } - }); - PlaceStyleCorrectors.Add(TileID.Painting4X3, - (player, requestedPlaceStyle, actualItemPlaceStyle) => - { - // Painting4X3 or "Catacombs" is a painting with 9 variations, but only 1 item. - // The first item uses the first style a.k.a. 0. - // RNG only generates placeStyles less than 9, so permit only <9. - if (actualItemPlaceStyle == 0 && requestedPlaceStyle < 9) - { - return requestedPlaceStyle; - } - else - { - // Return 0 for now, but ideally 0-8 should be returned. - return 0; - } - }); PlaceStyleCorrectors.Add(TileID.MinecartTrack, (player, requestedPlaceStyle, actualItemPlaceStyle) => { diff --git a/TShockAPI/GetDataHandlers.cs b/TShockAPI/GetDataHandlers.cs index 6983b4b3..560ce976 100644 --- a/TShockAPI/GetDataHandlers.cs +++ b/TShockAPI/GetDataHandlers.cs @@ -4256,12 +4256,9 @@ namespace TShockAPI /// internal static Dictionary ExtraneousPlaceStyles = new Dictionary { - {TileID.Jackolanterns, 8}, {TileID.Presents, 6}, {TileID.Explosives, 1}, {TileID.Crystals, 17}, - {TileID.SnowballLauncher, 1}, - {TileID.Painting4X3, 8}, {TileID.MinecartTrack, 3} };