From 2f78131961da7771da866170dca6f807eecd3b8e Mon Sep 17 00:00:00 2001
From: ben-tk <45545085+ben-tk@users.noreply.github.com>
Date: Sun, 12 Dec 2021 14:27:18 -0500
Subject: [PATCH] monolith amalgam no longer counts as a table
---
Tiles/Furniture/CraftingStations/MonolithCrafting.cs | 2 +-
Utilities/FurnitureSetupUtils.cs | 8 +++++---
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/Tiles/Furniture/CraftingStations/MonolithCrafting.cs b/Tiles/Furniture/CraftingStations/MonolithCrafting.cs
index 681bbc9ac1..9b32885d81 100644
--- a/Tiles/Furniture/CraftingStations/MonolithCrafting.cs
+++ b/Tiles/Furniture/CraftingStations/MonolithCrafting.cs
@@ -11,7 +11,7 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
{
public override void SetDefaults()
{
- this.SetUpBookcase(true, false);
+ this.SetUpBookcase(true, false, false);
ModTranslation name = CreateMapEntryName();
name.SetDefault("Monolith Amalgam");
AddMapEntry(new Color(191, 142, 111), name);
diff --git a/Utilities/FurnitureSetupUtils.cs b/Utilities/FurnitureSetupUtils.cs
index c6b5de2ffd..6180a44049 100644
--- a/Utilities/FurnitureSetupUtils.cs
+++ b/Utilities/FurnitureSetupUtils.cs
@@ -604,7 +604,8 @@ namespace CalamityMod
/// The ModTile which is being initialized.
/// Whether this tile is supposed to be immune to lava. Defaults to false.
/// Whether this tile is supposed to have a solid top. Defaults to true.
- internal static void SetUpBookcase(this ModTile mt, bool lavaImmune = false, bool solidTop = true)
+ /// Whether this tile counts as a table for housing. Defaults to true.
+ internal static void SetUpBookcase(this ModTile mt, bool lavaImmune = false, bool solidTop = true, bool table = true)
{
Main.tileSolidTop[mt.Type] = solidTop;
Main.tileLighted[mt.Type] = true;
@@ -616,8 +617,9 @@ namespace CalamityMod
TileObjectData.newTile.LavaDeath = !lavaImmune;
TileObjectData.addTile(mt.Type);
- // All bookcases count as tables.
- mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable);
+ // All bookcases count as tables. Monolith Amalgam does not count as a table.
+ if (table)
+ mt.AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable);
}
///