diff --git a/Items/Placeables/FurnitureMarnite/MarniteBathtub.cs b/Items/Placeables/FurnitureMarnite/MarniteBathtub.cs new file mode 100644 index 0000000000..ae805e6296 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteBathtub.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteBathtub : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 28; + Item.height = 20; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.value = 0; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteBathtub.png b/Items/Placeables/FurnitureMarnite/MarniteBathtub.png new file mode 100644 index 0000000000..cc02d56042 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteBathtub.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteBed.cs b/Items/Placeables/FurnitureMarnite/MarniteBed.cs new file mode 100644 index 0000000000..a70f60bd06 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteBed.cs @@ -0,0 +1,33 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteBed : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 28; + Item.height = 20; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Silk, 5). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteBed.png b/Items/Placeables/FurnitureMarnite/MarniteBed.png new file mode 100644 index 0000000000..da6fcd45ab Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteBed.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteBookcase.cs b/Items/Placeables/FurnitureMarnite/MarniteBookcase.cs new file mode 100644 index 0000000000..2d0ecf6fca --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteBookcase.cs @@ -0,0 +1,33 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteBookcase : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 28; + Item.height = 20; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Book, 10). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteBookcase.png b/Items/Placeables/FurnitureMarnite/MarniteBookcase.png new file mode 100644 index 0000000000..971b13f914 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteBookcase.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteCandelabra.cs b/Items/Placeables/FurnitureMarnite/MarniteCandelabra.cs new file mode 100644 index 0000000000..83c4f70861 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteCandelabra.cs @@ -0,0 +1,35 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteCandelabra : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Torch, 3). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteCandelabra.png b/Items/Placeables/FurnitureMarnite/MarniteCandelabra.png new file mode 100644 index 0000000000..26a2f38e44 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteCandelabra.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteCandle.cs b/Items/Placeables/FurnitureMarnite/MarniteCandle.cs new file mode 100644 index 0000000000..344fa60ab6 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteCandle.cs @@ -0,0 +1,35 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteCandle : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Torch). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteCandle.png b/Items/Placeables/FurnitureMarnite/MarniteCandle.png new file mode 100644 index 0000000000..94fee9e831 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteCandle.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteChair.cs b/Items/Placeables/FurnitureMarnite/MarniteChair.cs new file mode 100644 index 0000000000..d87c91a219 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteChair.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteChair : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 12; + Item.height = 30; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteChair.png b/Items/Placeables/FurnitureMarnite/MarniteChair.png new file mode 100644 index 0000000000..ab61f35105 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteChair.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteChandelier.cs b/Items/Placeables/FurnitureMarnite/MarniteChandelier.cs new file mode 100644 index 0000000000..227c8658fa --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteChandelier.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteChandelier : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Torch, 4). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteChandelier.png b/Items/Placeables/FurnitureMarnite/MarniteChandelier.png new file mode 100644 index 0000000000..5a6c0fecb9 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteChandelier.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteChest.cs b/Items/Placeables/FurnitureMarnite/MarniteChest.cs new file mode 100644 index 0000000000..819588ab8d --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteChest.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteChest : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 22; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddRecipeGroup("IronBar", 2). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteChest.png b/Items/Placeables/FurnitureMarnite/MarniteChest.png new file mode 100644 index 0000000000..7d7abc61cb Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteChest.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteClock.cs b/Items/Placeables/FurnitureMarnite/MarniteClock.cs new file mode 100644 index 0000000000..4d67b22e3a --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteClock.cs @@ -0,0 +1,35 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteClock : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 22; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddRecipeGroup("IronBar", 3). + AddIngredient(ItemID.Glass, 6). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteClock.png b/Items/Placeables/FurnitureMarnite/MarniteClock.png new file mode 100644 index 0000000000..8609bb804b Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteClock.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteDoor.cs b/Items/Placeables/FurnitureMarnite/MarniteDoor.cs new file mode 100644 index 0000000000..fa666d3247 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteDoor.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteDoor : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 14; + Item.height = 28; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteDoor.png b/Items/Placeables/FurnitureMarnite/MarniteDoor.png new file mode 100644 index 0000000000..6c6bc3244d Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteDoor.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteDresser.cs b/Items/Placeables/FurnitureMarnite/MarniteDresser.cs new file mode 100644 index 0000000000..b3ff0b985e --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteDresser.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteDresser : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 22; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteDresser.png b/Items/Placeables/FurnitureMarnite/MarniteDresser.png new file mode 100644 index 0000000000..1458e3fd35 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteDresser.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteLamp.cs b/Items/Placeables/FurnitureMarnite/MarniteLamp.cs new file mode 100644 index 0000000000..88f3b341a2 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteLamp.cs @@ -0,0 +1,35 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteLamp : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Torch). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteLamp.png b/Items/Placeables/FurnitureMarnite/MarniteLamp.png new file mode 100644 index 0000000000..963e8afe43 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteLamp.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteLantern.cs b/Items/Placeables/FurnitureMarnite/MarniteLantern.cs new file mode 100644 index 0000000000..4368af3b7c --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteLantern.cs @@ -0,0 +1,35 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteLantern : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Torch). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteLantern.png b/Items/Placeables/FurnitureMarnite/MarniteLantern.png new file mode 100644 index 0000000000..b71abbb27d Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteLantern.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteLight.cs b/Items/Placeables/FurnitureMarnite/MarniteLight.cs new file mode 100644 index 0000000000..6d66bac2f7 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteLight.cs @@ -0,0 +1,63 @@ +using CalamityMod.Items.Materials; +using CalamityMod.Tiles.FurnitureMarnite; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteLight : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + ItemID.Sets.Torches[Item.type] = true; + ItemID.Sets.SingleUseInGamepad[Type] = true; + ItemID.Sets.WaterTorches[Item.type] = true; + ItemID.Sets.ShimmerTransformToItem[Type] = ItemID.ShimmerTorch; + } + + public override void SetDefaults() + { + Item.width = 10; + Item.height = 12; + Item.maxStack = 9999; + Item.holdStyle = 1; + Item.noWet = false; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + Item.flame = true; + Item.value = 500; + } + + public override void HoldItem(Player player) + { + if (Main.rand.NextBool(player.itemAnimation > 0 ? 10 : 20)) + { + Dust.NewDust(new Vector2(player.itemLocation.X + 16f * player.direction, player.itemLocation.Y - 14f * player.gravDir), 4, 4, DustID.DungeonSpirit); + } + Vector2 position = player.RotatedRelativePoint(new Vector2(player.itemLocation.X + 12f * player.direction + player.velocity.X, player.itemLocation.Y - 14f + player.velocity.Y), true); + Lighting.AddLight(position, (57f / 255f), (246f / 255f), (255f / 255f)); + } + + public override void PostUpdate() + { + Lighting.AddLight((int)((Item.position.X + Item.width / 2) / 16f), (int)((Item.position.Y + Item.height / 2) / 16f), (57f / 255f), (246f / 255f), (255f / 255f)); + } + + public override void AddRecipes() + { + CreateRecipe(3). + AddIngredient(ItemID.Torch, 3). + AddIngredient(1). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteLight.png b/Items/Placeables/FurnitureMarnite/MarniteLight.png new file mode 100644 index 0000000000..a29823b797 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteLight.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteLight_Flame.png b/Items/Placeables/FurnitureMarnite/MarniteLight_Flame.png new file mode 100644 index 0000000000..87da903310 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteLight_Flame.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteOrgan.cs b/Items/Placeables/FurnitureMarnite/MarniteOrgan.cs new file mode 100644 index 0000000000..ad62e328ad --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteOrgan.cs @@ -0,0 +1,35 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteOrgan : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(1). + AddIngredient(ItemID.Bone, 4). + AddIngredient(ItemID.Book). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteOrgan.png b/Items/Placeables/FurnitureMarnite/MarniteOrgan.png new file mode 100644 index 0000000000..b55387ff2c Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteOrgan.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteSink.cs b/Items/Placeables/FurnitureMarnite/MarniteSink.cs new file mode 100644 index 0000000000..e1ab06b404 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteSink.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteSink : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.WaterBucket). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteSink.png b/Items/Placeables/FurnitureMarnite/MarniteSink.png new file mode 100644 index 0000000000..d9f6ac7e45 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteSink.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteSofa.cs b/Items/Placeables/FurnitureMarnite/MarniteSofa.cs new file mode 100644 index 0000000000..3255f15c96 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteSofa.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteSofa : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddIngredient(ItemID.Silk, 2). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteSofa.png b/Items/Placeables/FurnitureMarnite/MarniteSofa.png new file mode 100644 index 0000000000..c00f6c375e Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteSofa.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteTable.cs b/Items/Placeables/FurnitureMarnite/MarniteTable.cs new file mode 100644 index 0000000000..6ef3fe2a7a --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteTable.cs @@ -0,0 +1,32 @@ +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteTable : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 26; + Item.height = 26; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteTable.png b/Items/Placeables/FurnitureMarnite/MarniteTable.png new file mode 100644 index 0000000000..8b5cdd447e Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteTable.png differ diff --git a/Items/Placeables/FurnitureMarnite/MarniteWorkBench.cs b/Items/Placeables/FurnitureMarnite/MarniteWorkBench.cs new file mode 100644 index 0000000000..805581c632 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/MarniteWorkBench.cs @@ -0,0 +1,34 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using CalamityMod.Tiles.FurnitureMarnite; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class MarniteWorkBench : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetDefaults() + { + Item.width = 28; + Item.height = 14; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.value = 0; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/MarniteWorkBench.png b/Items/Placeables/FurnitureMarnite/MarniteWorkBench.png new file mode 100644 index 0000000000..e355dc2574 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/MarniteWorkBench.png differ diff --git a/Items/Placeables/FurnitureMarnite/PolishedMarniteBlock.cs b/Items/Placeables/FurnitureMarnite/PolishedMarniteBlock.cs new file mode 100644 index 0000000000..a09ba0e55f --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/PolishedMarniteBlock.cs @@ -0,0 +1,46 @@ +using CalamityMod.Items.Placeables.Walls; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class PolishedMarniteBlock : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(). + AddIngredient(ItemID.Marble, 2). + AddIngredient(ItemID.Granite, 2). + AddRecipeGroup(CalamityRecipes.AnyGoldOre, 1). + AddTile(TileID.WorkBenches). + Register(); + CreateRecipe(). + AddIngredient(4). + AddTile(TileID.WorkBenches). + Register(); + CreateRecipe(). + AddIngredient(2). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/PolishedMarniteBlock.png b/Items/Placeables/FurnitureMarnite/PolishedMarniteBlock.png new file mode 100644 index 0000000000..6837a9331f Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/PolishedMarniteBlock.png differ diff --git a/Items/Placeables/FurnitureMarnite/PolishedMarnitePlatform.cs b/Items/Placeables/FurnitureMarnite/PolishedMarnitePlatform.cs new file mode 100644 index 0000000000..2481bd9e63 --- /dev/null +++ b/Items/Placeables/FurnitureMarnite/PolishedMarnitePlatform.cs @@ -0,0 +1,35 @@ +using CalamityMod.Tiles.Furniture.CraftingStations; +using Terraria.ID; +using Terraria.ModLoader; +namespace CalamityMod.Items.Placeables.FurnitureMarnite +{ + public class PolishedMarnitePlatform : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 200; + } + + public override void SetDefaults() + { + Item.width = 24; + Item.height = 14; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 10; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createTile = ModContent.TileType(); + } + + public override void AddRecipes() + { + CreateRecipe(2). + AddIngredient(). + Register(); + } + } +} diff --git a/Items/Placeables/FurnitureMarnite/PolishedMarnitePlatform.png b/Items/Placeables/FurnitureMarnite/PolishedMarnitePlatform.png new file mode 100644 index 0000000000..a789660201 Binary files /dev/null and b/Items/Placeables/FurnitureMarnite/PolishedMarnitePlatform.png differ diff --git a/Items/Placeables/Walls/PolishedMarniteWall.cs b/Items/Placeables/Walls/PolishedMarniteWall.cs new file mode 100644 index 0000000000..22994a9baa --- /dev/null +++ b/Items/Placeables/Walls/PolishedMarniteWall.cs @@ -0,0 +1,38 @@ +using CalamityMod.Items.Placeables.FurnitureMarnite; +using CalamityMod.Walls; +using Terraria.ID; +using Terraria.ModLoader; +using WallTiles = CalamityMod.Walls; +namespace CalamityMod.Items.Placeables.Walls +{ + public class PolishedMarniteWall : ModItem, ILocalizedModType + { + public new string LocalizationCategory => "Items.Placeables"; + public override void SetStaticDefaults() + { + Item.ResearchUnlockCount = 100; + } + + public override void SetDefaults() + { + Item.width = 12; + Item.height = 12; + Item.maxStack = 9999; + Item.useTurn = true; + Item.autoReuse = true; + Item.useAnimation = 15; + Item.useTime = 7; + Item.useStyle = ItemUseStyleID.Swing; + Item.consumable = true; + Item.createWall = ModContent.WallType(); + } + + public override void AddRecipes() + { + CreateRecipe(4). + AddIngredient(). + AddTile(TileID.WorkBenches). + Register(); + } + } +} diff --git a/Items/Placeables/Walls/PolishedMarniteWall.png b/Items/Placeables/Walls/PolishedMarniteWall.png new file mode 100644 index 0000000000..02d96615c0 Binary files /dev/null and b/Items/Placeables/Walls/PolishedMarniteWall.png differ diff --git a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson index fc6fc8ce4d..b3e79bc865 100644 --- a/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson +++ b/Localization/en-US/Mods.CalamityMod.Items.Placeables.hjson @@ -3707,3 +3707,113 @@ ScintillatingBloom: { DisplayName: Scintillating Bloom Tooltip: "" } + +MarniteChest: { + DisplayName: Marnite Chest + Tooltip: "" +} + +MarniteDresser: { + DisplayName: Marnite Dresser + Tooltip: "" +} + +MarniteBathtub: { + DisplayName: Marnite Bathtub + Tooltip: "" +} + +MarniteBed: { + DisplayName: Marnite Bed + Tooltip: "" +} + +MarniteBookcase: { + DisplayName: Marnite Bookcase + Tooltip: "" +} + +MarniteCandelabra: { + DisplayName: Marnite Candelabra + Tooltip: "" +} + +MarniteCandle: { + DisplayName: Marnite Candle + Tooltip: "" +} + +MarniteChair: { + DisplayName: Marnite Chair + Tooltip: "" +} + +MarniteChandelier: { + DisplayName: Marnite Chandelier + Tooltip: "" +} + +MarniteClock: { + DisplayName: Marnite Clock + Tooltip: "" +} + +MarniteDoor: { + DisplayName: Marnite Door + Tooltip: "" +} + +MarniteLamp: { + DisplayName: Marnite Lamp + Tooltip: "" +} + +MarniteLantern: { + DisplayName: Marnite Lantern + Tooltip: "" +} + +MarniteLight: { + DisplayName: Marnite Light + Tooltip: "" +} + +MarniteOrgan: { + DisplayName: Marnite Organ + Tooltip: "" +} + +MarniteSink: { + DisplayName: Marnite Sink + Tooltip: "" +} + +MarniteSofa: { + DisplayName: Marnite Sofa + Tooltip: "" +} + +MarniteTable: { + DisplayName: Marnite Table + Tooltip: "" +} + +MarniteWorkBench: { + DisplayName: Marnite Work Bench + Tooltip: "" +} + +PolishedMarniteBlock: { + DisplayName: Polished Marnite Block + Tooltip: "" +} + +PolishedMarnitePlatform: { + DisplayName: Polished Marnite Platform + Tooltip: "" +} + +PolishedMarniteWall: { + DisplayName: Polished Marnite Wall + Tooltip: "" +} diff --git a/Sounds/Music/MarniteOrgan.ogg b/Sounds/Music/MarniteOrgan.ogg new file mode 100644 index 0000000000..fd9f5a33f7 Binary files /dev/null and b/Sounds/Music/MarniteOrgan.ogg differ diff --git a/Tiles/FurnitureMarnite/MarniteBathtub.cs b/Tiles/FurnitureMarnite/MarniteBathtub.cs new file mode 100644 index 0000000000..44db427643 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteBathtub.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteBathtub : ModTile + { + public override void SetStaticDefaults() => this.SetUpBathtub(ModContent.ItemType()); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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; + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteBathtub.png b/Tiles/FurnitureMarnite/MarniteBathtub.png new file mode 100644 index 0000000000..411aba9b90 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteBathtub.png differ diff --git a/Tiles/FurnitureMarnite/MarniteBed.cs b/Tiles/FurnitureMarnite/MarniteBed.cs new file mode 100644 index 0000000000..39bbcd8dac --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteBed.cs @@ -0,0 +1,30 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteBed : ModTile + { + public override void SetStaticDefaults() => this.SetUpBed(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override bool RightClick(int i, int j) => CalamityUtils.BedRightClick(i, j); + + public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType()); + } +} diff --git a/Tiles/FurnitureMarnite/MarniteBed.png b/Tiles/FurnitureMarnite/MarniteBed.png new file mode 100644 index 0000000000..ee4e574f6c Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteBed.png differ diff --git a/Tiles/FurnitureMarnite/MarniteBed_Highlight.png b/Tiles/FurnitureMarnite/MarniteBed_Highlight.png new file mode 100644 index 0000000000..2b30771f84 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteBed_Highlight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteBookcase.cs b/Tiles/FurnitureMarnite/MarniteBookcase.cs new file mode 100644 index 0000000000..9d531d434c --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteBookcase.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteBookcase : ModTile + { + public override void SetStaticDefaults() => this.SetUpBookcase(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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; + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteBookcase.png b/Tiles/FurnitureMarnite/MarniteBookcase.png new file mode 100644 index 0000000000..b23fee19ff Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteBookcase.png differ diff --git a/Tiles/FurnitureMarnite/MarniteCandelabra.cs b/Tiles/FurnitureMarnite/MarniteCandelabra.cs new file mode 100644 index 0000000000..8a58e30836 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteCandelabra.cs @@ -0,0 +1,44 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteCandelabra : ModTile + { + public override void SetStaticDefaults() => this.SetUpCandelabra(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 57f / 255f; + g = 246f / 255f; + b = 255f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 2, 2); + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteCandelabra.png b/Tiles/FurnitureMarnite/MarniteCandelabra.png new file mode 100644 index 0000000000..90677f7e62 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteCandelabra.png differ diff --git a/Tiles/FurnitureMarnite/MarniteCandle.cs b/Tiles/FurnitureMarnite/MarniteCandle.cs new file mode 100644 index 0000000000..59df314c56 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteCandle.cs @@ -0,0 +1,58 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteCandle : ModTile + { + public override void SetStaticDefaults() => this.SetUpCandle(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 57f / 255f; + g = 246f / 255f; + b = 255f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 1, 1); + } + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); + } + + public override bool RightClick(int i, int j) + { + CalamityUtils.RightClickBreak(i, j); + return true; + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteCandle.png b/Tiles/FurnitureMarnite/MarniteCandle.png new file mode 100644 index 0000000000..df64ce3bdf Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteCandle.png differ diff --git a/Tiles/FurnitureMarnite/MarniteChair.cs b/Tiles/FurnitureMarnite/MarniteChair.cs new file mode 100644 index 0000000000..c12256ef08 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteChair.cs @@ -0,0 +1,37 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteChair : ModTile + { + public override void SetStaticDefaults() => this.SetUpChair(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.ChairSitInfo(i, j, ref info); + + public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j); + + public override void MouseOver(int i, int j) => CalamityUtils.ChairMouseOver(i, j, ModContent.ItemType()); + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) + { + return settings.player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance); + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteChair.png b/Tiles/FurnitureMarnite/MarniteChair.png new file mode 100644 index 0000000000..8275d1c81d Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteChair.png differ diff --git a/Tiles/FurnitureMarnite/MarniteChair_Highlight.png b/Tiles/FurnitureMarnite/MarniteChair_Highlight.png new file mode 100644 index 0000000000..269c508710 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteChair_Highlight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteChandelier.cs b/Tiles/FurnitureMarnite/MarniteChandelier.cs new file mode 100644 index 0000000000..7277e2ead7 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteChandelier.cs @@ -0,0 +1,44 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteChandelier : ModTile + { + public override void SetStaticDefaults() => this.SetUpChandelier(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 57f / 255f; + g = 246f / 255f; + b = 255f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 3, 3); + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteChandelier.png b/Tiles/FurnitureMarnite/MarniteChandelier.png new file mode 100644 index 0000000000..25bb6a078c Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteChandelier.png differ diff --git a/Tiles/FurnitureMarnite/MarniteChest.cs b/Tiles/FurnitureMarnite/MarniteChest.cs new file mode 100644 index 0000000000..195247b30f --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteChest.cs @@ -0,0 +1,32 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteChest : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpChest(ModContent.ItemType()); + AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName(), CalamityUtils.GetMapChestName); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + + public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName(); + public override void MouseOver(int i, int j) => CalamityUtils.ChestMouseOver(i, j); + public override void MouseOverFar(int i, int j) => CalamityUtils.ChestMouseFar(i, j); + public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j); + public override bool RightClick(int i, int j) => CalamityUtils.ChestRightClick(i, j); + } +} diff --git a/Tiles/FurnitureMarnite/MarniteChest.png b/Tiles/FurnitureMarnite/MarniteChest.png new file mode 100644 index 0000000000..1d9a1f34fb Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteChest.png differ diff --git a/Tiles/FurnitureMarnite/MarniteChest_Highlight.png b/Tiles/FurnitureMarnite/MarniteChest_Highlight.png new file mode 100644 index 0000000000..3516e481ce Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteChest_Highlight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteClock.cs b/Tiles/FurnitureMarnite/MarniteClock.cs new file mode 100644 index 0000000000..5411f92ebb --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteClock.cs @@ -0,0 +1,45 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteClock : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpClock(ModContent.ItemType(), true); + AnimationFrameHeight = 90; + } + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 bool RightClick(int x, int y) + { + return CalamityUtils.ClockRightClick(); + } + + public override void NearbyEffects(int i, int j, bool closer) + { + if (closer) + { + Main.SceneMetrics.HasClock = true; + } + } + + public override void MouseOver(int i, int j) => CalamityUtils.MouseOver(i, j, ModContent.ItemType()); + } +} diff --git a/Tiles/FurnitureMarnite/MarniteClock.png b/Tiles/FurnitureMarnite/MarniteClock.png new file mode 100644 index 0000000000..8c941dac68 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteClock.png differ diff --git a/Tiles/FurnitureMarnite/MarniteClock_Highlight.png b/Tiles/FurnitureMarnite/MarniteClock_Highlight.png new file mode 100644 index 0000000000..d6b078b0b8 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteClock_Highlight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteDoorClosed.cs b/Tiles/FurnitureMarnite/MarniteDoorClosed.cs new file mode 100644 index 0000000000..d81c9fb928 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteDoorClosed.cs @@ -0,0 +1,38 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteDoorClosed : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpDoorClosed(ModContent.ItemType(), true); + TileID.Sets.OpenDoorID[Type] = ModContent.TileType(); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteDoorClosed.png b/Tiles/FurnitureMarnite/MarniteDoorClosed.png new file mode 100644 index 0000000000..6b1a78b573 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteDoorClosed.png differ diff --git a/Tiles/FurnitureMarnite/MarniteDoorClosed_Highlight.png b/Tiles/FurnitureMarnite/MarniteDoorClosed_Highlight.png new file mode 100644 index 0000000000..1eef954a5c Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteDoorClosed_Highlight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteDoorOpen.cs b/Tiles/FurnitureMarnite/MarniteDoorOpen.cs new file mode 100644 index 0000000000..e31f15a653 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteDoorOpen.cs @@ -0,0 +1,41 @@ +using CalamityMod.Items.Placeables.FurnitureAbyss; +using CalamityMod.Items.Placeables.FurnitureMarnite; +using CalamityMod.Tiles.FurnitureMarnite; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteDoorOpen : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpDoorOpen(ModContent.ItemType(), true); + TileID.Sets.CloseDoorID[Type] = ModContent.TileType(); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteDoorOpen.png b/Tiles/FurnitureMarnite/MarniteDoorOpen.png new file mode 100644 index 0000000000..88ea227582 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteDoorOpen.png differ diff --git a/Tiles/FurnitureMarnite/MarniteDoorOpen_Highlight.png b/Tiles/FurnitureMarnite/MarniteDoorOpen_Highlight.png new file mode 100644 index 0000000000..e0fab1a785 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteDoorOpen_Highlight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteDresser.cs b/Tiles/FurnitureMarnite/MarniteDresser.cs new file mode 100644 index 0000000000..1fb0e65101 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteDresser.cs @@ -0,0 +1,32 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.Localization; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteDresser : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpDresser(ModContent.ItemType()); + AddMapEntry(new Color(191, 142, 111), CalamityUtils.GetItemName(), CalamityUtils.GetMapChestName); + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) => true; + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + + public override LocalizedText DefaultContainerName(int frameX, int frameY) => CalamityUtils.GetItemName(); + public override void MouseOver(int i, int j) => CalamityUtils.DresserMouseOver(); + public override void MouseOverFar(int i, int j) => CalamityUtils.DresserMouseFar(); + public override void KillMultiTile(int i, int j, int frameX, int frameY) => Chest.DestroyChest(i, j); + public override bool RightClick(int i, int j) => CalamityUtils.DresserRightClick(); + } +} diff --git a/Tiles/FurnitureMarnite/MarniteDresser.png b/Tiles/FurnitureMarnite/MarniteDresser.png new file mode 100644 index 0000000000..5a0da929e1 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteDresser.png differ diff --git a/Tiles/FurnitureMarnite/MarniteDresser_Highlight.png b/Tiles/FurnitureMarnite/MarniteDresser_Highlight.png new file mode 100644 index 0000000000..c987b66e8c Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteDresser_Highlight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteLamp.cs b/Tiles/FurnitureMarnite/MarniteLamp.cs new file mode 100644 index 0000000000..af684fc3d2 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteLamp.cs @@ -0,0 +1,44 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteLamp : ModTile + { + public override void SetStaticDefaults() => this.SetUpLamp(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 57f / 255f; + g = 246f / 255f; + b = 255f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 1, 3); + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteLamp.png b/Tiles/FurnitureMarnite/MarniteLamp.png new file mode 100644 index 0000000000..49164483f9 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteLamp.png differ diff --git a/Tiles/FurnitureMarnite/MarniteLantern.cs b/Tiles/FurnitureMarnite/MarniteLantern.cs new file mode 100644 index 0000000000..53e82d7535 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteLantern.cs @@ -0,0 +1,45 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteLantern : ModTile + { + public override void SetStaticDefaults() => this.SetUpLantern(ModContent.ItemType(), true); + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) => CalamityUtils.PlatformHangOffset(i, j, ref offsetY); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + if (Main.tile[i, j].TileFrameX < 18) + { + r = 57f / 255f; + g = 246f / 255f; + b = 255f / 255f; + } + else + { + r = 0f; + g = 0f; + b = 0f; + } + } + + public override void HitWire(int i, int j) + { + CalamityUtils.LightHitWire(Type, i, j, 1, 2); + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteLantern.png b/Tiles/FurnitureMarnite/MarniteLantern.png new file mode 100644 index 0000000000..dbccc077ff Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteLantern.png differ diff --git a/Tiles/FurnitureMarnite/MarniteLight.cs b/Tiles/FurnitureMarnite/MarniteLight.cs new file mode 100644 index 0000000000..42a4096f54 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteLight.cs @@ -0,0 +1,81 @@ +using Microsoft.Xna.Framework; +using Microsoft.Xna.Framework.Graphics; +using Terraria; +using Terraria.DataStructures; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteLight : ModTile + { + public override void SetStaticDefaults() => this.SetUpTorch(ModContent.ItemType(), true, true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); + } + + public override void ModifyLight(int i, int j, ref float r, ref float g, ref float b) + { + Tile tile = Main.tile[i, j]; + if (tile.TileFrameX < 66) + { + r = 57f / 255f; + g = 246f / 255f; + b = 255f / 255f; + } + } + + public override void SetDrawPositions(int i, int j, ref int width, ref int offsetY, ref int height, ref short tileFrameX, ref short tileFrameY) + { + offsetY = 0; + if (WorldGen.SolidTile(i, j - 1)) + { + offsetY = 2; + if (WorldGen.SolidTile(i - 1, j + 1) || WorldGen.SolidTile(i + 1, j + 1)) + { + offsetY = 4; + } + } + } + + public override void PostDraw(int i, int j, SpriteBatch spriteBatch) + { + CalamityUtils.DrawFlameEffect(ModContent.Request("CalamityMod/Tiles/FurnitureMarnite/MarniteLightFlame").Value, i, j, 2); + } + + public override void DrawEffects(int i, int j, SpriteBatch spriteBatch, ref TileDrawInfo drawData) + { + if (Main.tile[i, j].TileFrameX < 66) + CalamityUtils.DrawFlameSparks(187, 5, i, j); + } + + public override bool RightClick(int i, int j) + { + CalamityUtils.RightClickBreak(i, j); + return true; + } + //This should probably give torch luck in granite AND marble biomes, this was originally planned for Catalyst + + //public override float GetTorchLuck(Player player) + //{ + // // Note: Total Torch luck never goes below zero + // return player.Calamity().ZoneAbyss ? 1f : -1f; // Abyss Torch gives positive luck when in the Abyss, otherwise some negative luck + //} + } +} diff --git a/Tiles/FurnitureMarnite/MarniteLight.png b/Tiles/FurnitureMarnite/MarniteLight.png new file mode 100644 index 0000000000..aacb17761f Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteLight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteLightFlame.png b/Tiles/FurnitureMarnite/MarniteLightFlame.png new file mode 100644 index 0000000000..62f7f9601a Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteLightFlame.png differ diff --git a/Tiles/FurnitureMarnite/MarniteOrgan.cs b/Tiles/FurnitureMarnite/MarniteOrgan.cs new file mode 100644 index 0000000000..af666e2e06 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteOrgan.cs @@ -0,0 +1,41 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.Audio; + + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteOrgan : ModTile + { + public static readonly SoundStyle MarniteOrganSound = new("CalamityMod/Sounds/Music/MarniteOrgan", 1); + public override void SetStaticDefaults() => this.SetUpPiano(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + public override void MouseOver(int i, int j) + { + Player player = Main.LocalPlayer; + player.noThrow = 2; + player.cursorItemIconEnabled = true; + player.cursorItemIconID = ModContent.ItemType(); + } + public override bool RightClick(int i, int j) + { + SoundEngine.PlaySound(MarniteOrganSound); + return true; + } + + public override void NumDust(int i, int j, bool fail, ref int num) + { + num = fail ? 1 : 3; + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteOrgan.png b/Tiles/FurnitureMarnite/MarniteOrgan.png new file mode 100644 index 0000000000..07f34fa220 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteOrgan.png differ diff --git a/Tiles/FurnitureMarnite/MarniteSink.cs b/Tiles/FurnitureMarnite/MarniteSink.cs new file mode 100644 index 0000000000..dd545d17fb --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteSink.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteSink : ModTile + { + public override void SetStaticDefaults() => this.SetUpSink(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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; + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteSink.png b/Tiles/FurnitureMarnite/MarniteSink.png new file mode 100644 index 0000000000..5a04153f60 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteSink.png differ diff --git a/Tiles/FurnitureMarnite/MarniteSofa.cs b/Tiles/FurnitureMarnite/MarniteSofa.cs new file mode 100644 index 0000000000..d2f3eda4f5 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteSofa.cs @@ -0,0 +1,37 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.DataStructures; +using Terraria.GameContent; +using Terraria.GameContent.ObjectInteractions; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteSofa : ModTile + { + public override void SetStaticDefaults() => this.SetUpSofa(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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 ModifySittingTargetInfo(int i, int j, ref TileRestingInfo info) => CalamityUtils.BenchSitInfo(i, j, ref info); + + public override bool RightClick(int i, int j) => CalamityUtils.ChairRightClick(i, j); + + public override void MouseOver(int i, int j) => CalamityUtils.BenchMouseOver(i, j, ModContent.ItemType()); + + public override bool HasSmartInteract(int i, int j, SmartInteractScanSettings settings) + { + return settings.player.IsWithinSnappngRangeToTile(i, j, PlayerSittingHelper.ChairSittingMaxDistance); + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteSofa.png b/Tiles/FurnitureMarnite/MarniteSofa.png new file mode 100644 index 0000000000..2933151260 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteSofa.png differ diff --git a/Tiles/FurnitureMarnite/MarniteSofa_Highlight.png b/Tiles/FurnitureMarnite/MarniteSofa_Highlight.png new file mode 100644 index 0000000000..f70f03f594 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteSofa_Highlight.png differ diff --git a/Tiles/FurnitureMarnite/MarniteTable.cs b/Tiles/FurnitureMarnite/MarniteTable.cs new file mode 100644 index 0000000000..c207056744 --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteTable.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteTable : ModTile + { + public override void SetStaticDefaults() => this.SetUpTable(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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; + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteTable.png b/Tiles/FurnitureMarnite/MarniteTable.png new file mode 100644 index 0000000000..50f64f2b82 Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteTable.png differ diff --git a/Tiles/FurnitureMarnite/MarniteToilet.png b/Tiles/FurnitureMarnite/MarniteToilet.png new file mode 100644 index 0000000000..57725c5ebf Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteToilet.png differ diff --git a/Tiles/FurnitureMarnite/MarniteWorkBench.cs b/Tiles/FurnitureMarnite/MarniteWorkBench.cs new file mode 100644 index 0000000000..164d79c82a --- /dev/null +++ b/Tiles/FurnitureMarnite/MarniteWorkBench.cs @@ -0,0 +1,23 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class MarniteWorkBench : ModTile + { + public override void SetStaticDefaults() => this.SetUpWorkBench(ModContent.ItemType(), true); + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Stone, 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; + } + } +} diff --git a/Tiles/FurnitureMarnite/MarniteWorkBench.png b/Tiles/FurnitureMarnite/MarniteWorkBench.png new file mode 100644 index 0000000000..5602523f5c Binary files /dev/null and b/Tiles/FurnitureMarnite/MarniteWorkBench.png differ diff --git a/Tiles/FurnitureMarnite/PolishedMarniteBlock.cs b/Tiles/FurnitureMarnite/PolishedMarniteBlock.cs new file mode 100644 index 0000000000..412be2e49f --- /dev/null +++ b/Tiles/FurnitureMarnite/PolishedMarniteBlock.cs @@ -0,0 +1,39 @@ + +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class PolishedMarniteBlock : ModTile + { + public override void SetStaticDefaults() + { + Main.tileSolid[Type] = true; + Main.tileMergeDirt[Type] = true; + Main.tileBlockLight[Type] = true; + TileID.Sets.HasSlopeFrames[Type] = true; + Main.tileShine[Type] = 3500; + CalamityUtils.MergeWithGeneral(Type); + CalamityUtils.MergeSmoothTiles(Type); + CalamityUtils.MergeDecorativeTiles(Type); + CalamityUtils.MergeWithAbyss(Type); + + HitSound = SoundID.Tink; + MineResist = 2.1f; + AddMapEntry(new Color(50, 46, 104)); + } + public override bool TileFrame(int i, int j, ref bool resetFrame, ref bool noBreak) + { + return TileFraming.BetterGemsparkFraming(i, j, resetFrame); + } + + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + } +} diff --git a/Tiles/FurnitureMarnite/PolishedMarniteBlock.png b/Tiles/FurnitureMarnite/PolishedMarniteBlock.png new file mode 100644 index 0000000000..b9b5b23628 Binary files /dev/null and b/Tiles/FurnitureMarnite/PolishedMarniteBlock.png differ diff --git a/Tiles/FurnitureMarnite/PolishedMarnitePlatform.cs b/Tiles/FurnitureMarnite/PolishedMarnitePlatform.cs new file mode 100644 index 0000000000..abdbd4927e --- /dev/null +++ b/Tiles/FurnitureMarnite/PolishedMarnitePlatform.cs @@ -0,0 +1,32 @@ +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Tiles.FurnitureMarnite +{ + public class PolishedMarnitePlatform : ModTile + { + public override void SetStaticDefaults() + { + this.SetUpPlatform(ModContent.ItemType(), true); + HitSound = SoundID.Tink; + } + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 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; + } + } +} diff --git a/Tiles/FurnitureMarnite/PolishedMarnitePlatform.png b/Tiles/FurnitureMarnite/PolishedMarnitePlatform.png new file mode 100644 index 0000000000..47ab391fa8 Binary files /dev/null and b/Tiles/FurnitureMarnite/PolishedMarnitePlatform.png differ diff --git a/Utilities/CalamityRecipes.cs b/Utilities/CalamityRecipes.cs index 12fedcb4bd..2c2cf1c034 100644 --- a/Utilities/CalamityRecipes.cs +++ b/Utilities/CalamityRecipes.cs @@ -11,7 +11,6 @@ using CalamityMod.Items.Materials; using CalamityMod.Items.Placeables; using CalamityMod.Items.Potions; using CalamityMod.Items.Tools; -using CalamityMod.Items.Weapons.Melee; using Terraria; using Terraria.ID; using Terraria.Localization; @@ -24,6 +23,7 @@ namespace CalamityMod { #region Recipe Group Definitions public static int HardmodeAnvil, HardmodeForge, AnyLargeGem, AnyFood; + public static int AnyCopperOre, AnySilverOre, AnyGoldOre, AnyEvilOre, AnyCobaltOre, AnyMythrilOre, AnyAdamantiteOre; public static int AnyCopperBar, AnySilverBar, AnyGoldBar, AnyEvilBar, AnyCobaltBar, AnyMythrilBar, AnyAdamantiteBar; public static int AnyEvilPowder, Boss2Material, CursedFlameIchor, AnyEvilWater, AnyEvilFlask; public static int AnyStoneBlock, AnySnowBlock, AnyIceBlock, AnySiltBlock, AnyEvilBlock, AnyGoodBlock; @@ -178,7 +178,14 @@ namespace CalamityMod private static void AddOreAndBarRecipeGroups() { // Copper and Tin - RecipeGroup group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CopperBar)}", new int[] + RecipeGroup group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CopperOre)}", new int[] + { + ItemID.CopperOre, + ItemID.TinOre + }); + AnyCopperOre = RecipeGroup.RegisterGroup("AnyCopperOre", group); + + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CopperBar)}", new int[] { ItemID.CopperBar, ItemID.TinBar @@ -186,6 +193,13 @@ namespace CalamityMod AnyCopperBar = RecipeGroup.RegisterGroup("AnyCopperBar", group); // Silver and Tungsten + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.SilverOre)}", new int[] + { + ItemID.SilverOre, + ItemID.TungstenOre + }); + AnySilverOre = RecipeGroup.RegisterGroup("AnySilverOre", group); + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.SilverBar)}", new int[] { ItemID.SilverBar, @@ -194,6 +208,13 @@ namespace CalamityMod AnySilverBar = RecipeGroup.RegisterGroup("AnySilverBar", group); // Gold and Platinum + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.GoldOre)}", new int[] + { + ItemID.GoldOre, + ItemID.PlatinumOre + }); + AnyGoldOre = RecipeGroup.RegisterGroup("AnyGoldOre", group); + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.GoldBar)}", new int[] { ItemID.GoldBar, @@ -202,6 +223,13 @@ namespace CalamityMod AnyGoldBar = RecipeGroup.RegisterGroup("AnyGoldBar", group); // Demonite and Crimtane + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.DemoniteOre)}", new int[] + { + ItemID.DemoniteOre, + ItemID.CrimtaneOre + }); + AnyEvilOre = RecipeGroup.RegisterGroup("AnyEvilOre", group); + group = new RecipeGroup(() => CalamityUtils.GetTextValue("Misc.RecipeGroup.AnyEvilBar"), new int[] { ItemID.DemoniteBar, @@ -210,6 +238,13 @@ namespace CalamityMod AnyEvilBar = RecipeGroup.RegisterGroup("AnyEvilBar", group); // Cobalt and Palladium + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CobaltOre)}", new int[] + { + ItemID.CobaltOre, + ItemID.PalladiumOre + }); + AnyCobaltOre = RecipeGroup.RegisterGroup("AnyCobaltOre", group); + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.CobaltBar)}", new int[] { ItemID.CobaltBar, @@ -218,6 +253,13 @@ namespace CalamityMod AnyCobaltBar = RecipeGroup.RegisterGroup("AnyCobaltBar", group); // Mythril and Orichalcum + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.MythrilOre)}", new int[] + { + ItemID.MythrilOre, + ItemID.OrichalcumOre + }); + AnyMythrilOre = RecipeGroup.RegisterGroup("AnyMythrilOre", group); + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.MythrilBar)}", new int[] { ItemID.MythrilBar, @@ -226,6 +268,13 @@ namespace CalamityMod AnyMythrilBar = RecipeGroup.RegisterGroup("AnyMythrilBar", group); // Adamantite and Titanium + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.AdamantiteOre)}", new int[] + { + ItemID.AdamantiteOre, + ItemID.TitaniumOre + }); + AnyAdamantiteOre = RecipeGroup.RegisterGroup("AnyAdamantiteOre", group); + group = new RecipeGroup(() => $"{Language.GetTextValue("LegacyMisc.37")} {Lang.GetItemNameValue(ItemID.AdamantiteBar)}", new int[] { ItemID.AdamantiteBar, diff --git a/Walls/PolishedMarniteWall.cs b/Walls/PolishedMarniteWall.cs new file mode 100644 index 0000000000..de37e28f65 --- /dev/null +++ b/Walls/PolishedMarniteWall.cs @@ -0,0 +1,26 @@ +using CalamityMod.Items.Placeables.Walls; +using Microsoft.Xna.Framework; +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; + +namespace CalamityMod.Walls +{ + public class PolishedMarniteWall : ModWall + { + public override void SetStaticDefaults() + { + Main.wallHouse[Type] = true; + HitSound = SoundID.Dig; + AddMapEntry(new Color(14, 9, 28)); + } + + public override void NumDust(int i, int j, bool fail, ref int num) => num = fail ? 1 : 3; + + public override bool CreateDust(int i, int j, ref int type) + { + Dust.NewDust(new Vector2(i, j) * 16f, 16, 16, DustID.Granite, 0f, 0f, 1, new Color(255, 255, 255), 1f); + return false; + } + } +} diff --git a/Walls/PolishedMarniteWall.png b/Walls/PolishedMarniteWall.png new file mode 100644 index 0000000000..cdb6f3d4f8 Binary files /dev/null and b/Walls/PolishedMarniteWall.png differ