diff --git a/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform.cs b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform.cs new file mode 100644 index 0000000000..4e1e0c7de6 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform.cs @@ -0,0 +1,32 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Tiles.FurnitureWulfrum; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum +{ + public class AnodizedWulfrumPlatform : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 200; + } + + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + + public override void PostDrawInWorld(SpriteBatch spriteBatch, Color lightColor, Color alphaColor, float rotation, float scale, int whoAmI) + { + Item.DrawItemGlowmaskSingleFrame(spriteBatch, rotation, ModContent.Request("CalamityMod/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform_Glow").Value); + } + + public override void AddRecipes() + { + CreateRecipe(2). + AddIngredient(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform.png b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform.png new file mode 100644 index 0000000000..25fbcddcd6 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform.png differ diff --git a/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform_Glow.png b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform_Glow.png new file mode 100644 index 0000000000..80c89d798a Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumPlatform_Glow.png differ diff --git a/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.cs b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.cs new file mode 100644 index 0000000000..8fa1356cc2 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.cs @@ -0,0 +1,32 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Walls; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum +{ + public class AnodizedWulfrumTrim : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + + public override void AddRecipes() + { + CreateRecipe(25). + AddRecipeGroup("AnyStoneBlock", 25). + AddIngredient(). + AddTile(TileID.HeavyWorkBench). + Register(); + //CreateRecipe(). + // AddIngredient(4). + // AddTile(TileID.WorkBenches). + // DisableDecraft(). + // Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.png b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.png new file mode 100644 index 0000000000..196d3e8e6b Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/AnodizedWulfrumTrim.png differ diff --git a/Items/Placeables/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.cs b/Items/Placeables/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.cs new file mode 100644 index 0000000000..db8a56db59 --- /dev/null +++ b/Items/Placeables/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.cs @@ -0,0 +1,33 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.Walls; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureWulfrum +{ + public class RoundedAnodizedWulfrumPanels : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() => Item.DefaultToPlaceableTile(ModContent.TileType()); + + public override void AddRecipes() + { + CreateRecipe(25). + AddRecipeGroup("AnyStoneBlock", 25). + AddIngredient(). + AddIngredient(). + AddTile(TileID.HeavyWorkBench). + Register(); + //CreateRecipe(). + // AddIngredient(4). + // AddTile(TileID.WorkBenches). + // DisableDecraft(). + // Register(); + } + } +} diff --git a/Items/Placeables/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.png b/Items/Placeables/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.png new file mode 100644 index 0000000000..597351bb01 Binary files /dev/null and b/Items/Placeables/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.png differ diff --git a/Items/Placeables/Walls/AnodizedWulfrumTrimWall.cs b/Items/Placeables/Walls/AnodizedWulfrumTrimWall.cs new file mode 100644 index 0000000000..83494b9878 --- /dev/null +++ b/Items/Placeables/Walls/AnodizedWulfrumTrimWall.cs @@ -0,0 +1,27 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using Terraria.ID; +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; + +namespace CalamityMod.Items.Placeables.Walls +{ + public class AnodizedWulfrumTrimWall : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 400; + } + + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + + public override void AddRecipes() + { + CreateRecipe(8). + AddIngredient(). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/Walls/AnodizedWulfrumTrimWall.png b/Items/Placeables/Walls/AnodizedWulfrumTrimWall.png new file mode 100644 index 0000000000..8ffe2432ec Binary files /dev/null and b/Items/Placeables/Walls/AnodizedWulfrumTrimWall.png differ diff --git a/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.cs b/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.cs new file mode 100644 index 0000000000..faea180c98 --- /dev/null +++ b/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.cs @@ -0,0 +1,28 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using Terraria.ID; +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; + +namespace CalamityMod.Items.Placeables.Walls +{ + public class RoundedAnodizedWulfrumPanelWall : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 400; + } + + public override void SetDefaults() => Item.DefaultToPlaceableWall(ModContent.WallType()); + + public override void AddRecipes() + { + CreateRecipe(8). + AddIngredient(). + AddIngredient(). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.png b/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.png new file mode 100644 index 0000000000..f95eb6ede4 Binary files /dev/null and b/Items/Placeables/Walls/RoundedAnodizedWulfrumPanelWall.png differ diff --git a/Items/Placeables/Walls/WulfrumComplexPanelWall.cs b/Items/Placeables/Walls/WulfrumComplexPanelWall.cs index ef8ca1a23e..4b24747fe2 100644 --- a/Items/Placeables/Walls/WulfrumComplexPanelWall.cs +++ b/Items/Placeables/Walls/WulfrumComplexPanelWall.cs @@ -19,9 +19,9 @@ namespace CalamityMod.Items.Placeables.Walls public override void AddRecipes() { CreateRecipe(8). - AddIngredient(). AddIngredient(). AddIngredient(). + AddIngredient(). AddTile(TileID.WorkBenches). Register(); } diff --git a/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform.cs b/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform.cs new file mode 100644 index 0000000000..a5e47eb9a0 --- /dev/null +++ b/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform.cs @@ -0,0 +1,68 @@ +using CalamityMod.Items.Placeables.FurnitureWulfrum; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using ReLogic.Content; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum +{ + public class AnodizedWulfrumPlatform : ModTile + { + internal static Texture2D GlowTexture; + + public override void SetStaticDefaults() + { + if (!Main.dedServ) + { + GlowTexture = ModContent.Request("CalamityMod/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform_Glow", AssetRequestMode.ImmediateLoad).Value; + } + + this.SetUpPlatform(ModContent.ItemType(), true); + } + + public override bool CanExplode(int i, int j) => false; + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void PostSetDefaults() + { + Main.tileNoSunLight[Type] = false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + // If the cached textures don't exist for some reason, don't bother using them. + if (GlowTexture is null) + return; + + Tile tile = CalamityUtils.ParanoidTileRetrieval(i, j); + if (tile.IsTileActuallyInvisible()) + return; + + int xPos = tile.TileFrameX; + int frameOffset = (i + j) % 6 * AnimationFrameHeight; + int yPos = tile.TileFrameY + frameOffset; + Vector2 drawOffset = Main.drawToScreen ? Vector2.Zero : new Vector2(Main.offScreenRange); + Vector2 drawPosition = new Vector2(i * 16 - Main.screenPosition.X, j * 16 - Main.screenPosition.Y) + drawOffset; + + if (!tile.IsHalfBlock) + { + spriteBatch.Draw(GlowTexture, drawPosition, new Rectangle?(new Rectangle(xPos, yPos, 18, 18)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + else if (tile.IsHalfBlock) + { + spriteBatch.Draw(GlowTexture, drawPosition + new Vector2(0f, 8f), new Rectangle?(new Rectangle(xPos, yPos, 18, 8)), Color.White, 0f, Vector2.Zero, 1f, SpriteEffects.None, 0f); + } + } + } +} diff --git a/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform.png b/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform.png new file mode 100644 index 0000000000..4c097dcfac Binary files /dev/null and b/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform.png differ diff --git a/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform_Glow.png b/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform_Glow.png new file mode 100644 index 0000000000..9f3ad966ea Binary files /dev/null and b/Tiles/FurnitureWulfrum/AnodizedWulfrumPlatform_Glow.png differ diff --git a/Tiles/FurnitureWulfrum/AnodizedWulfrumTrim.cs b/Tiles/FurnitureWulfrum/AnodizedWulfrumTrim.cs new file mode 100644 index 0000000000..619ac0c860 --- /dev/null +++ b/Tiles/FurnitureWulfrum/AnodizedWulfrumTrim.cs @@ -0,0 +1,52 @@ +using CalamityMod.Dusts; +using CalamityMod.Systems; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum +{ + public class AnodizedWulfrumTrim : ModTile + { + public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); + private const short subsheetWidth = 216; + private const short subsheetHeight = 72; + public static int TypeCache; + public override void SetStaticDefaults() + { + TypeCache = Type; + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileShine2[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + + HitSound = MinePlatingSound; + AddMapEntry(new Color(133, 13, 13)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFramingSystem.CompactFraming(i, j, resetFrame); + return false; + } + + public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) + { + int xPos = i % 2; + int yPos = j % 2; + frameXOffset = xPos * subsheetWidth; + frameYOffset = yPos * subsheetHeight; + } + } +} diff --git a/Tiles/FurnitureWulfrum/AnodizedWulfrumTrim.png b/Tiles/FurnitureWulfrum/AnodizedWulfrumTrim.png new file mode 100644 index 0000000000..0fa724301d Binary files /dev/null and b/Tiles/FurnitureWulfrum/AnodizedWulfrumTrim.png differ diff --git a/Tiles/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.cs b/Tiles/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.cs new file mode 100644 index 0000000000..bb3feb86ec --- /dev/null +++ b/Tiles/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.cs @@ -0,0 +1,52 @@ +using CalamityMod.Dusts; +using CalamityMod.Systems; +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.Audio; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureWulfrum +{ + public class RoundedAnodizedWulfrumPanels : ModTile + { + public static readonly SoundStyle MinePlatingSound = new("CalamityMod/Sounds/Custom/PlatingMine", 3); + private const short subsheetWidth = 216; + private const short subsheetHeight = 72; + public static int TypeCache; + public override void SetStaticDefaults() + { + TypeCache = Type; + Main.tileSolid[Type] = true; + Main.tileBlockLight[Type] = true; + Main.tileShine2[Type] = true; + + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); + + HitSound = MinePlatingSound; + AddMapEntry(new Color(164, 150, 125)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + TileFramingSystem.CompactFraming(i, j, resetFrame); + return false; + } + + public override void AnimateIndividualTile(int type, int i, int j, ref int frameXOffset, ref int frameYOffset) + { + int xPos = i % 2; + int yPos = j % 2; + frameXOffset = xPos * subsheetWidth; + frameYOffset = yPos * subsheetHeight; + } + } +} diff --git a/Tiles/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.png b/Tiles/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.png new file mode 100644 index 0000000000..5f0bba3e44 Binary files /dev/null and b/Tiles/FurnitureWulfrum/RoundedAnodizedWulfrumPanels.png differ diff --git a/Tiles/FurnitureWulfrum/WulfrumSheets.cs b/Tiles/FurnitureWulfrum/WulfrumSheets.cs index 813b8f8191..9b26f02b4d 100644 --- a/Tiles/FurnitureWulfrum/WulfrumSheets.cs +++ b/Tiles/FurnitureWulfrum/WulfrumSheets.cs @@ -25,7 +25,7 @@ namespace CalamityMod.Tiles.FurnitureWulfrum CalamityUtils.MergeWithGeneral(Type); HitSound = MinePlatingSound; - AddMapEntry(new Color(164, 150, 125)); + AddMapEntry(new Color(109, 132, 101)); } public override bool CreateDust(int i, int j, ref int type) diff --git a/Tiles/FurnitureWulfrum/WulfrumSiding.cs b/Tiles/FurnitureWulfrum/WulfrumSiding.cs index 6f31a9e0c0..8df1d946d3 100644 --- a/Tiles/FurnitureWulfrum/WulfrumSiding.cs +++ b/Tiles/FurnitureWulfrum/WulfrumSiding.cs @@ -19,6 +19,7 @@ namespace CalamityMod.Tiles.FurnitureWulfrum Main.tileBlockLight[Type] = true; CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeDecorativeTiles(Type); HitSound = MinePlatingSound; AddMapEntry(new Color(164, 150, 125)); diff --git a/Utilities/TileUtils.cs b/Utilities/TileUtils.cs index 4fd97af360..d7a7014c63 100644 --- a/Utilities/TileUtils.cs +++ b/Utilities/TileUtils.cs @@ -651,6 +651,8 @@ namespace CalamityMod SetMerge(type, TileType()); SetMerge(type, TileType()); SetMerge(type, TileType()); + SetMerge(type, TileType()); + SetMerge(type, TileType()); } /// diff --git a/Walls/AnodizedWulfrumTrimWall.cs b/Walls/AnodizedWulfrumTrimWall.cs new file mode 100644 index 0000000000..55c63b2614 --- /dev/null +++ b/Walls/AnodizedWulfrumTrimWall.cs @@ -0,0 +1,29 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; + +namespace CalamityMod.Walls +{ + public class AnodizedWulfrumTrimWall : MultiVariantModWall + { + public override void SetStaticDefaults() + { + Main.wallHouse[Type] = true; + AddMapEntry(new Color(67, 6, 6)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + + public override void PopulateWallVariant(int i, int j, ref int frameXOffset, ref int frameYOffset) + { + frameXOffset = (i % 2) * 468; + frameYOffset = (j % 2) * 180; + } + } +} diff --git a/Walls/AnodizedWulfrumTrimWall.png b/Walls/AnodizedWulfrumTrimWall.png new file mode 100644 index 0000000000..7082d8a24b Binary files /dev/null and b/Walls/AnodizedWulfrumTrimWall.png differ diff --git a/Walls/RoundedAnodizedWulfrumPanelWall.cs b/Walls/RoundedAnodizedWulfrumPanelWall.cs new file mode 100644 index 0000000000..604f75ffc6 --- /dev/null +++ b/Walls/RoundedAnodizedWulfrumPanelWall.cs @@ -0,0 +1,29 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; + +namespace CalamityMod.Walls +{ + public class RoundedAnodizedWulfrumPanelWall : MultiVariantModWall + { + public override void SetStaticDefaults() + { + Main.wallHouse[Type] = true; + AddMapEntry(new Color(98, 90, 75)); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.TerraBlade, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + + public override void PopulateWallVariant(int i, int j, ref int frameXOffset, ref int frameYOffset) + { + frameXOffset = (i % 2) * 468; + frameYOffset = (j % 2) * 180; + } + } +} diff --git a/Walls/RoundedAnodizedWulfrumPanelWall.png b/Walls/RoundedAnodizedWulfrumPanelWall.png new file mode 100644 index 0000000000..3412b5023d Binary files /dev/null and b/Walls/RoundedAnodizedWulfrumPanelWall.png differ diff --git a/Walls/WulfrumComplexPanelWall.cs b/Walls/WulfrumComplexPanelWall.cs index 093da7544c..7106dee681 100644 --- a/Walls/WulfrumComplexPanelWall.cs +++ b/Walls/WulfrumComplexPanelWall.cs @@ -19,7 +19,7 @@ namespace CalamityMod.Walls Main.wallHouse[Type] = true; Main.wallLight[Type] = true; - AddMapEntry(new Color(116, 153, 40)); + AddMapEntry(new Color(28, 28, 29)); } public override void Unload()