From 2bd50024947ca87751d13df29b496a9f3cb66512 Mon Sep 17 00:00:00 2001 From: Ozzatron Date: Sat, 19 Sep 2020 17:05:15 -0400 Subject: [PATCH] hologram fixes and other pedantic rewrites --- CalPlayer/CalamityPlayer.cs | 64 ++------- CalamityMod.cs | 2 +- CalamityNetcode.cs | 7 +- .../AgedSecurityChest.cs | 2 +- .../AgedSecurityChest.png | Bin .../ChargingStationItem.cs | 2 +- .../ChargingStationItem.png | Bin .../LabHologramProjectorItem.cs} | 12 +- .../LabHologramProjectorItem.png} | Bin .../PowerCellFactoryItem.cs | 2 +- .../PowerCellFactoryItem.png | Bin .../SecurityChest.cs | 2 +- .../SecurityChest.png | Bin .../HellLaboratorySchematic.cs | 84 ++++++------ .../IceLaboratorySchematic.cs | 84 ++++++------ .../PlagueLaboratorySchematic.cs | 84 ++++++------ .../PlanetoidLaboratorySchematic.cs | 84 ++++++------ .../SunkenSeaLaboratorySchematic.cs | 84 ++++++------ Schematics/TilePlacementHelpers.cs | 2 +- TileEntities/TEChargingStation.cs | 12 +- TileEntities/TEDraedonHologram.cs | 72 ---------- TileEntities/TELabHologramProjector.cs | 126 ++++++++++++++++++ TileEntities/TEPowerCellFactory.cs | 14 +- .../AgedSecurityChestTile.cs | 2 +- Tiles/DraedonStructures/ChargingStation.cs | 21 +-- .../DraedonLabFieldGenerator.png | Bin 280 -> 0 bytes .../DraedonLabFieldGeneratorGlow.png | Bin 149 -> 0 bytes .../InactivePowerCellFactory.cs | 2 +- ...donHologram.cs => LabHologramProjector.cs} | 80 ++++++----- ...nHologram.png => LabHologramProjector.png} | Bin Tiles/DraedonStructures/PowerCellFactory.cs | 24 +--- Tiles/DraedonStructures/SecurityChestTile.cs | 2 +- UI/ChargingStationUI.cs | 27 ++-- UI/DraedonHologramChatUI.cs | 84 ------------ UI/LabHologramProjectorUI.cs | 103 ++++++++++++++ UI/PowerCellFactoryUI.cs | 29 ++-- 36 files changed, 575 insertions(+), 538 deletions(-) rename Items/Placeables/{Furniture => DraedonStructures}/AgedSecurityChest.cs (96%) rename Items/Placeables/{Furniture => DraedonStructures}/AgedSecurityChest.png (100%) rename Items/Placeables/{ => DraedonStructures}/ChargingStationItem.cs (94%) rename Items/Placeables/{ => DraedonStructures}/ChargingStationItem.png (100%) rename Items/Placeables/{Furniture/HolographicDisplayBox.cs => DraedonStructures/LabHologramProjectorItem.cs} (65%) rename Items/Placeables/{Furniture/HolographicDisplayBox.png => DraedonStructures/LabHologramProjectorItem.png} (100%) rename Items/Placeables/{ => DraedonStructures}/PowerCellFactoryItem.cs (94%) rename Items/Placeables/{ => DraedonStructures}/PowerCellFactoryItem.png (100%) rename Items/Placeables/{Furniture => DraedonStructures}/SecurityChest.cs (95%) rename Items/Placeables/{Furniture => DraedonStructures}/SecurityChest.png (100%) delete mode 100644 TileEntities/TEDraedonHologram.cs create mode 100644 TileEntities/TELabHologramProjector.cs delete mode 100644 Tiles/DraedonStructures/DraedonLabFieldGenerator.png delete mode 100644 Tiles/DraedonStructures/DraedonLabFieldGeneratorGlow.png rename Tiles/DraedonStructures/{DraedonHologram.cs => LabHologramProjector.cs} (73%) rename Tiles/DraedonStructures/{DraedonHologram.png => LabHologramProjector.png} (100%) delete mode 100644 UI/DraedonHologramChatUI.cs create mode 100644 UI/LabHologramProjectorUI.cs diff --git a/CalPlayer/CalamityPlayer.cs b/CalPlayer/CalamityPlayer.cs index 64d73fef08..238282ab7c 100644 --- a/CalPlayer/CalamityPlayer.cs +++ b/CalPlayer/CalamityPlayer.cs @@ -126,18 +126,12 @@ namespace CalamityMod.CalPlayer public int potionTimer = 0; public bool cementShoes = false; public bool resetHeightandWidth = false; - #endregion + #endregion - public int CurrentlyViewedFactoryX = -1; - public int CurrentlyViewedFactoryY = -1; - public TEPowerCellFactory CurrentlyViewedFactory; - - public int CurrentlyViewedChargerX = -1; - public int CurrentlyViewedChargerY = -1; - public TEChargingStation CurrentlyViewedCharger; - - public int CurrentlyViewedHologramX = -1; - public int CurrentlyViewedHologramY = -1; + #region Tile Entity Trackers + public int CurrentlyViewedFactoryID = -1; + public int CurrentlyViewedChargerID = -1; + public int CurrentlyViewedHologramID = -1; public string CurrentlyViewedHologramText; #endregion @@ -1007,10 +1001,12 @@ namespace CalamityMod.CalPlayer public bool omegaBlueTransformation; public bool omegaBlueTransformationForce; public bool omegaBlueTransformationPower; - #endregion + #endregion - #region SavingAndLoading - public override void Initialize() + #endregion + + #region SavingAndLoading + public override void Initialize() { extraAccessoryML = false; eCore = false; @@ -2385,13 +2381,9 @@ namespace CalamityMod.CalPlayer elysianGuard = false; #endregion - CurrentlyViewedFactoryX = CurrentlyViewedFactoryY = -1; - CurrentlyViewedFactory = null; - - CurrentlyViewedChargerX = CurrentlyViewedChargerY = -1; - CurrentlyViewedCharger = null; - - CurrentlyViewedHologramX = CurrentlyViewedHologramY = -1; + CurrentlyViewedFactoryID = -1; + CurrentlyViewedChargerID = -1; + CurrentlyViewedHologramID = -1; CurrentlyViewedHologramText = string.Empty; KameiBladeUseDelay = 0; @@ -3792,36 +3784,6 @@ namespace CalamityMod.CalPlayer rage = 0; gaelSwitchTimer = GaelSwitchPhase.None; } - - // Disable the factory UI if the player is far from the associated factory. - if (CurrentlyViewedFactory != null) - { - Vector2 factoryPosition = new Vector2(CurrentlyViewedFactoryX, CurrentlyViewedFactoryY); - if (player.Distance(factoryPosition) > 1200f) - { - CurrentlyViewedFactory = null; - CurrentlyViewedFactoryX = CurrentlyViewedFactoryY = -1; - } - } - - // Disable the charger UI if the player is far from the associated charger. - if (CurrentlyViewedCharger != null) - { - Vector2 chargerPosition = new Vector2(CurrentlyViewedChargerX, CurrentlyViewedChargerY); - if (player.Distance(chargerPosition) > 1200f) - { - CurrentlyViewedCharger = null; - CurrentlyViewedChargerX = CurrentlyViewedChargerY = -1; - } - } - - // Disable the hologram UI if the player is far from the associated hologram. - Vector2 hologramPosition = new Vector2(CurrentlyViewedHologramX, CurrentlyViewedHologramY) * 16f; - if (player.Distance(hologramPosition) > 120f) - { - CurrentlyViewedHologramX = CurrentlyViewedHologramY = -1; - CurrentlyViewedHologramText = string.Empty; - } } #region Dragon Scale Logic diff --git a/CalamityMod.cs b/CalamityMod.cs index 79ee88204b..365ae4ce9b 100644 --- a/CalamityMod.cs +++ b/CalamityMod.cs @@ -912,7 +912,7 @@ namespace CalamityMod layers.Insert(mouseIndex, new LegacyGameInterfaceLayer("Draedon Hologram", () => { - DraedonHologramChatUI.Draw(Main.spriteBatch); + LabHologramProjectorUI.Draw(Main.spriteBatch); return true; }, InterfaceScaleType.None)); diff --git a/CalamityNetcode.cs b/CalamityNetcode.cs index 794262cc8f..8cf3b2f514 100644 --- a/CalamityNetcode.cs +++ b/CalamityNetcode.cs @@ -6,7 +6,6 @@ using CalamityMod.World; using System; using System.IO; using Terraria; -using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -162,6 +161,9 @@ namespace CalamityMod case CalamityModMessageType.Turret: TEBaseTurret.ReadSyncPacket(mod, reader); break; + case CalamityModMessageType.LabHologramProjector: + TELabHologramProjector.ReadSyncPacket(mod, reader); + break; case CalamityModMessageType.SyncCalamityNPCAIArray: byte npcIndex2 = reader.ReadByte(); @@ -248,6 +250,7 @@ namespace CalamityMod PowerCellFactory, ChargingStationStandard, ChargingStationItemChange, - Turret + Turret, + LabHologramProjector, } } diff --git a/Items/Placeables/Furniture/AgedSecurityChest.cs b/Items/Placeables/DraedonStructures/AgedSecurityChest.cs similarity index 96% rename from Items/Placeables/Furniture/AgedSecurityChest.cs rename to Items/Placeables/DraedonStructures/AgedSecurityChest.cs index bc10257623..54dc2fa8ae 100644 --- a/Items/Placeables/Furniture/AgedSecurityChest.cs +++ b/Items/Placeables/DraedonStructures/AgedSecurityChest.cs @@ -3,7 +3,7 @@ using CalamityMod.Tiles.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Items.Placeables.Furniture +namespace CalamityMod.Items.Placeables.DraedonStructures { public class AgedSecurityChest : ModItem { diff --git a/Items/Placeables/Furniture/AgedSecurityChest.png b/Items/Placeables/DraedonStructures/AgedSecurityChest.png similarity index 100% rename from Items/Placeables/Furniture/AgedSecurityChest.png rename to Items/Placeables/DraedonStructures/AgedSecurityChest.png diff --git a/Items/Placeables/ChargingStationItem.cs b/Items/Placeables/DraedonStructures/ChargingStationItem.cs similarity index 94% rename from Items/Placeables/ChargingStationItem.cs rename to Items/Placeables/DraedonStructures/ChargingStationItem.cs index 7c396c7a4a..5fb7b19267 100644 --- a/Items/Placeables/ChargingStationItem.cs +++ b/Items/Placeables/DraedonStructures/ChargingStationItem.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Items.Placeables +namespace CalamityMod.Items.Placeables.DraedonStructures { public class ChargingStationItem : ModItem { diff --git a/Items/Placeables/ChargingStationItem.png b/Items/Placeables/DraedonStructures/ChargingStationItem.png similarity index 100% rename from Items/Placeables/ChargingStationItem.png rename to Items/Placeables/DraedonStructures/ChargingStationItem.png diff --git a/Items/Placeables/Furniture/HolographicDisplayBox.cs b/Items/Placeables/DraedonStructures/LabHologramProjectorItem.cs similarity index 65% rename from Items/Placeables/Furniture/HolographicDisplayBox.cs rename to Items/Placeables/DraedonStructures/LabHologramProjectorItem.cs index b2d663eb67..01a4d03104 100644 --- a/Items/Placeables/Furniture/HolographicDisplayBox.cs +++ b/Items/Placeables/DraedonStructures/LabHologramProjectorItem.cs @@ -3,13 +3,13 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Items.Placeables.Furniture +namespace CalamityMod.Items.Placeables.DraedonStructures { - public class HolographicDisplayBox : ModItem + public class LabHologramProjectorItem : ModItem { public override void SetStaticDefaults() { - DisplayName.SetDefault("Holographic Display Box"); + DisplayName.SetDefault("Lab Hologram Projector"); } public override void SetDefaults() @@ -23,10 +23,10 @@ namespace CalamityMod.Items.Placeables.Furniture item.useTime = 10; item.useStyle = ItemUseStyleID.SwingThrow; item.consumable = true; - //item.value = Item.buyPrice(0, 5, 0, 0); - item.rare = 3; + item.value = Item.buyPrice(gold: 5); + item.rare = ItemRarityID.Orange; item.Calamity().customRarity = CalamityRarity.DraedonRust; - item.createTile = ModContent.TileType(); + item.createTile = ModContent.TileType(); } } } diff --git a/Items/Placeables/Furniture/HolographicDisplayBox.png b/Items/Placeables/DraedonStructures/LabHologramProjectorItem.png similarity index 100% rename from Items/Placeables/Furniture/HolographicDisplayBox.png rename to Items/Placeables/DraedonStructures/LabHologramProjectorItem.png diff --git a/Items/Placeables/PowerCellFactoryItem.cs b/Items/Placeables/DraedonStructures/PowerCellFactoryItem.cs similarity index 94% rename from Items/Placeables/PowerCellFactoryItem.cs rename to Items/Placeables/DraedonStructures/PowerCellFactoryItem.cs index e17acfcfa5..72d467535d 100644 --- a/Items/Placeables/PowerCellFactoryItem.cs +++ b/Items/Placeables/DraedonStructures/PowerCellFactoryItem.cs @@ -3,7 +3,7 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Items.Placeables +namespace CalamityMod.Items.Placeables.DraedonStructures { public class PowerCellFactoryItem : ModItem { diff --git a/Items/Placeables/PowerCellFactoryItem.png b/Items/Placeables/DraedonStructures/PowerCellFactoryItem.png similarity index 100% rename from Items/Placeables/PowerCellFactoryItem.png rename to Items/Placeables/DraedonStructures/PowerCellFactoryItem.png diff --git a/Items/Placeables/Furniture/SecurityChest.cs b/Items/Placeables/DraedonStructures/SecurityChest.cs similarity index 95% rename from Items/Placeables/Furniture/SecurityChest.cs rename to Items/Placeables/DraedonStructures/SecurityChest.cs index 264b1c2373..d153c939b6 100644 --- a/Items/Placeables/Furniture/SecurityChest.cs +++ b/Items/Placeables/DraedonStructures/SecurityChest.cs @@ -2,7 +2,7 @@ using CalamityMod.Tiles.DraedonStructures; using Terraria.ID; using Terraria.ModLoader; -namespace CalamityMod.Items.Placeables.Furniture +namespace CalamityMod.Items.Placeables.DraedonStructures { public class SecurityChest : ModItem { diff --git a/Items/Placeables/Furniture/SecurityChest.png b/Items/Placeables/DraedonStructures/SecurityChest.png similarity index 100% rename from Items/Placeables/Furniture/SecurityChest.png rename to Items/Placeables/DraedonStructures/SecurityChest.png diff --git a/Schematics/AutoGeneratedContent/HellLaboratorySchematic.cs b/Schematics/AutoGeneratedContent/HellLaboratorySchematic.cs index 0be2f47221..91f6abc447 100644 --- a/Schematics/AutoGeneratedContent/HellLaboratorySchematic.cs +++ b/Schematics/AutoGeneratedContent/HellLaboratorySchematic.cs @@ -551,13 +551,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile530 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 132, 2, 32).UseFrame(72, 0).UseWall((ushort)ModContent.WallType(), 144, 72); var tile531 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(270, 0); var tile532 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 1, 3, 0).UseWall((ushort)ModContent.WallType(), 36, 108); - var tile533 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 3, 32).UseWall((ushort)ModContent.WallType(), 0, 108); - var tile534 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile535 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile536 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 252, 72); - var tile537 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile538 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile539 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile533 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 3, 32).UseWall((ushort)ModContent.WallType(), 0, 108); + var tile534 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile535 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile536 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile537 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile538 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile539 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 108, 72); var tile540 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(306, 36); var tile541 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 163, 0, 16416).UseFrame(72, 72).UseWall((ushort)ModContent.WallType(), 108, 0); var tile542 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 87, 2, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 252, 72); @@ -571,13 +571,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile550 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(90, 0); var tile551 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 0, 4, 0).UseWall((ushort)ModContent.WallType(), 0, 144); var tile552 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(270, 0); - var tile553 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 72, 0); - var tile554 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 216, 36); - var tile555 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 396, 72); - var tile556 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile557 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 288, 36); - var tile558 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile559 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile553 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile554 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile555 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile556 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile557 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile558 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile559 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 36, 72); var tile560 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 0); var tile561 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 0, 32).UseFrame(36, 36).UseWall((ushort)ModContent.WallType(), 36, 0); var tile562 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 3, 32).UseFrame(90, 72).UseWall((ushort)ModContent.WallType(), 0, 108); @@ -594,13 +594,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile573 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseWall((ushort)ModContent.WallType(), 252, 36); var tile574 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 396, 36); var tile575 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 36).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile576 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 72, 0); - var tile577 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 360, 36); - var tile578 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile579 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile580 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 360, 72); - var tile581 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile582 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile576 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile577 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile578 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile579 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile580 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile581 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile582 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 36, 72); var tile583 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 152, 0, 32).UseFrame(54, 72).UseWall((ushort)ModContent.WallType(), 288, 0); var tile584 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 133, 2, 32).UseFrame(234, 0).UseWall((ushort)ModContent.WallType(), 180, 72); var tile585 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 2, 32).UseFrame(90, 18).UseWall((ushort)ModContent.WallType(), 36, 72); @@ -620,13 +620,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile599 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 360, 72); var tile600 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 108, 36); var tile601 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile602 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 108, 0); - var tile603 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile604 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile605 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 252, 72); - var tile606 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile607 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile608 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile602 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile603 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile604 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile605 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile606 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile607 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile608 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 72, 72); var tile609 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 0); var tile610 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 0, 32).UseFrame(36, 36).UseWall((ushort)ModContent.WallType(), 72, 0); var tile611 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 168, 2, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 288, 72); @@ -649,13 +649,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile628 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 128, 2, 32).UseFrame(234, 36).UseWall((ushort)ModContent.WallType(), 0, 72); var tile629 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 149, 2, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 180, 72); var tile630 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 2, 0).UseWall((ushort)ModContent.WallType(), 108, 72); - var tile631 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 36, 0); - var tile632 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 252, 36); - var tile633 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 396, 36); - var tile634 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile635 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 252, 36); - var tile636 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 396, 72); - var tile637 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 108, 72); + var tile631 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile632 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile633 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile634 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile635 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile636 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile637 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 108, 72); var tile638 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 108, 72); var tile639 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 16, 0, 32).UseFrame(36, 54); var tile640 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(18, 72).UseWall((ushort)ModContent.WallType(), 108, 0); @@ -674,13 +674,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile653 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseWall((ushort)ModContent.WallType(), 108, 0); var tile654 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 396, 72); var tile655 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 0, 4, 0).UseWall((ushort)ModContent.WallType(), 0, 144); - var tile656 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 36, 0); - var tile657 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 360, 36); - var tile658 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile659 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile660 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 360, 36); - var tile661 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile662 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile656 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile657 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile658 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile659 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile660 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile661 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile662 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 72, 72); var tile663 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(288, 36); var tile664 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 0, 12320).UseFrame(90, 72).UseWall((ushort)ModContent.WallType(), 36, 0); var tile665 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 163, 2, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 108, 72); diff --git a/Schematics/AutoGeneratedContent/IceLaboratorySchematic.cs b/Schematics/AutoGeneratedContent/IceLaboratorySchematic.cs index 8b9109176e..bd9909ee11 100644 --- a/Schematics/AutoGeneratedContent/IceLaboratorySchematic.cs +++ b/Schematics/AutoGeneratedContent/IceLaboratorySchematic.cs @@ -556,13 +556,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile536 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 36, 36); var tile537 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 288, 36); var tile538 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 155, 2, 32).UseFrame(36, 36).UseWall((ushort)ModContent.WallType(), 396, 72); - var tile539 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile540 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 252, 36); - var tile541 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 396, 36); - var tile542 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile543 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 288, 36); - var tile544 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 396, 36); - var tile545 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile539 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile540 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile541 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile542 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile543 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile544 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile545 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 36, 36); var tile546 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 152, 1, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 288, 36); var tile547 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseWall((ushort)ModContent.WallType(), 252, 36); var tile548 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 396, 0); @@ -589,13 +589,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile569 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)WallID.IceUnsafe, 288, 36); var tile570 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 360, 0); var tile571 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile572 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile573 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 360, 36); - var tile574 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile575 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile576 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 360, 36); - var tile577 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile578 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile572 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile573 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile574 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile575 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile576 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile577 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile578 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 108, 36); var tile579 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 26, 0, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 360, 0); var tile580 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 360, 0); var tile581 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 36, 36); @@ -616,13 +616,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile596 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 2, 0).UseWall((ushort)ModContent.WallType(), 252, 72); var tile597 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 1, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 72, 36); var tile598 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 1, 32).UseFrame(36, 36).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile599 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 216, 72); - var tile600 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile601 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile602 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 288, 72); - var tile603 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile604 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile605 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile599 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile600 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile601 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile602 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile603 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile604 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile605 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 216, 72); var tile606 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 72, 36); var tile607 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 36, 36); var tile608 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 108, 36); @@ -645,13 +645,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile625 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 72, 36); var tile626 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 87, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 252, 36); var tile627 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 43, 0, 32).UseFrame(54, 36).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile628 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile629 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 288, 36); - var tile630 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 396, 72); - var tile631 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile632 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 216, 36); - var tile633 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile634 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile628 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile629 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile630 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile631 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile632 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile633 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile634 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 108, 36); var tile635 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 168, 1, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 288, 36); var tile636 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 1, 0, 32).UseFrame(0, 540).UseWall((ushort)ModContent.WallType(), 36, 0); var tile637 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 1, 0).UseWall((ushort)ModContent.WallType(), 216, 36); @@ -675,13 +675,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile655 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 72, 36); var tile656 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 154, 2, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 360, 72); var tile657 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 1, 32).UseFrame(54, 36).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile658 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile659 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 360, 72); - var tile660 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile661 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile662 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 360, 0); - var tile663 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile664 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile658 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile659 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile660 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile661 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile662 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile663 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile664 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 108, 36); var tile665 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 360, 36); var tile666 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseWall((ushort)ModContent.WallType(), 360, 0); var tile667 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 36, 36); @@ -695,13 +695,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile675 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 149, 3, 16416).UseFrame(36, 72).UseWall((ushort)ModContent.WallType(), 180, 108); var tile676 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 36, 36); var tile677 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 1, 32).UseFrame(54, 36).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile678 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 288, 72); - var tile679 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile680 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile681 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 288, 72); - var tile682 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile683 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile684 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile678 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile679 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile680 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile681 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile682 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile683 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile684 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 288, 72); var tile685 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 1, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 72, 36); var tile686 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 108, 36); var tile687 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 108, 36); diff --git a/Schematics/AutoGeneratedContent/PlagueLaboratorySchematic.cs b/Schematics/AutoGeneratedContent/PlagueLaboratorySchematic.cs index c24f23bc80..6ed943c14c 100644 --- a/Schematics/AutoGeneratedContent/PlagueLaboratorySchematic.cs +++ b/Schematics/AutoGeneratedContent/PlagueLaboratorySchematic.cs @@ -64,25 +64,25 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile45 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(72, 0).UseWall((ushort)ModContent.WallType(), 396, 72); var tile46 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 132, 4, 0).UseWall((ushort)ModContent.WallType(), 144, 144); var tile47 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 3, 32).UseFrame(90, 72).UseWall((ushort)ModContent.WallType(), 72, 108); - var tile48 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseWall((ushort)ModContent.WallType(), 360, 36); - var tile49 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile50 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile51 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 360, 0); - var tile52 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile53 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile54 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile48 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile49 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile50 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile51 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile52 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile53 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile54 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 360, 72); var tile55 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 1, 32).UseFrame(36, 54).UseWall((ushort)ModContent.WallType(), 72, 36); var tile56 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 163, 1, 16416).UseFrame(72, 72).UseWall((ushort)ModContent.WallType(), 108, 36); var tile57 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 132, 4, 0).UseWall((ushort)ModContent.WallType(), 144, 144); var tile58 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 0, 32).UseFrame(18, 72); var tile59 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(162, 0).UseWall((ushort)ModContent.WallType(), 36, 0); - var tile60 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile61 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile62 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 216, 72); - var tile63 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile64 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile65 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 288, 72); - var tile66 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile60 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile61 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile62 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile63 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile64 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile65 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile66 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 36, 36); var tile67 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 36, 36); var tile68 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 252, 72); var tile69 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(54, 0); @@ -93,13 +93,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile74 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 1, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 72, 36); var tile75 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseWall((ushort)ModContent.WallType(), 252, 36); var tile76 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 396, 36); - var tile77 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 216, 36); - var tile78 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile79 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile80 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 216, 36); - var tile81 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 396, 72); - var tile82 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile83 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile77 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile78 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile79 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile80 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile81 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile82 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile83 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 252, 36); var tile84 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 171, 2, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 396, 72); var tile85 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 1, 32).UseFrame(54, 36).UseWall((ushort)ModContent.WallType(), 36, 36); var tile86 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 131, 2, 0).UseWall((ushort)ModContent.WallType(), 108, 72); @@ -112,13 +112,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile93 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 1, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 108, 36); var tile94 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 360, 36); var tile95 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile96 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 360, 36); - var tile97 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile98 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile99 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 360, 72); - var tile100 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile101 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile102 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile96 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile97 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile98 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile99 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile100 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile101 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile102 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 360, 36); var tile103 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 108, 36); var tile104 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 108, 36); var tile105 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 10, 0, 0).UseWall((ushort)ModContent.WallType(), 360, 0); @@ -130,13 +130,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile111 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 36, 36); var tile112 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 36, 36); var tile113 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 6, 2, 0).UseWall((ushort)ModContent.WallType(), 216, 72); - var tile114 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile115 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile116 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 216, 72); - var tile117 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile118 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile119 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 252, 72); - var tile120 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile114 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile115 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile116 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile117 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile118 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile119 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile120 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 72, 36); var tile121 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 36, 36); var tile122 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 288, 72); var tile123 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 128, 2, 0).UseWall((ushort)ModContent.WallType(), 0, 72); @@ -146,13 +146,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile127 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseWall((ushort)ModContent.WallType(), 396, 0); var tile128 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 1, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 72, 36); var tile129 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 11, 0, 0).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile130 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 252, 36); - var tile131 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile132 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile133 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 288, 36); - var tile134 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 396, 36); - var tile135 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile136 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile130 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile131 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile132 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile133 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile134 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile135 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile136 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 216, 36); var tile137 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(18, 54).UseWall((ushort)ModContent.WallType(), 396, 36); var tile138 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 1, 12320).UseFrame(54, 72).UseWall((ushort)ModContent.WallType(), 108, 36); var tile139 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 136, 1, 0).UseWall((ushort)ModContent.WallType(), 288, 36); diff --git a/Schematics/AutoGeneratedContent/PlanetoidLaboratorySchematic.cs b/Schematics/AutoGeneratedContent/PlanetoidLaboratorySchematic.cs index f5c1bb6b19..c608bebccb 100644 --- a/Schematics/AutoGeneratedContent/PlanetoidLaboratorySchematic.cs +++ b/Schematics/AutoGeneratedContent/PlanetoidLaboratorySchematic.cs @@ -318,13 +318,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile301 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 216, 36); var tile302 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 38, 1, 32).UseFrame(54, 36).UseWall((ushort)ModContent.WallType(), 216, 36); var tile303 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 2, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 108, 72); - var tile304 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseWall((ushort)ModContent.WallType(), 72, 0); - var tile305 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 396, 72); - var tile306 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile307 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 252, 36); - var tile308 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 396, 36); - var tile309 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile310 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile304 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile305 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile306 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile307 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile308 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile309 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile310 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 72, 72); var tile311 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 2, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 36, 72); var tile312 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 0, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 36, 0); var tile313 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 36, 36); @@ -334,13 +334,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile317 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 154, 2, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 360, 72); var tile318 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 26, 0, 32).UseFrame(36, 36).UseWall((ushort)ModContent.WallType(), 360, 0); var tile319 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 2, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 36, 72); - var tile320 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 36, 0); - var tile321 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile322 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile323 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 360, 72); - var tile324 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile325 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile326 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile320 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile321 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile322 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile323 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile324 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile325 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile326 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 72, 72); var tile327 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 66, 0, 32).UseFrame(0, 540).UseWall((ushort)ModContent.WallType(), 72, 0); var tile328 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 66, 1, 32).UseFrame(0, 558).UseWall((ushort)ModContent.WallType(), 72, 36); @@ -354,13 +354,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile334 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(32, 6, 2, 0).UseLiquid(LiquidState.Lava, 232).UseWall((ushort)ModContent.WallType(), 216, 72); var tile335 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(32, 6, 2, 0).UseLiquid(LiquidState.Lava, 255).UseWall((ushort)ModContent.WallType(), 216, 72); var tile336 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile337 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 36, 0); - var tile338 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile339 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 288, 72); - var tile340 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile341 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile342 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 288, 72); - var tile343 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile337 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile338 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile339 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile340 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile341 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile342 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile343 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 36, 72); var tile344 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 36, 72); var tile345 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 0, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 72, 0); var tile346 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 107, 1, 32).UseFrame(54, 0).UseWall((ushort)ModContent.WallType(), 396, 36); @@ -371,39 +371,39 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile351 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 87, 1, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 252, 36); var tile352 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 252, 36); var tile353 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 2, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 72, 72); - var tile354 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 36, 0); - var tile355 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 396, 72); - var tile356 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile357 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 252, 36); - var tile358 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 396, 36); - var tile359 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile360 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 72, 72); + var tile354 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile355 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 139, 2, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 396, 72); + var tile356 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile357 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile358 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 75, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 396, 36); + var tile359 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile360 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 2, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 72, 72); var tile361 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 98, 2, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 72, 72); var tile362 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 0, 32).UseFrame(126, 72).UseWall((ushort)ModContent.WallType(), 108, 0); var tile363 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 163, 1, 32).UseFrame(54, 36).UseWall((ushort)ModContent.WallType(), 108, 36); var tile364 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(18, 0).UseWall((ushort)ModContent.WallType(), 360, 72); var tile365 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 170, 2, 32).UseFrame(54, 36).UseWall((ushort)ModContent.WallType(), 360, 72); var tile366 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 36, 72); - var tile367 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 72, 0); - var tile368 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile369 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile370 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 360, 72); - var tile371 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile372 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile373 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 36, 72); + var tile367 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile368 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile369 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile370 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile371 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile372 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile373 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 2, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 36, 72); var tile374 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 164, 2, 32).UseFrame(90, 54).UseWall((ushort)ModContent.WallType(), 144, 72); var tile375 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(0, 72).UseWall((ushort)ModContent.WallType(), 288, 72); var tile376 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(32, 136, 2, 0).UseLiquid(LiquidState.Lava, 255).UseWall((ushort)ModContent.WallType(), 288, 72); var tile377 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(0, 54).UseWall((ushort)ModContent.WallType(), 216, 72); var tile378 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 82, 1, 32).UseFrame(54, 72).UseWall((ushort)ModContent.WallType(), 72, 36); var tile379 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 163, 2, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 108, 72); - var tile380 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 108, 0); - var tile381 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile382 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 216, 72); - var tile383 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile384 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile385 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 252, 72); - var tile386 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 4, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 36, 144); + var tile380 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile381 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile382 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile383 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile384 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile385 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 252, 72); + var tile386 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 4, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 36, 144); var tile387 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 33, 2, 32).UseFrame(216, 36).UseWall((ushort)ModContent.WallType(), 36, 72); var tile388 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 4, 32).UseFrame(270, 0).UseWall((ushort)ModContent.WallType(), 216, 144); var tile389 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 32, 0, 32).UseFrame(234, 36); diff --git a/Schematics/AutoGeneratedContent/SunkenSeaLaboratorySchematic.cs b/Schematics/AutoGeneratedContent/SunkenSeaLaboratorySchematic.cs index efcaae6586..bbe038043d 100644 --- a/Schematics/AutoGeneratedContent/SunkenSeaLaboratorySchematic.cs +++ b/Schematics/AutoGeneratedContent/SunkenSeaLaboratorySchematic.cs @@ -307,13 +307,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile287 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 170, 2, 32).UseFrame(54, 36).UseWall((ushort)ModContent.WallType(), 360, 72); var tile288 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseWall((ushort)ModContent.WallType(), 108, 36); var tile289 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile290 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseWall((ushort)ModContent.WallType(), 36, 0); - var tile291 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile292 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile293 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 216, 72); - var tile294 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile295 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile296 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile290 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile291 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 16).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile292 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(0, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile293 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(0, 48).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile294 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 64).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile295 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 80).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile296 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(0, 96).UseWall((ushort)ModContent.WallType(), 216, 72); var tile297 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 17, 1, 32).UseFrame(162, 18).UseWall((ushort)ModContent.WallType(), 36, 36); var tile298 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 66, 1, 32).UseFrame(0, 540).UseLiquid(LiquidState.Water, 195).UseWall((ushort)ModContent.WallType(), 72, 36); var tile299 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 71, 2, 32).UseFrame(0, 558).UseLiquid(LiquidState.Water, 255).UseWall((ushort)ModContent.WallType(), 252, 72); @@ -326,13 +326,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile306 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(18, 18).UseWall((ushort)ModContent.WallType(), 216, 72); var tile307 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseWall((ushort)ModContent.WallType(), 36, 36); var tile308 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 0, 4, 4128).UseFrame(180, 0).UseWall((ushort)ModContent.WallType(), 0, 144); - var tile309 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 108, 0); - var tile310 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 216, 36); - var tile311 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile312 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile313 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 288, 36); - var tile314 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile315 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile309 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(16, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile310 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(16, 16).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile311 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(16, 32).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile312 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile313 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseFrame(16, 64).UseWall((ushort)ModContent.WallType(), 288, 36); + var tile314 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(16, 80).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile315 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(16, 96).UseWall((ushort)ModContent.WallType(), 72, 36); var tile316 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 103, 1, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 252, 36); var tile317 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 11, 0, 0).UseLiquid(LiquidState.Water, 195).UseWall((ushort)ModContent.WallType(), 396, 0); var tile318 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 71, 1, 0).UseLiquid(LiquidState.Water, 255).UseWall((ushort)ModContent.WallType(), 252, 36); @@ -347,13 +347,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile327 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(36, 0).UseWall((ushort)ModContent.WallType(), 396, 0); var tile328 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(36, 18).UseWall((ushort)ModContent.WallType(), 36, 36); var tile329 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 1, 32).UseWall((ushort)ModContent.WallType(), 288, 36); - var tile330 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 108, 0); - var tile331 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 360, 0); - var tile332 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile333 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile334 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 360, 36); - var tile335 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile336 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile330 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(32, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile331 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(32, 16).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile332 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(32, 32).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile333 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile334 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseFrame(32, 64).UseWall((ushort)ModContent.WallType(), 360, 36); + var tile335 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 80).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile336 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(32, 96).UseWall((ushort)ModContent.WallType(), 72, 36); var tile337 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 170, 2, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 360, 72); var tile338 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(36, 0).UseLiquid(LiquidState.Water, 255).UseWall((ushort)ModContent.WallType(), 360, 0); var tile339 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(36, 18).UseLiquid(LiquidState.Water, 255).UseWall((ushort)ModContent.WallType(), 108, 36); @@ -364,13 +364,13 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile344 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 360, 0); var tile345 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 36).UseWall((ushort)ModContent.WallType(), 36, 36); var tile346 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(0, 54).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile347 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 108, 0); - var tile348 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile349 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile350 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 288, 72); - var tile351 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile352 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 108, 36); - var tile353 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 216, 72); + var tile347 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 0, 32).UseFrame(48, 0).UseWall((ushort)ModContent.WallType(), 108, 0); + var tile348 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 16).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile349 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(48, 32).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile350 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 136, 2, 32).UseFrame(48, 48).UseWall((ushort)ModContent.WallType(), 288, 72); + var tile351 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(48, 64).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile352 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 131, 1, 32).UseFrame(48, 80).UseWall((ushort)ModContent.WallType(), 108, 36); + var tile353 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 2, 32).UseFrame(48, 96).UseWall((ushort)ModContent.WallType(), 216, 72); var tile354 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(108, 72).UseWall((ushort)ModContent.WallType(), 72, 36); var tile355 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 147, 1, 1056).UseFrame(54, 54).UseWall((ushort)ModContent.WallType(), 108, 36); var tile356 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 168, 2, 32).UseFrame(54, 18).UseWall((ushort)ModContent.WallType(), 288, 72); @@ -380,25 +380,25 @@ namespace CalamityMod.Schematics.AutoGeneratedContent var tile360 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(18, 36).UseWall((ushort)ModContent.WallType(), 72, 36); var tile361 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 2, 32).UseFrame(18, 54).UseWall((ushort)ModContent.WallType(), 252, 72); var tile362 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile363 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 36, 0); - var tile364 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 252, 36); - var tile365 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile366 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile367 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 216, 36); - var tile368 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 396, 0); - var tile369 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile363 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 0, 32).UseFrame(64, 0).UseWall((ushort)ModContent.WallType(), 36, 0); + var tile364 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 71, 1, 32).UseFrame(64, 16).UseWall((ushort)ModContent.WallType(), 252, 36); + var tile365 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(64, 32).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile366 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 48).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile367 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 6, 1, 32).UseFrame(64, 64).UseWall((ushort)ModContent.WallType(), 216, 36); + var tile368 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseFrame(64, 80).UseWall((ushort)ModContent.WallType(), 396, 0); + var tile369 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(64, 96).UseWall((ushort)ModContent.WallType(), 72, 36); var tile370 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 168, 1, 32).UseFrame(144, 72).UseWall((ushort)ModContent.WallType(), 288, 36); var tile371 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 91, 1, 4128).UseFrame(54, 54).UseWall((ushort)ModContent.WallType(), 396, 36); var tile372 = new TileDefinitionStructure(TileID.Dirt, false).UseHeaders(0, 11, 0, 0).UseWall((ushort)ModContent.WallType(), 396, 0); var tile373 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 11, 0, 32).UseWall((ushort)ModContent.WallType(), 396, 0); var tile374 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(0, 18).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile375 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 72, 0); - var tile376 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 360, 0); - var tile377 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile378 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 36, 36); - var tile379 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 360, 72); - var tile380 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 72, 36); - var tile381 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile375 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 0, 32).UseFrame(80, 0).UseWall((ushort)ModContent.WallType(), 72, 0); + var tile376 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 10, 0, 32).UseFrame(80, 16).UseWall((ushort)ModContent.WallType(), 360, 0); + var tile377 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 32).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile378 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 1, 1, 32).UseFrame(80, 48).UseWall((ushort)ModContent.WallType(), 36, 36); + var tile379 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 138, 2, 32).UseFrame(80, 64).UseWall((ushort)ModContent.WallType(), 360, 72); + var tile380 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 80).UseWall((ushort)ModContent.WallType(), 72, 36); + var tile381 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 66, 1, 32).UseFrame(80, 96).UseWall((ushort)ModContent.WallType(), 72, 36); var tile382 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 42, 0, 32).UseFrame(216, 36).UseWall((ushort)ModContent.WallType(), 360, 0); var tile383 = new TileDefinitionStructure(TileID.HangingLanterns).UseHeaders(0, 1, 1, 32).UseFrame(0, 558).UseLiquid(LiquidState.Water, 255).UseWall((ushort)ModContent.WallType(), 36, 36); var tile384 = new TileDefinitionStructure(ModContent.TileType()).UseHeaders(0, 74, 1, 32).UseLiquid(LiquidState.Water, 255).UseWall((ushort)ModContent.WallType(), 360, 36); diff --git a/Schematics/TilePlacementHelpers.cs b/Schematics/TilePlacementHelpers.cs index 5e0104bd00..dc05c87c0c 100644 --- a/Schematics/TilePlacementHelpers.cs +++ b/Schematics/TilePlacementHelpers.cs @@ -228,7 +228,7 @@ namespace CalamityMod.Schematics } else if (tileType == ModContent.TileType()) { - TileEntity.PlaceEntityNet(x, y, ModContent.TileEntityType()); + TileEntity.PlaceEntityNet(x, y, ModContent.TileEntityType()); } } diff --git a/TileEntities/TEChargingStation.cs b/TileEntities/TEChargingStation.cs index dec1d66951..21aacb375f 100644 --- a/TileEntities/TEChargingStation.cs +++ b/TileEntities/TEChargingStation.cs @@ -15,6 +15,7 @@ namespace CalamityMod.TileEntities { public class TEChargingStation : ModTileEntity { + public Vector2 Center => Position.ToWorldCoordinates(8f * ChargingStation.Width, 8f * ChargingStation.Height); private short ChargingTimer = 0; private short _stack = 0; public short CellStack @@ -152,15 +153,8 @@ namespace CalamityMod.TileEntities continue; CalamityPlayer mp = p.Calamity(); - TEChargingStation charger = mp.CurrentlyViewedCharger; - if (charger is null) - continue; - if (charger.ID == ID) - { - mp.CurrentlyViewedCharger = null; - mp.CurrentlyViewedChargerX = -1; - mp.CurrentlyViewedChargerY = -1; - } + if (mp.CurrentlyViewedChargerID == ID) + mp.CurrentlyViewedChargerID = -1; } } diff --git a/TileEntities/TEDraedonHologram.cs b/TileEntities/TEDraedonHologram.cs deleted file mode 100644 index a63a7e07c9..0000000000 --- a/TileEntities/TEDraedonHologram.cs +++ /dev/null @@ -1,72 +0,0 @@ -using CalamityMod.Tiles.DraedonStructures; -using System.IO; -using Terraria; -using Terraria.ID; -using Terraria.ModLoader; - -namespace CalamityMod.TileEntities -{ - public class TEDraedonHologram : ModTileEntity - { - public bool PoppingUp; - public const float PopupDistance = 560f; - public override bool ValidTile(int i, int j) - { - Tile tile = Main.tile[i, j]; - return tile.active() && tile.type == ModContent.TileType(); - } - - // Sync the tile entity the moment it is place on the server. - // This is done to cause it to register among all clients. - public override void OnNetPlace() => NetMessage.SendData(MessageID.TileEntitySharing, -1, -1, null, ID, Position.X, Position.Y); - public override void NetSend(BinaryWriter writer, bool lightSend) - { - writer.Write(PoppingUp); - } - public override void NetReceive(BinaryReader reader, bool lightReceive) - { - PoppingUp = reader.ReadBoolean(); - } - - // Check if the hologram should become visible. - public override void Update() - { - bool wasPoppingUp = PoppingUp; - - // Stop popping up by default. - PoppingUp = false; - - // But check if a player is nearby. - // If one is, pop up. - foreach (var player in Main.player) - { - if (!player.active) - continue; - if (player.DistanceSQ(Position.ToWorldCoordinates()) < PopupDistance * PopupDistance) - { - if (!PoppingUp) - { - PoppingUp = true; - } - break; - } - } - - // If the popup state changes, sync the tile entity across all clients. - if (PoppingUp != wasPoppingUp) - NetMessage.SendData(MessageID.TileEntitySharing, -1, -1, null, ID, Position.X, Position.Y); - } - public override int Hook_AfterPlacement(int i, int j, int type, int style, int direction) - { - // If in multiplayer, tell the server to place the tile entity and DO NOT place it yourself. That would mismatch IDs. - // Also tell the server that you placed the 6x7 tiles that make up the Charging Station. - if (Main.netMode == NetmodeID.MultiplayerClient) - { - NetMessage.SendTileRange(Main.myPlayer, i, j, DraedonHologram.Width, DraedonHologram.Height); - NetMessage.SendData(MessageID.TileEntityPlacement, -1, -1, null, i, j, Type); - return -1; - } - return Place(i, j); - } - } -} diff --git a/TileEntities/TELabHologramProjector.cs b/TileEntities/TELabHologramProjector.cs new file mode 100644 index 0000000000..c48c1e714b --- /dev/null +++ b/TileEntities/TELabHologramProjector.cs @@ -0,0 +1,126 @@ +using CalamityMod.CalPlayer; +using CalamityMod.Tiles.DraedonStructures; +using Microsoft.Xna.Framework; +using System.IO; +using System.Reflection; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.TileEntities +{ + public class TELabHologramProjector : ModTileEntity + { + public const float PopupDistance = 560f; + + public Vector2 Center => Position.ToWorldCoordinates(LabHologramProjector.Width * 8f, LabHologramProjector.Height * 8f); + public bool PoppingUp = false; + + public override bool ValidTile(int i, int j) + { + Tile tile = Main.tile[i, j]; + return tile.active() && tile.type == ModContent.TileType(); + } + + // Check if the hologram should become visible. + public override void Update() + { + bool wasPoppingUp = PoppingUp; + + // Stop popping up by default. + PoppingUp = false; + + // But check if a player is nearby. + // If one is, pop up. + Vector2 projectorCenterPos = Center; + float distSQ = PopupDistance * PopupDistance; + for(int i = 0; i < Main.maxPlayers; ++i) + { + Player p = Main.player[i]; + if (!p.active) // The lack of a dead check is intentional. Dead players keep hologram boxes on for amusement. + continue; + if (p.DistanceSQ(projectorCenterPos) < distSQ) + { + PoppingUp = true; + break; + } + } + + if (PoppingUp != wasPoppingUp) + SendSyncPacket(); + } + + // This code is called as a hook when the player places the Lab Hologram Projector tile so that the tile entity may be placed. + public override int Hook_AfterPlacement(int i, int j, int type, int style, int direction) + { + // If in multiplayer, tell the server to place the tile entity and DO NOT place it yourself. That would mismatch IDs. + // Also tell the server that you placed the 6x7 tiles that make up the Lab Hologram Projector. + if (Main.netMode == NetmodeID.MultiplayerClient) + { + NetMessage.SendTileRange(Main.myPlayer, i, j, LabHologramProjector.Width, LabHologramProjector.Height); + NetMessage.SendData(MessageID.TileEntityPlacement, -1, -1, null, i, j, Type); + return -1; + } + return Place(i, j); + } + + // Sync the tile entity the moment it is place on the server. + // This is done to cause it to register among all clients. + public override void OnNetPlace() => NetMessage.SendData(MessageID.TileEntitySharing, -1, -1, null, ID, Position.X, Position.Y); + + // If this projector breaks, anyone who's viewing it is no longer viewing it. + public override void OnKill() + { + for (int i = 0; i < Main.maxPlayers; ++i) + { + Player p = Main.player[i]; + if (!p.active) + continue; + + // Use reflection to stop TML from spitting an error here. + // Try-catching will not stop this error, TML will print it to console anyway. The error is harmless. + ModPlayer[] mpStorageArray = (ModPlayer[])typeof(Player).GetField("modPlayers", BindingFlags.Instance | BindingFlags.NonPublic).GetValue(p); + if (mpStorageArray.Length == 0) + continue; + + CalamityPlayer mp = p.Calamity(); + if (mp.CurrentlyViewedHologramID == ID) + { + mp.CurrentlyViewedHologramID = -1; + mp.CurrentlyViewedHologramText = string.Empty; + } + } + } + + public override void NetSend(BinaryWriter writer, bool lightSend) => writer.Write(PoppingUp); + public override void NetReceive(BinaryReader reader, bool lightReceive) => PoppingUp = reader.ReadBoolean(); + + private void SendSyncPacket() + { + if (Main.netMode == NetmodeID.SinglePlayer) + return; + ModPacket packet = mod.GetPacket(); + packet.Write((byte)CalamityModMessageType.LabHologramProjector); + packet.Write(ID); + packet.Write(PoppingUp); + packet.Send(-1, -1); + } + + internal static bool ReadSyncPacket(Mod mod, BinaryReader reader) + { + int teID = reader.ReadInt32(); + bool exists = ByID.TryGetValue(teID, out TileEntity te); + + // The rest of the packet must be read even if it turns out the projector doesn't exist for whatever reason. + bool pop = reader.ReadBoolean(); + + if (exists && te is TELabHologramProjector projector) + { + projector.PoppingUp = pop; + return true; + } + return false; + } + } +} diff --git a/TileEntities/TEPowerCellFactory.cs b/TileEntities/TEPowerCellFactory.cs index d84be90b29..9e94a8b088 100644 --- a/TileEntities/TEPowerCellFactory.cs +++ b/TileEntities/TEPowerCellFactory.cs @@ -1,5 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Tiles.DraedonStructures; +using Microsoft.Xna.Framework; using System.IO; using System.Reflection; using Terraria; @@ -12,8 +13,10 @@ namespace CalamityMod.TileEntities { public class TEPowerCellFactory : ModTileEntity { + public Vector2 Center => Position.ToWorldCoordinates(8f * PowerCellFactory.Width, 8f * PowerCellFactory.Height); public long Time = 0; private short _stack = 0; + public short CellStack { get => _stack; @@ -111,15 +114,8 @@ namespace CalamityMod.TileEntities continue; CalamityPlayer mp = p.Calamity(); - TEPowerCellFactory factory = mp.CurrentlyViewedFactory; - if (factory is null) - continue; - if (factory.ID == ID) - { - mp.CurrentlyViewedFactory = null; - mp.CurrentlyViewedFactoryX = -1; - mp.CurrentlyViewedFactoryY = -1; - } + if (mp.CurrentlyViewedFactoryID == ID) + mp.CurrentlyViewedFactoryID = -1; } } diff --git a/Tiles/DraedonStructures/AgedSecurityChestTile.cs b/Tiles/DraedonStructures/AgedSecurityChestTile.cs index 80735cc25c..eb5b5cfbde 100644 --- a/Tiles/DraedonStructures/AgedSecurityChestTile.cs +++ b/Tiles/DraedonStructures/AgedSecurityChestTile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.Items.Placeables.DraedonStructures; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; diff --git a/Tiles/DraedonStructures/ChargingStation.cs b/Tiles/DraedonStructures/ChargingStation.cs index a3b0038f35..cecb2b90b8 100644 --- a/Tiles/DraedonStructures/ChargingStation.cs +++ b/Tiles/DraedonStructures/ChargingStation.cs @@ -1,6 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.DraedonMisc; -using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables.DraedonStructures; using CalamityMod.TileEntities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -84,21 +84,15 @@ namespace CalamityMod.Tiles.DraedonStructures public override bool NewRightClick(int i, int j) { - Tile t = Main.tile[i, j]; - int left = i - t.frameX % (Width * SheetSquare) / SheetSquare; - int top = j - t.frameY % (Height * SheetSquare) / SheetSquare; TEChargingStation thisCharger = CalamityUtils.FindTileEntity(i, j, Width, Height, SheetSquare); - Player player = Main.LocalPlayer; player.CancelSignsAndChests(); CalamityPlayer mp = player.Calamity(); - TEChargingStation viewedCharger = mp.CurrentlyViewedCharger; // If this is the charger the player is currently looking at OR this charger doesn't really exist, close the GUI. - if (viewedCharger != null && (thisCharger is null || thisCharger.ID == viewedCharger.ID)) + if (thisCharger is null || thisCharger.ID == mp.CurrentlyViewedChargerID) { - mp.CurrentlyViewedCharger = null; - mp.CurrentlyViewedChargerX = mp.CurrentlyViewedChargerY = -1; + mp.CurrentlyViewedChargerID = -1; Main.PlaySound(SoundID.MenuClose); } @@ -106,13 +100,8 @@ namespace CalamityMod.Tiles.DraedonStructures else if (thisCharger != null) { // Play a sound depending on whether the player had another charger open previously. - Main.PlaySound(mp.CurrentlyViewedCharger is null ? SoundID.MenuOpen : SoundID.MenuTick); - - // Ensure that the UI position is always centered and above the tile. - mp.CurrentlyViewedChargerX = left * 16; - mp.CurrentlyViewedChargerY = top * 16; - mp.CurrentlyViewedCharger = thisCharger; - + Main.PlaySound(mp.CurrentlyViewedChargerID == -1 ? SoundID.MenuOpen : SoundID.MenuTick); + mp.CurrentlyViewedChargerID = thisCharger.ID; Main.playerInventory = true; Main.recBigList = false; } diff --git a/Tiles/DraedonStructures/DraedonLabFieldGenerator.png b/Tiles/DraedonStructures/DraedonLabFieldGenerator.png deleted file mode 100644 index b7a19a3bddb5d5e0a44df5b5d9950c6a6c985090..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 280 zcmeAS@N?(olHy`uVBq!ia0vp^0wB!61|;P_|4#%`jKx9jP7LeL$-D$|SkfJR9T^xl z_H+M9WCij$3p^r=85sEXgD|57Yp@DXaIL3{V~B-+@}K|z?U{`dl9Qc99hmpm{Y`2y zI@rMJHJSH;p2PN=4({@&ni{yn^_(IF7>YTM>LoDU=Ih>J&ohk27zjfMnU!mET| z8vM**VPPBY*S^g;$kczomg(||ZA}cjemrw-KWOqbhJpL*_xW~BFWdX&8ZspsTKg5` z?Ps(db=y6qW8SmElfma%4I1)(); - TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(hologramTileEntity.Hook_AfterPlacement, -1, 0, true); + ModTileEntity te = ModContent.GetInstance(); + TileObjectData.newTile.HookPostPlaceMyPlayer = new PlacementHook(te.Hook_AfterPlacement, -1, 0, true); - // Don't die if lava is touching this tile. - TileObjectData.newTile.LavaDeath = false; TileObjectData.addTile(Type); + ModTranslation name = CreateMapEntryName(); + name.SetDefault("Lab Hologram Projector"); + AddMapEntry(new Color(99, 131, 199)); animationFrameHeight = 112; - soundType = SoundID.Tink; - // Spawn electric sparks when this tile is hit with a pickaxe. dustType = 229; - - AddMapEntry(new Color(99, 131, 199)); + soundType = SoundID.Tink; } public override bool CanExplode(int i, int j) => false; + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + // Drop the projector itself. + Item.NewItem(i * 16, j * 16, 16, 32, ModContent.ItemType()); + + Tile tile = Main.tile[i, j]; + int left = i - tile.frameX % (Width * SheetSquare) / SheetSquare; + int top = j - tile.frameY % (Height * SheetSquare) / SheetSquare; + + // Kill the hosted tile entity directly and immediately. + TELabHologramProjector hologramTileEntity = CalamityUtils.FindTileEntity(i, j, Width, Height, SheetSquare); + hologramTileEntity?.Kill(left, top); + } + public override bool NewRightClick(int i, int j) { Player player = Main.LocalPlayer; - if (player.Calamity().CurrentlyViewedHologramX == -1 || - player.Calamity().CurrentlyViewedHologramY == -1) + CalamityPlayer mp = player.Calamity(); + + if (mp.CurrentlyViewedHologramID == -1) { - Main.PlaySound(SoundID.Chat, -1, -1, 1, 1f, 0f); - player.Calamity().CurrentlyViewedHologramX = i; - player.Calamity().CurrentlyViewedHologramY = j; - player.talkNPC = -1; + TELabHologramProjector projector = CalamityUtils.FindTileEntity(i, j, Width, Height, SheetSquare); + mp.CurrentlyViewedHologramID = projector?.ID ?? -1; + if (mp.CurrentlyViewedHologramID != -1) + { + Main.PlaySound(SoundID.Chat, -1, -1, 1, 1f, 0f); + player.talkNPC = -1; + } } else - { - player.Calamity().CurrentlyViewedHologramX = player.Calamity().CurrentlyViewedHologramY = -1; - } + mp.CurrentlyViewedHologramID = -1; + return true; } @@ -79,11 +98,14 @@ namespace CalamityMod.Tiles.DraedonStructures Tile trackTile = Main.tile[i, j]; int time = (int)(Main.GlobalTime * 60); - TEDraedonHologram hologramTileEntity = CalamityUtils.FindTileEntity(i, j, Width, Height, SheetSquare); + TELabHologramProjector hologramTileEntity = CalamityUtils.FindTileEntity(i, j, Width, Height, SheetSquare); + bool popup = false; + if (hologramTileEntity != null && hologramTileEntity.PoppingUp) + popup = true; // Frame cycling. Idly moves when the hologram is visible. int frame = time / 5 % FrameCount; - if (hologramTileEntity != null && hologramTileEntity.PoppingUp) + if (popup) { if (frame <= IdleFrames) frame += IdleFrames; @@ -104,7 +126,7 @@ namespace CalamityMod.Tiles.DraedonStructures xPos += frame / 8 * 96; yPos += frame % 8 * 112; - Texture2D tileTexture = ModContent.GetTexture("CalamityMod/Tiles/DraedonStructures/DraedonHologram"); + Texture2D tileTexture = ModContent.GetTexture("CalamityMod/Tiles/DraedonStructures/LabHologramProjector"); Vector2 offset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); Vector2 drawOffset = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + offset; Color drawColor = Lighting.GetColor(i, j); @@ -115,17 +137,5 @@ namespace CalamityMod.Tiles.DraedonStructures spriteBatch.Draw(tileTexture, drawOffset + Vector2.UnitY * 8f, new Rectangle(xPos, yPos, 16, 16), drawColor, 0.0f, Vector2.Zero, 1f, SpriteEffects.None, 0.0f); return false; } - - public override void KillMultiTile(int i, int j, int frameX, int frameY) - { - Tile tile = Main.tile[i, j]; - int left = i - tile.frameX % (Width * SheetSquare) / SheetSquare; - int top = j - tile.frameY % (Height * SheetSquare) / SheetSquare; - TEDraedonHologram hologramTileEntity = CalamityUtils.FindTileEntity(i, j, Width, Height, SheetSquare); - - Item.NewItem(i * 16, j * 16, 16, 32, ModContent.ItemType()); - - hologramTileEntity?.Kill(left, top); - } } } diff --git a/Tiles/DraedonStructures/DraedonHologram.png b/Tiles/DraedonStructures/LabHologramProjector.png similarity index 100% rename from Tiles/DraedonStructures/DraedonHologram.png rename to Tiles/DraedonStructures/LabHologramProjector.png diff --git a/Tiles/DraedonStructures/PowerCellFactory.cs b/Tiles/DraedonStructures/PowerCellFactory.cs index c91b8448c0..851273c9a7 100644 --- a/Tiles/DraedonStructures/PowerCellFactory.cs +++ b/Tiles/DraedonStructures/PowerCellFactory.cs @@ -1,6 +1,6 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.DraedonMisc; -using CalamityMod.Items.Placeables; +using CalamityMod.Items.Placeables.DraedonStructures; using CalamityMod.TileEntities; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; @@ -82,7 +82,7 @@ namespace CalamityMod.Tiles.DraedonStructures int top = j - t.frameY % (Height * SheetSquare) / SheetSquare; // Drop any cells contained in the factory. - TEPowerCellFactory factory = CalamityUtils.FindTileEntity(i, j, Width, Height, 18); + TEPowerCellFactory factory = CalamityUtils.FindTileEntity(i, j, Width, Height, SheetSquare); int numCells = factory?.CellStack ?? 0; if (numCells > 0) Item.NewItem(new Vector2(i, j) * 16f, ModContent.ItemType(), numCells); @@ -92,20 +92,15 @@ namespace CalamityMod.Tiles.DraedonStructures public override bool NewRightClick(int i, int j) { - Tile t = Main.tile[i, j]; TEPowerCellFactory thisFactory = CalamityUtils.FindTileEntity(i, j, Width, Height, SheetSquare); - Player player = Main.LocalPlayer; player.CancelSignsAndChests(); - CalamityPlayer mp = player.Calamity(); - TEPowerCellFactory viewedFactory = mp.CurrentlyViewedFactory; // If this is the factory the player is currently looking at OR this factory doesn't really exist, close the GUI. - if (viewedFactory != null && (thisFactory is null || thisFactory.ID == viewedFactory.ID)) + if (thisFactory is null || thisFactory.ID == mp.CurrentlyViewedFactoryID) { - mp.CurrentlyViewedFactory = null; - mp.CurrentlyViewedFactoryX = mp.CurrentlyViewedFactoryY = -1; + mp.CurrentlyViewedFactoryID = -1; Main.PlaySound(SoundID.MenuClose); } @@ -113,15 +108,8 @@ namespace CalamityMod.Tiles.DraedonStructures else if (thisFactory != null) { // Play a sound depending on whether the player had another factory open previously. - Main.PlaySound(mp.CurrentlyViewedFactory is null ? SoundID.MenuOpen : SoundID.MenuTick); - - // Ensure that the UI position is always centered and above the tile. - int left = i - t.frameX % (Width * SheetSquare) / SheetSquare; - int top = j - t.frameY % (Height * SheetSquare) / SheetSquare; - mp.CurrentlyViewedFactoryX = left * 16 + 16; - mp.CurrentlyViewedFactoryY = top * 16; - mp.CurrentlyViewedFactory = thisFactory; - + Main.PlaySound(mp.CurrentlyViewedFactoryID == -1 ? SoundID.MenuOpen : SoundID.MenuTick); + mp.CurrentlyViewedFactoryID = thisFactory.ID; Main.playerInventory = true; Main.recBigList = false; } diff --git a/Tiles/DraedonStructures/SecurityChestTile.cs b/Tiles/DraedonStructures/SecurityChestTile.cs index 8c1d3564bc..b6fb5769ca 100644 --- a/Tiles/DraedonStructures/SecurityChestTile.cs +++ b/Tiles/DraedonStructures/SecurityChestTile.cs @@ -1,4 +1,4 @@ -using CalamityMod.Items.Placeables.Furniture; +using CalamityMod.Items.Placeables.DraedonStructures; using Microsoft.Xna.Framework; using Terraria; using Terraria.ID; diff --git a/UI/ChargingStationUI.cs b/UI/ChargingStationUI.cs index ecbd3c2018..dbf57a91d4 100644 --- a/UI/ChargingStationUI.cs +++ b/UI/ChargingStationUI.cs @@ -1,11 +1,11 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.DraedonMisc; using CalamityMod.TileEntities; -using CalamityMod.Tiles.DraedonStructures; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; using Terraria.UI; @@ -27,25 +27,36 @@ namespace CalamityMod.UI { Player p = Main.LocalPlayer; CalamityPlayer mp = p.Calamity(); - TEChargingStation charger = mp.CurrentlyViewedCharger; + int chargerID = mp.CurrentlyViewedChargerID; // The UI only draws if the player is viewing a charger. - if (charger is null) + if (chargerID == -1) return; + // Check if this tile entity ID is actually a charger. If it's not, immediately destroy this UI. + TEChargingStation charger; + bool chargerIsValid = TileEntity.ByID.TryGetValue(chargerID, out TileEntity te); + if (chargerIsValid && te is TEChargingStation cast) + charger = cast; + else + { + mp.CurrentlyViewedChargerID = -1; + return; + } + // If the player's inventory isn't open, or they have a chest open, immediately destroy this UI. if (!Main.playerInventory || p.chest != -1) { - mp.CurrentlyViewedCharger = null; + mp.CurrentlyViewedChargerID = -1; return; } // If the player is too far away from their viewed charger, immediately destroy this UI and play the menu close sound. - Vector2 chargerWorldCenter = charger.Position.ToWorldCoordinates(8f * ChargingStation.Width, 8f * ChargingStation.Height); - if (Vector2.DistanceSquared(p.Center, chargerWorldCenter) > MaxPlayerDistance * MaxPlayerDistance) + Vector2 chargerWorldCenter = charger.Center; + if (p.DistanceSQ(chargerWorldCenter) > MaxPlayerDistance * MaxPlayerDistance) { Main.PlaySound(SoundID.MenuClose); - mp.CurrentlyViewedCharger = null; + mp.CurrentlyViewedChargerID = -1; return; } @@ -61,7 +72,7 @@ namespace CalamityMod.UI powercell.stack = charger.CellStack; } - Vector2 uiBasePos = new Vector2(mp.CurrentlyViewedChargerX, mp.CurrentlyViewedChargerY); + Vector2 uiBasePos = charger.Position.ToWorldCoordinates(0f, 0f); // Draw the charger's plugged item and the power cells (if any) as inventory slots. Vector2 pluggedDrawPos = uiBasePos + new Vector2(SlotDrawOffsetX, PluggedDrawOffsetY) - Main.screenPosition; diff --git a/UI/DraedonHologramChatUI.cs b/UI/DraedonHologramChatUI.cs deleted file mode 100644 index 6aa7babcf6..0000000000 --- a/UI/DraedonHologramChatUI.cs +++ /dev/null @@ -1,84 +0,0 @@ -using CalamityMod.CalPlayer; -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using System.Collections.Generic; -using Terraria; - -namespace CalamityMod.UI -{ - public class DraedonHologramChatUI - { - public const float TextPadding = 170f; - public const float TextAreaWidth = 800f; - public const float YOffsetPerLine = 30f; - public static string SelectDiaglog() - { - List potentialDiaglogOptions = new List() - { - "To any personnel engaged in the laboratories. Please wear your steel engraved ID badge at all times. It is the easiest method to discern your body if any accidents do occur.", - "To experiment is to fail. To fail is to learn. To learn is to advance.", - "Apparent danger while researching serves only to enhance the research experience.", - - "Laser-type weapon prototypes are incredibly lethal and are not to be used within presentation halls.", - "High-energy plasma emissions have adverse effects on both flesh and metal. Do not attempt to handle vented plasma.", - "Electric shocks from military equipment are intended to be fatal. If you survive such a shock, that is a clear indicator that the device is not functioning properly. Please report any such cases.", - "All employees are hereby notified that they will be held accountable for any collateral damage caused by Gauss weapon fire, even during sanctioned testing exercises.", - "Security Field Emitters will vaporize all unauthorized equipment and personnel. Please leave personal effects in the designated lockers off-site. This also means: Do not bring any family members who are not enlisted as personnel.", - - "If one does manage to breach restricted testing facilities, do at least record any unexpected burns, lacerations, bruising, fractur... ...trauma, shocks and otherwise. Thank you.", - "The power grid has been... ...eavily compromised. Abort research and proceed to the emergency exits located at... ...and egress with haste.", - "Notify the Security Department of any aggressive local fauna immediately." - }; - if (NPC.downedAncientCultist) - potentialDiaglogOptions.Add("Sensors have detected a significant breach in the spacetime continuum."); - if (Main.rand.NextBool(5000)) - return "Please help. I'm stuck in this hologram machine."; - return Main.rand.Next(potentialDiaglogOptions.ToArray()); - } - public static void Draw(SpriteBatch spriteBatch) - { - CalamityPlayer player = Main.LocalPlayer.Calamity(); - if (player.CurrentlyViewedHologramX == -1 || player.CurrentlyViewedHologramY == -1) - return; - - if (string.IsNullOrEmpty(player.CurrentlyViewedHologramText)) - player.CurrentlyViewedHologramText = SelectDiaglog(); - - Color backgroundColor = new Color(200, 200, 200, 200); - string[] dialogLines = Utils.WordwrapString(player.CurrentlyViewedHologramText, Main.fontMouseText, (int)(TextAreaWidth - TextPadding * 2), 10, out int lineCount); - spriteBatch.Draw(Main.chatBackTexture, - new Vector2(Main.screenWidth / 2 - Main.chatBackTexture.Width / 2, 100f), - new Rectangle(0, 0, Main.chatBackTexture.Width, (lineCount + 2) * 30), - backgroundColor, - 0f, - Vector2.Zero, - 1f, - SpriteEffects.None, - 0f); - spriteBatch.Draw(Main.chatBackTexture, - new Vector2(Main.screenWidth / 2 - Main.chatBackTexture.Width / 2, 100 + (lineCount + 2) * 30), - new Rectangle(0, Main.chatBackTexture.Height - 30, Main.chatBackTexture.Width, 30), - backgroundColor, - 0f, - Vector2.Zero, - 1f, - SpriteEffects.None, - 0f); - - for (int i = 0; i < lineCount + 1; i++) - { - if (dialogLines[i] != null) - { - Utils.DrawBorderStringFourWay(spriteBatch, - Main.fontMouseText, - dialogLines[i], - (int)TextPadding + (int)(Main.screenWidth - TextAreaWidth) / 2, - 120 + i * YOffsetPerLine, - Color.Cyan, - Color.Black, - Vector2.Zero); - } - } - } - } -} diff --git a/UI/LabHologramProjectorUI.cs b/UI/LabHologramProjectorUI.cs new file mode 100644 index 0000000000..38ef84aeb4 --- /dev/null +++ b/UI/LabHologramProjectorUI.cs @@ -0,0 +1,103 @@ +using CalamityMod.CalPlayer; +using CalamityMod.TileEntities; +using Terraria.ID; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using System.Collections.Generic; +using Terraria; +using Terraria.DataStructures; + +namespace CalamityMod.UI +{ + public class LabHologramProjectorUI + { + public const float MaxPlayerDistance = 120f; + public const float TextPadding = 170f; + public const float TextAreaWidth = 800f; + public const float YOffsetPerLine = 30f; + public static string ChooseDialogue() + { + List dialogueOptions = new List() + { + "To any personnel engaged in the laboratories. Please wear your steel engraved ID badge at all times. It is the easiest method to discern your body if any accidents do occur.", + "To experiment is to fail. To fail is to learn. To learn is to advance.", + "Apparent danger while researching serves only to enhance the research experience.", + + "Laser-type weapon prototypes are incredibly lethal and are not to be used within presentation halls.", + "High-energy plasma emissions have adverse effects on both flesh and metal. Do not attempt to handle vented plasma.", + "Electric shocks from military equipment are intended to be fatal. If you survive such a shock, that is a clear indicator that the device is not functioning properly. Please report any such cases.", + "All employees are hereby notified that they will be held accountable for any collateral damage caused by Gauss weapon fire, even during sanctioned testing exercises.", + "Security Field Emitters will vaporize all unauthorized equipment and personnel. Please leave personal effects in the designated lockers off-site. This also means: Do not bring any family members who are not enlisted as personnel.", + + "If one does manage to breach restricted testing facilities, do at least record any unexpected burns, lacerations, bruising, fractur... ...trauma, shocks and otherwise. Thank you.", + "The power grid has been... ...eavily compromised. Abort research and proceed to the emergency exits located at... ...and egress with haste.", + "Notify the Security Department of any aggressive local fauna immediately." + }; + if (NPC.downedAncientCultist) + dialogueOptions.Add("Sensors have detected a significant breach in the spacetime continuum."); + + return Main.rand.NextBool(5000) ? "Please help. I'm stuck in this hologram machine." : Main.rand.Next(dialogueOptions.ToArray()); + } + public static void Draw(SpriteBatch spriteBatch) + { + Player p = Main.LocalPlayer; + CalamityPlayer mp = p.Calamity(); + int projectorID = mp.CurrentlyViewedHologramID; + + // The UI only draws if the player is viewing a projector. + if (projectorID == -1) + return; + + // Check if this tile entity ID is actually a projector. If it's not, immediately destroy this UI. + TELabHologramProjector projector; + bool projectorIsValid = TileEntity.ByID.TryGetValue(projectorID, out TileEntity te); + if (projectorIsValid && te is TELabHologramProjector cast) + projector = cast; + else + { + mp.CurrentlyViewedHologramID = -1; + mp.CurrentlyViewedHologramText = string.Empty; + return; + } + + // If the player is too far away from their viewed projector, immediately destroy this UI and play the menu close sound. + Vector2 projectorWorldCenter = projector.Center; + if (p.DistanceSQ(projectorWorldCenter) > MaxPlayerDistance * MaxPlayerDistance) + { + Main.PlaySound(SoundID.MenuClose); + mp.CurrentlyViewedHologramID = -1; + mp.CurrentlyViewedHologramText = string.Empty; + return; + } + + // Pick text to display, if it has not already been picked. + if (string.IsNullOrEmpty(mp.CurrentlyViewedHologramText)) + mp.CurrentlyViewedHologramText = ChooseDialogue(); + + Color backgroundColor = new Color(200, 200, 200, 200); + + // Wrap the text so that it neatly fits in the dialogue box. + string[] dialogLines = Utils.WordwrapString(mp.CurrentlyViewedHologramText, Main.fontMouseText, (int)(TextAreaWidth - TextPadding * 2), 10, out int lineCount); + + // Draw the background of the text box. + spriteBatch.Draw(Main.chatBackTexture, new Vector2(Main.screenWidth / 2 - Main.chatBackTexture.Width / 2, 100f), + new Rectangle(0, 0, Main.chatBackTexture.Width, (lineCount + 2) * 30), backgroundColor, 0f, Vector2.Zero, 1f, + SpriteEffects.None, 0f); + spriteBatch.Draw(Main.chatBackTexture, + new Vector2(Main.screenWidth / 2 - Main.chatBackTexture.Width / 2, 100 + (lineCount + 2) * 30), + new Rectangle(0, Main.chatBackTexture.Height - 30, Main.chatBackTexture.Width, 30), backgroundColor, 0f, + Vector2.Zero, 1f, SpriteEffects.None, 0f); + + // Draw the dialogue itself. + for (int i = 0; i < lineCount + 1; i++) + { + string text = dialogLines[i]; + if (text is null) + continue; + Utils.DrawBorderStringFourWay(spriteBatch, Main.fontMouseText, dialogLines[i], + (int)TextPadding + (int)(Main.screenWidth - TextAreaWidth) / 2, 120 + i * YOffsetPerLine, Color.Cyan, Color.Black, + Vector2.Zero); + } + } + } +} diff --git a/UI/PowerCellFactoryUI.cs b/UI/PowerCellFactoryUI.cs index df23d3e632..ea4dbefca1 100644 --- a/UI/PowerCellFactoryUI.cs +++ b/UI/PowerCellFactoryUI.cs @@ -1,11 +1,11 @@ using CalamityMod.CalPlayer; using CalamityMod.Items.DraedonMisc; using CalamityMod.TileEntities; -using CalamityMod.Tiles.DraedonStructures; using Microsoft.Xna.Framework; using Microsoft.Xna.Framework.Graphics; using System; using Terraria; +using Terraria.DataStructures; using Terraria.ID; using Terraria.ModLoader; @@ -16,32 +16,43 @@ namespace CalamityMod.UI public const float MaxPlayerDistance = 160f; private const int GuiWidth = 36; private const int GuiHeight = 36; - private const float SlotDrawOffsetX = 16f; + private const float SlotDrawOffsetX = 32f; private const float SlotDrawOffsetY = -14f; public static void Draw(SpriteBatch spriteBatch) { Player p = Main.LocalPlayer; CalamityPlayer mp = p.Calamity(); - TEPowerCellFactory factory = mp.CurrentlyViewedFactory; + int factoryID = mp.CurrentlyViewedFactoryID; // The UI only draws if the player is viewing a factory. - if (factory is null) + if (factoryID == -1) return; + // Check if this tile entity ID is actually a factory. If it's not, immediately destroy this UI. + TEPowerCellFactory factory; + bool factoryIsValid = TileEntity.ByID.TryGetValue(factoryID, out TileEntity te); + if (factoryIsValid && te is TEPowerCellFactory cast) + factory = cast; + else + { + mp.CurrentlyViewedFactoryID = -1; + return; + } + // If the player's inventory isn't open, or they have a chest open, immediately destroy this UI. if (!Main.playerInventory || p.chest != -1) { - mp.CurrentlyViewedFactory = null; + mp.CurrentlyViewedFactoryID = -1; return; } // If the player is too far away from their viewed factory, immediately destroy this UI and play the menu close sound. - Vector2 factoryWorldCenter = factory.Position.ToWorldCoordinates(8f * PowerCellFactory.Width, 8f * PowerCellFactory.Height); - if (Vector2.DistanceSquared(p.Center, factoryWorldCenter) > MaxPlayerDistance * MaxPlayerDistance) + Vector2 factoryWorldCenter = factory.Center; + if (p.DistanceSQ(factoryWorldCenter) > MaxPlayerDistance * MaxPlayerDistance) { Main.PlaySound(SoundID.MenuClose); - mp.CurrentlyViewedFactory = null; + mp.CurrentlyViewedFactoryID = -1; return; } @@ -55,7 +66,7 @@ namespace CalamityMod.UI powercell.stack = factory.CellStack; } - Vector2 uiBasePos = new Vector2(mp.CurrentlyViewedFactoryX, mp.CurrentlyViewedFactoryY); + Vector2 uiBasePos = factory.Position.ToWorldCoordinates(0f, 0f); // Draw the factory's stored item as an inventory slot. Vector2 powercellDrawPos = uiBasePos + new Vector2(SlotDrawOffsetX, SlotDrawOffsetY) - Main.screenPosition;