Why are tiles a fuck (Eutrophic shelf fix)
Fixes left-anchored Eutrophic Shelf tiles
This commit is contained in:
1 file changed
+8
-2
@@ -10,6 +10,11 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
|
||||
{
|
||||
public class EutrophicCrafting : ModTile
|
||||
{
|
||||
//
|
||||
// Note from Ozzatron:
|
||||
// It's highly recommended you don't touch this code unless absolutely necessary.
|
||||
// Even slightly changing the way that this tile initializes could re-introduce the Ancients Awakened worldgen bug.
|
||||
//
|
||||
public override void SetDefaults()
|
||||
{
|
||||
Main.tileLighted[Type] = true;
|
||||
@@ -19,15 +24,16 @@ namespace CalamityMod.Tiles.Furniture.CraftingStations
|
||||
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3);
|
||||
TileObjectData.newTile.StyleHorizontal = true;
|
||||
// Remove the bottom anchor entirely, this thing hangs from the wall.
|
||||
TileObjectData.newTile.AnchorBottom = new AnchorData(AnchorType.None, 0, 0);
|
||||
TileObjectData.newTile.AnchorBottom = AnchorData.Empty;
|
||||
TileObjectData.newTile.AnchorRight = new AnchorData(AnchorType.SolidTile, 2, 1);
|
||||
|
||||
// When this Direction property set executes, newTile._tileObjectBase gets separated from Style3x3._tileObjectBase.
|
||||
// As such, no data corruption occurs.
|
||||
TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft;
|
||||
TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile);
|
||||
// Add a wall anchor on the opposite side for the alternate style.
|
||||
// Add a wall anchor on the opposite side for the alternate style, and remove the wall anchor that was on the first side.
|
||||
TileObjectData.newAlternate.AnchorLeft = new AnchorData(AnchorType.SolidTile, 2, 1);
|
||||
TileObjectData.newAlternate.AnchorRight = AnchorData.Empty;
|
||||
|
||||
// This line used to corrupt TileObjectData.Style3x3.Direction to PlaceRight. This has now been fixed.
|
||||
TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight;
|
||||
|
||||
Reference in new issue
Block a user