diff --git a/Tiles/FloralParadise/FloralPlants.png b/Tiles/FloralParadise/FloralPlants.png deleted file mode 100644 index 5df9a4fed8..0000000000 Binary files a/Tiles/FloralParadise/FloralPlants.png and /dev/null differ diff --git a/Tiles/FloralParadise/LargeLogPiles.cs b/Tiles/FloralParadise/LargeLogPiles.cs new file mode 100644 index 0000000000..fefea2c7ea --- /dev/null +++ b/Tiles/FloralParadise/LargeLogPiles.cs @@ -0,0 +1,49 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class LargeLogPiles : ModTile + { + public const int Variants = 2; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 3; + TileObjectData.newTile.Origin = new Point16(1, 2); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + + TileObjectData.addTile(Type); + + DustType = 38; + + AddMapEntry(new Color(114, 72, 49)); + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) + { + offsetY = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 4; + } + } +} diff --git a/Tiles/FloralParadise/LargeLogPiles.png b/Tiles/FloralParadise/LargeLogPiles.png new file mode 100644 index 0000000000..31b13975a6 Binary files /dev/null and b/Tiles/FloralParadise/LargeLogPiles.png differ diff --git a/Tiles/FloralParadise/LargeMossPile.png b/Tiles/FloralParadise/LargeMossPile.png deleted file mode 100644 index 34ad790514..0000000000 Binary files a/Tiles/FloralParadise/LargeMossPile.png and /dev/null differ diff --git a/Tiles/FloralParadise/LargeMossPiles.cs b/Tiles/FloralParadise/LargeMossPiles.cs new file mode 100644 index 0000000000..4516338811 --- /dev/null +++ b/Tiles/FloralParadise/LargeMossPiles.cs @@ -0,0 +1,47 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class LargeMossPiles : ModTile + { + public const int Variants = 4; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.addTile(Type); + + DustType = 38; + + AddMapEntry(new Color(56, 56, 56)); + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) + { + offsetY = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 4; + } + } +} diff --git a/Tiles/FloralParadise/LargeMossPiles.png b/Tiles/FloralParadise/LargeMossPiles.png new file mode 100644 index 0000000000..ee20cf395a Binary files /dev/null and b/Tiles/FloralParadise/LargeMossPiles.png differ diff --git a/Tiles/FloralParadise/LargeSubterraneanGrass.cs b/Tiles/FloralParadise/LargeSubterraneanGrass.cs new file mode 100644 index 0000000000..4c630978a8 --- /dev/null +++ b/Tiles/FloralParadise/LargeSubterraneanGrass.cs @@ -0,0 +1,47 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class LargeSubterraneanGrass : ModTile + { + public const int Variants = 5; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 3; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.addTile(Type); + + DustType = 39; + + AddMapEntry(new Color(106, 163, 74)); + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) + { + offsetY = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 4; + } + } +} diff --git a/Tiles/FloralParadise/LargeSubterraneanGrass.png b/Tiles/FloralParadise/LargeSubterraneanGrass.png new file mode 100644 index 0000000000..4069f95cae Binary files /dev/null and b/Tiles/FloralParadise/LargeSubterraneanGrass.png differ diff --git a/Tiles/FloralParadise/LargeWallFungi.cs b/Tiles/FloralParadise/LargeWallFungi.cs new file mode 100644 index 0000000000..94dc60588b --- /dev/null +++ b/Tiles/FloralParadise/LargeWallFungi.cs @@ -0,0 +1,42 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class LargeWallFungi : ModTile + { + public const int Variants = 3; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorRight = new AnchorData(AnchorType.SolidTile, 2, 0); + TileObjectData.addTile(Type); + DustType = 0; + + AddMapEntry(new Color(165, 126, 84)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FloralParadise/LargeWallFungi.png b/Tiles/FloralParadise/LargeWallFungi.png new file mode 100644 index 0000000000..89c0975133 Binary files /dev/null and b/Tiles/FloralParadise/LargeWallFungi.png differ diff --git a/Tiles/FloralParadise/LargeWallFungiLeft.cs b/Tiles/FloralParadise/LargeWallFungiLeft.cs new file mode 100644 index 0000000000..be2f532e1a --- /dev/null +++ b/Tiles/FloralParadise/LargeWallFungiLeft.cs @@ -0,0 +1,42 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class LargeWallFungiLeft : ModTile + { + public const int Variants = 3; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorLeft = new AnchorData(AnchorType.SolidTile, 2, 0); + TileObjectData.addTile(Type); + DustType = 0; + + AddMapEntry(new Color(165, 126, 84)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FloralParadise/LargeWallFungiLeft.png b/Tiles/FloralParadise/LargeWallFungiLeft.png new file mode 100644 index 0000000000..8e765ea7fd Binary files /dev/null and b/Tiles/FloralParadise/LargeWallFungiLeft.png differ diff --git a/Tiles/FloralParadise/MediumFloralPlants.cs b/Tiles/FloralParadise/MediumFloralPlants.cs new file mode 100644 index 0000000000..ba3aa341ff --- /dev/null +++ b/Tiles/FloralParadise/MediumFloralPlants.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class MediumFloralPlants : ModTile + { + public const int Variants = 8; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.addTile(Type); + + HitSound = SoundID.Grass; + DustType = 2; + AddMapEntry(new Color(106, 135, 69)); + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) + { + offsetY = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 4; + } + + public override void NearbyEffects(int i, int j, bool closer) + { + if (CalamityUtils.ParanoidTileRetrieval(i, j).LiquidAmount > 64) + WorldGen.KillTile(i, j); + } + } +} diff --git a/Tiles/FloralParadise/MediumFloralPlants.png b/Tiles/FloralParadise/MediumFloralPlants.png new file mode 100644 index 0000000000..643c9e94cc Binary files /dev/null and b/Tiles/FloralParadise/MediumFloralPlants.png differ diff --git a/Tiles/FloralParadise/MediumLargeMossPiles.cs b/Tiles/FloralParadise/MediumLargeMossPiles.cs new file mode 100644 index 0000000000..a3a338981b --- /dev/null +++ b/Tiles/FloralParadise/MediumLargeMossPiles.cs @@ -0,0 +1,48 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class MediumLargeMossPiles : ModTile + { + public const int Variants = 4; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 2; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.Origin = new Point16(1, 1); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16, + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + + TileObjectData.addTile(Type); + + DustType = 38; + + AddMapEntry(new Color(56, 56, 56)); + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) + { + offsetY = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 4; + } + } +} diff --git a/Tiles/FloralParadise/MediumLargeMossPiles.png b/Tiles/FloralParadise/MediumLargeMossPiles.png new file mode 100644 index 0000000000..cbf4ace032 Binary files /dev/null and b/Tiles/FloralParadise/MediumLargeMossPiles.png differ diff --git a/Tiles/FloralParadise/LargeMossPile.cs b/Tiles/FloralParadise/MediumMossPiles.cs similarity index 90% rename from Tiles/FloralParadise/LargeMossPile.cs rename to Tiles/FloralParadise/MediumMossPiles.cs index efda69a25b..891572e6fc 100644 --- a/Tiles/FloralParadise/LargeMossPile.cs +++ b/Tiles/FloralParadise/MediumMossPiles.cs @@ -5,15 +5,17 @@ using Terraria.ObjectData; namespace CalamityMod.Tiles.FloralParadise { - public class LargeMossPile : ModTile + public class MediumMossPiles : ModTile { + public const int Variants = 4; + public override void SetStaticDefaults() { Main.tileFrameImportant[Type] = true; Main.tileNoFail[Type] = true; Main.tileObsidianKill[Type] = true; - TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); TileObjectData.addTile(Type); DustType = 38; diff --git a/Tiles/FloralParadise/MediumMossPiles.png b/Tiles/FloralParadise/MediumMossPiles.png new file mode 100644 index 0000000000..05ca5e1d5f Binary files /dev/null and b/Tiles/FloralParadise/MediumMossPiles.png differ diff --git a/Tiles/FloralParadise/FloralPlants.cs b/Tiles/FloralParadise/SmallFloralPlants.cs similarity index 96% rename from Tiles/FloralParadise/FloralPlants.cs rename to Tiles/FloralParadise/SmallFloralPlants.cs index 85ed206dce..675eca54fe 100644 --- a/Tiles/FloralParadise/FloralPlants.cs +++ b/Tiles/FloralParadise/SmallFloralPlants.cs @@ -6,7 +6,7 @@ using Terraria.ObjectData; namespace CalamityMod.Tiles.FloralParadise { - public class FloralPlants : ModTile + public class SmallFloralPlants : ModTile { public override void SetStaticDefaults() { diff --git a/Tiles/FloralParadise/SmallFloralPlants.png b/Tiles/FloralParadise/SmallFloralPlants.png new file mode 100644 index 0000000000..f16c30cd3a Binary files /dev/null and b/Tiles/FloralParadise/SmallFloralPlants.png differ diff --git a/Tiles/FloralParadise/SmallMossPiles.cs b/Tiles/FloralParadise/SmallMossPiles.cs new file mode 100644 index 0000000000..eb8984154d --- /dev/null +++ b/Tiles/FloralParadise/SmallMossPiles.cs @@ -0,0 +1,47 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class SmallMossPiles : ModTile + { + public const int Variants = 4; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + + TileObjectData.addTile(Type); + + DustType = 38; + + AddMapEntry(new Color(56, 56, 56)); + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) + { + offsetY = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 4; + } + } +} diff --git a/Tiles/FloralParadise/SmallMossPiles.png b/Tiles/FloralParadise/SmallMossPiles.png new file mode 100644 index 0000000000..78133c1a7d Binary files /dev/null and b/Tiles/FloralParadise/SmallMossPiles.png differ diff --git a/Tiles/FloralParadise/SmallWallFungi.cs b/Tiles/FloralParadise/SmallWallFungi.cs new file mode 100644 index 0000000000..f93fcb283c --- /dev/null +++ b/Tiles/FloralParadise/SmallWallFungi.cs @@ -0,0 +1,41 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class SmallWallFungi : ModTile + { + public const int Variants = 3; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorRight = new AnchorData(AnchorType.SolidTile, 1, 0); + TileObjectData.addTile(Type); + DustType = 0; + + AddMapEntry(new Color(165, 126, 84)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FloralParadise/SmallWallFungi.png b/Tiles/FloralParadise/SmallWallFungi.png new file mode 100644 index 0000000000..de025416bc Binary files /dev/null and b/Tiles/FloralParadise/SmallWallFungi.png differ diff --git a/Tiles/FloralParadise/SmallWallFungiLeft.cs b/Tiles/FloralParadise/SmallWallFungiLeft.cs new file mode 100644 index 0000000000..cc231f129c --- /dev/null +++ b/Tiles/FloralParadise/SmallWallFungiLeft.cs @@ -0,0 +1,41 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class SmallWallFungiLeft : ModTile + { + public const int Variants = 3; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.Width = 1; + TileObjectData.newTile.Height = 1; + TileObjectData.newTile.Origin = new Point16(0, 0); + TileObjectData.newTile.CoordinateHeights = new int[] + { + 16 + }; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.CoordinatePadding = 2; + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorLeft = new AnchorData(AnchorType.SolidTile, 1, 0); + TileObjectData.addTile(Type); + DustType = 0; + + AddMapEntry(new Color(165, 126, 84)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FloralParadise/SmallWallFungiLeft.png b/Tiles/FloralParadise/SmallWallFungiLeft.png new file mode 100644 index 0000000000..55d42f575c Binary files /dev/null and b/Tiles/FloralParadise/SmallWallFungiLeft.png differ diff --git a/Tiles/FloralParadise/TallFloralPlants.cs b/Tiles/FloralParadise/TallFloralPlants.cs new file mode 100644 index 0000000000..ef6e7e2a31 --- /dev/null +++ b/Tiles/FloralParadise/TallFloralPlants.cs @@ -0,0 +1,43 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class TallFloralPlants : ModTile + { + public const int Variants = 12; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileObsidianKill[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.addTile(Type); + + HitSound = SoundID.Grass; + DustType = 2; + AddMapEntry(new Color(106, 135, 69)); + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) + { + offsetY = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 4; + } + + public override void NearbyEffects(int i, int j, bool closer) + { + if (CalamityUtils.ParanoidTileRetrieval(i, j).LiquidAmount > 64) + WorldGen.KillTile(i, j); + } + } +} diff --git a/Tiles/FloralParadise/TallFloralPlants.png b/Tiles/FloralParadise/TallFloralPlants.png new file mode 100644 index 0000000000..45e35742a0 Binary files /dev/null and b/Tiles/FloralParadise/TallFloralPlants.png differ diff --git a/Tiles/FloralParadise/VineLoops.cs b/Tiles/FloralParadise/VineLoops.cs new file mode 100644 index 0000000000..1bbadc92ad --- /dev/null +++ b/Tiles/FloralParadise/VineLoops.cs @@ -0,0 +1,39 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class VineLoops : ModTile + { + public const int Variants = 3; + + public override void SetStaticDefaults() + { + Main.tileCut[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileLavaDeath[Type] = true; + Main.tileNoFail[Type] = true; + Main.tileFrameImportant[Type] = true; + + TileObjectData.newTile.CopyFrom(TileObjectData.Style3x2); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorTop = new(AnchorType.SolidTile, 2, 0); + TileObjectData.addTile(Type); + + ModTranslation name = CreateMapEntryName(); + AddMapEntry(new Color(47, 75, 32), name); + HitSound = SoundID.Grass; + DustType = 2; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FloralParadise/VineLoops.png b/Tiles/FloralParadise/VineLoops.png new file mode 100644 index 0000000000..987e3b445d Binary files /dev/null and b/Tiles/FloralParadise/VineLoops.png differ diff --git a/Tiles/FloralParadise/WallLeaves.cs b/Tiles/FloralParadise/WallLeaves.cs new file mode 100644 index 0000000000..50c90ea957 --- /dev/null +++ b/Tiles/FloralParadise/WallLeaves.cs @@ -0,0 +1,32 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class WallLeaves : ModTile + { + public const int Variants = 3; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorRight = new AnchorData(AnchorType.SolidTile, 2, 0); + TileObjectData.addTile(Type); + DustType = 0; + + AddMapEntry(new Color(145, 170, 61)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FloralParadise/WallLeaves.png b/Tiles/FloralParadise/WallLeaves.png new file mode 100644 index 0000000000..2a9a284419 Binary files /dev/null and b/Tiles/FloralParadise/WallLeaves.png differ diff --git a/Tiles/FloralParadise/WallLeavesLeft.cs b/Tiles/FloralParadise/WallLeavesLeft.cs new file mode 100644 index 0000000000..fcb803390f --- /dev/null +++ b/Tiles/FloralParadise/WallLeavesLeft.cs @@ -0,0 +1,32 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.Enums; +using Terraria.ModLoader; +using Terraria.ObjectData; + +namespace CalamityMod.Tiles.FloralParadise +{ + public class WallLeavesLeft : ModTile + { + public const int Variants = 3; + + public override void SetStaticDefaults() + { + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x1); + TileObjectData.newTile.AnchorBottom = AnchorData.Empty; + TileObjectData.newTile.AnchorLeft = new AnchorData(AnchorType.SolidTile, 2, 0); + TileObjectData.addTile(Type); + DustType = 0; + + AddMapEntry(new Color(145, 170, 61)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FloralParadise/WallLeavesLeft.png b/Tiles/FloralParadise/WallLeavesLeft.png new file mode 100644 index 0000000000..a82df1d3ea Binary files /dev/null and b/Tiles/FloralParadise/WallLeavesLeft.png differ diff --git a/World/Minibiomes/FloralParadiseMinibiome.cs b/World/Minibiomes/FloralParadiseMinibiome.cs index f214c119ec..7d67c3bd44 100644 --- a/World/Minibiomes/FloralParadiseMinibiome.cs +++ b/World/Minibiomes/FloralParadiseMinibiome.cs @@ -427,26 +427,50 @@ namespace CalamityMod.World.Minibiomes continue; } - Main.tile[x, y].TileType = (ushort)ModContent.TileType(); - Main.tile[x, y].TileFrameX = (short)(Utils.SelectRandom(WorldGen.genRand, 7, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 27, 28, 29, - 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44) * 18); + Main.tile[x, y].TileType = (ushort)ModContent.TileType(); + Main.tile[x, y].TileFrameX = (short)(WorldGen.genRand.Next(8) * 18); Main.tile[x, y].TileFrameY = 0; Main.tile[x, y].Get().HasTile = true; } // TODO -- Move this to another method. - for (int i = 0; i < smallFlowerCount / 2; i++) + int tries = 0; + Dictionary possibleScenicTiles = new() { + [ModContent.TileType()] = LargeLogPiles.Variants, + [ModContent.TileType()] = LargeMossPiles.Variants, + [ModContent.TileType()] = LargeSubterraneanGrass.Variants, + [ModContent.TileType()] = LargeWallFungi.Variants, + [ModContent.TileType()] = LargeWallFungiLeft.Variants, + [ModContent.TileType()] = MediumFloralPlants.Variants, + [ModContent.TileType()] = MediumLargeMossPiles.Variants, + [ModContent.TileType()] = MediumMossPiles.Variants, + [ModContent.TileType()] = SmallMossPiles.Variants, + [ModContent.TileType()] = SmallWallFungi.Variants, + [ModContent.TileType()] = SmallWallFungiLeft.Variants, + [ModContent.TileType()] = TallFloralPlants.Variants, + [ModContent.TileType()] = VineLoops.Variants, + [ModContent.TileType()] = WallLeaves.Variants, + [ModContent.TileType()] = WallLeavesLeft.Variants, + }; + for (int i = 0; i < 960; i++) + { + tries++; + if (tries >= 10000) + break; + int x = placementArea.X + WorldGen.genRand.Next(16, placementArea.Width - 16); int y = placementArea.Y + WorldGen.genRand.Next(12, placementArea.Height - 12); Tile tile = CalamityUtils.ParanoidTileRetrieval(x, y); - if (tile.HasTile || tile.LiquidAmount > 0 || !WorldGen.SolidTile(x, y + 1)) + if (tile.HasTile || tile.LiquidAmount > 0) { i--; continue; } - WorldGen.PlaceTile(x, y, ModContent.TileType()); + var tileRegistryIndex = WorldGen.genRand.Next(possibleScenicTiles.Count); + int tileID = possibleScenicTiles.Keys.ElementAt(tileRegistryIndex); + WorldGen.PlaceTile(x, y, tileID, style: WorldGen.genRand.Next(possibleScenicTiles[tileID])); } }