diff --git a/BuilderEssentials.cs b/BuilderEssentials.cs index da4db66..27efe13 100644 --- a/BuilderEssentials.cs +++ b/BuilderEssentials.cs @@ -332,7 +332,7 @@ public override void AddRecipeGroups() }); RecipeGroup.RegisterGroup("BuilderEssentials:HardmodeAnvils", hardmodeAnvils); - RecipeGroup campfires = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + "Campfire", new int[] + RecipeGroup campfires = new RecipeGroup(() => Language.GetTextValue("LegacyMisc.37") + " Campfire", new int[] { ItemID.Campfire, ItemID.BoneCampfire, diff --git a/Items/HardmodeCraftingStation.png b/Items/HardmodeCraftingStation.png deleted file mode 100644 index 0e9b628..0000000 Binary files a/Items/HardmodeCraftingStation.png and /dev/null differ diff --git a/Items/HardmodeCraftingStation.cs b/Items/Placeable/HardmodeCraftingStation.cs similarity index 61% rename from Items/HardmodeCraftingStation.cs rename to Items/Placeable/HardmodeCraftingStation.cs index b15591a..2ffc07c 100644 --- a/Items/HardmodeCraftingStation.cs +++ b/Items/Placeable/HardmodeCraftingStation.cs @@ -1,22 +1,30 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; -namespace BuilderEssentials.Items +namespace BuilderEssentials.Items.Placeable { class HardmodeCraftingStation : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("Hardmode Crafting Stations"); + Tooltip.SetDefault("Used to craft Hardmode Recipes"); } public override void SetDefaults() { - item.noMelee = true; - item.width = 24; - item.height = 17; - item.value = Item.sellPrice(0, 10, 0, 0); + item.width = 32; + item.height = 32; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = ItemUseStyleID.SwingThrow; + item.consumable = true; + item.value = 150; + item.createTile = TileType(); item.rare = ItemRarityID.Red; } diff --git a/Items/Placeable/HardmodeCraftingStation.png b/Items/Placeable/HardmodeCraftingStation.png new file mode 100644 index 0000000..ed53223 Binary files /dev/null and b/Items/Placeable/HardmodeCraftingStation.png differ diff --git a/Items/Placeable/MultiCraftingStation.cs b/Items/Placeable/MultiCraftingStation.cs index b26aff0..2d69b98 100644 --- a/Items/Placeable/MultiCraftingStation.cs +++ b/Items/Placeable/MultiCraftingStation.cs @@ -13,13 +13,13 @@ class MultiCraftingStation : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("This is a modded workbench."); + Tooltip.SetDefault("Used to craft all recipes in the game"); } public override void SetDefaults() { - item.width = 48; - item.height = 48; + item.width = 102; + item.height = 40; item.maxStack = 99; item.useTurn = true; item.autoReuse = true; @@ -29,6 +29,7 @@ public override void SetDefaults() item.consumable = true; item.value = 150; item.createTile = TileType(); + item.rare = ItemRarityID.Red; } //TODO: Separate recipe into Pre-Hardmode, Hardmode + Specialized and Themed Furniture diff --git a/Items/Placeable/MultiCraftingStation.png b/Items/Placeable/MultiCraftingStation.png index b64465b..11006fd 100644 Binary files a/Items/Placeable/MultiCraftingStation.png and b/Items/Placeable/MultiCraftingStation.png differ diff --git a/Items/PreHardmodeCraftingStation.cs b/Items/Placeable/PreHardmodeCraftingStation.cs similarity index 70% rename from Items/PreHardmodeCraftingStation.cs rename to Items/Placeable/PreHardmodeCraftingStation.cs index 4dd0750..7f34642 100644 --- a/Items/PreHardmodeCraftingStation.cs +++ b/Items/Placeable/PreHardmodeCraftingStation.cs @@ -1,22 +1,30 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; -namespace BuilderEssentials.Items +namespace BuilderEssentials.Items.Placeable { class PreHardmodeCraftingStation : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("Pre Hardmode Crafting Stations"); + Tooltip.SetDefault("Used to craft Pre Hardmode Recipes"); } public override void SetDefaults() { - item.noMelee = true; - item.width = 24; - item.height = 17; - item.value = Item.sellPrice(0, 10, 0, 0); + item.width = 32; + item.height = 32; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = ItemUseStyleID.SwingThrow; + item.consumable = true; + item.value = 150; + item.createTile = TileType(); item.rare = ItemRarityID.Red; } diff --git a/Items/Placeable/PreHardmodeCraftingStation.png b/Items/Placeable/PreHardmodeCraftingStation.png new file mode 100644 index 0000000..21d9bdf Binary files /dev/null and b/Items/Placeable/PreHardmodeCraftingStation.png differ diff --git a/Items/SpecializedCraftingStation.cs b/Items/Placeable/SpecializedCraftingStation.cs similarity index 56% rename from Items/SpecializedCraftingStation.cs rename to Items/Placeable/SpecializedCraftingStation.cs index 1e5a948..a0d17ee 100644 --- a/Items/SpecializedCraftingStation.cs +++ b/Items/Placeable/SpecializedCraftingStation.cs @@ -1,22 +1,30 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; -namespace BuilderEssentials.Items +namespace BuilderEssentials.Items.Placeable { class SpecializedCraftingStation : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("Specialized Crafting Stations"); + Tooltip.SetDefault("Used to craft Specialized Recipes"); } public override void SetDefaults() { - item.noMelee = true; - item.width = 24; - item.height = 17; - item.value = Item.sellPrice(0, 10, 0, 0); + item.width = 32; + item.height = 32; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = ItemUseStyleID.SwingThrow; + item.consumable = true; + item.value = 150; + item.createTile = TileType(); item.rare = ItemRarityID.Red; } diff --git a/Items/Placeable/SpecializedCraftingStation.png b/Items/Placeable/SpecializedCraftingStation.png new file mode 100644 index 0000000..fbc3c00 Binary files /dev/null and b/Items/Placeable/SpecializedCraftingStation.png differ diff --git a/Items/ThemedFurnitureCraftingStation.cs b/Items/Placeable/ThemedFurnitureCraftingStation.cs similarity index 65% rename from Items/ThemedFurnitureCraftingStation.cs rename to Items/Placeable/ThemedFurnitureCraftingStation.cs index 080bcbb..a733971 100644 --- a/Items/ThemedFurnitureCraftingStation.cs +++ b/Items/Placeable/ThemedFurnitureCraftingStation.cs @@ -1,22 +1,30 @@ using Terraria; using Terraria.ID; using Terraria.ModLoader; +using static Terraria.ModLoader.ModContent; -namespace BuilderEssentials.Items +namespace BuilderEssentials.Items.Placeable { class ThemedFurnitureCraftingStation : ModItem { public override void SetStaticDefaults() { - Tooltip.SetDefault("Themed Furniture Crafting Stations"); + Tooltip.SetDefault("Used to craft Furniture Recipes"); } public override void SetDefaults() { - item.noMelee = true; - item.width = 24; - item.height = 17; - item.value = Item.sellPrice(0, 10, 0, 0); + item.width = 32; + item.height = 32; + item.maxStack = 99; + item.useTurn = true; + item.autoReuse = true; + item.useAnimation = 15; + item.useTime = 10; + item.useStyle = ItemUseStyleID.SwingThrow; + item.consumable = true; + item.value = 150; + item.createTile = TileType(); item.rare = ItemRarityID.Red; } diff --git a/Items/Placeable/ThemedFurnitureCraftingStation.png b/Items/Placeable/ThemedFurnitureCraftingStation.png new file mode 100644 index 0000000..e034923 Binary files /dev/null and b/Items/Placeable/ThemedFurnitureCraftingStation.png differ diff --git a/Items/PreHardmodeCraftingStation.png b/Items/PreHardmodeCraftingStation.png deleted file mode 100644 index 419a34d..0000000 Binary files a/Items/PreHardmodeCraftingStation.png and /dev/null differ diff --git a/Items/SpecializedCraftingStation.png b/Items/SpecializedCraftingStation.png deleted file mode 100644 index 4db5f51..0000000 Binary files a/Items/SpecializedCraftingStation.png and /dev/null differ diff --git a/Items/ThemedFurnitureCraftingStation.png b/Items/ThemedFurnitureCraftingStation.png deleted file mode 100644 index eeba2ed..0000000 Binary files a/Items/ThemedFurnitureCraftingStation.png and /dev/null differ diff --git a/Tiles/HardmodeCraftingStation.cs b/Tiles/HardmodeCraftingStation.cs new file mode 100644 index 0000000..3976520 --- /dev/null +++ b/Tiles/HardmodeCraftingStation.cs @@ -0,0 +1,45 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using static Terraria.ModLoader.ModContent; + +namespace BuilderEssentials.Tiles +{ + class HardmodeCraftingStation : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileTable[Type] = true; + Main.tileLavaDeath[Type] = false; + animationFrameHeight = 54; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.CoordinateHeights = new[] { 16, 16 }; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.Width = 2; + //TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + //TileObjectData.newTile.StyleWrapLimit = 2; + //TileObjectData.newTile.StyleMultiplier = 2; + //TileObjectData.newTile.StyleHorizontal = true; + //TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + //TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + //TileObjectData.addAlternate(1); + TileObjectData.addTile(Type); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); + disableSmartCursor = true; + adjTiles = new int[] { TileID.MythrilAnvil, TileID.AdamantiteForge, TileID.Bookcases, + TileID.CrystalBall, TileID.Autohammer, TileID.LunarCraftingStation }; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 16, ItemType()); + } + } +} diff --git a/Tiles/HardmodeCraftingStation.png b/Tiles/HardmodeCraftingStation.png new file mode 100644 index 0000000..ed53223 Binary files /dev/null and b/Tiles/HardmodeCraftingStation.png differ diff --git a/Tiles/MultiCraftingStation.cs b/Tiles/MultiCraftingStation.cs index d5ab1ed..4ee6fa5 100644 --- a/Tiles/MultiCraftingStation.cs +++ b/Tiles/MultiCraftingStation.cs @@ -1,7 +1,4 @@ -using Microsoft.Xna.Framework; -using Microsoft.Xna.Framework.Graphics; -using Terraria; -using Terraria.DataStructures; +using Terraria; using Terraria.Enums; using Terraria.ID; using Terraria.ModLoader; @@ -19,12 +16,12 @@ public override void SetDefaults() Main.tileNoAttach[Type] = true; Main.tileTable[Type] = true; Main.tileLavaDeath[Type] = false; - animationFrameHeight = 36; - TileObjectData.newTile.CopyFrom(TileObjectData.Style4x2); - TileObjectData.newTile.CoordinateHeights = new[] { 16, 16}; - TileObjectData.newTile.Height = 2; + animationFrameHeight = 54; + TileObjectData.newTile.CopyFrom(TileObjectData.Style6x3); + TileObjectData.newTile.CoordinateHeights = new[] { 16, 16, 16}; + TileObjectData.newTile.Height = 3; TileObjectData.newTile.CoordinateWidth = 16; - TileObjectData.newTile.Width = 4; + TileObjectData.newTile.Width = 6; TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; TileObjectData.newTile.StyleWrapLimit = 2; TileObjectData.newTile.StyleMultiplier = 2; @@ -44,7 +41,7 @@ public override void SetDefaults() TileID.Kegs, TileID.Blendomatic, TileID.MeatGrinder, TileID.BoneWelder, TileID.GlassKiln, TileID.HoneyDispenser, TileID.IceMachine, TileID.LivingLoom, TileID.SkyMill, TileID.Solidifier, TileID.FleshCloningVat, TileID.SteampunkBoiler, TileID.LihzahrdFurnace, TileID.WaterDrip, TileID.Waterfall, TileID.LavaDrip, TileID.Lavafall, - TileID.HoneyDrip, TileID.Honeyfall, TileID.Campfire, TileID.Extractinator}; + TileID.HoneyDrip, TileID.Honeyfall, TileID.Campfire, TileID.Extractinator, TileID.SnowCloud, TileID.Tombstones }; } public override void AnimateTile(ref int frame, ref int frameCounter) diff --git a/Tiles/MultiCraftingStation.png b/Tiles/MultiCraftingStation.png index 8da3f2c..6f75d99 100644 Binary files a/Tiles/MultiCraftingStation.png and b/Tiles/MultiCraftingStation.png differ diff --git a/Tiles/PreHardmodeCraftingStation.cs b/Tiles/PreHardmodeCraftingStation.cs new file mode 100644 index 0000000..85e8658 --- /dev/null +++ b/Tiles/PreHardmodeCraftingStation.cs @@ -0,0 +1,46 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using static Terraria.ModLoader.ModContent; + +namespace BuilderEssentials.Tiles +{ + class PreHardmodeCraftingStation : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileTable[Type] = true; + Main.tileLavaDeath[Type] = false; + animationFrameHeight = 54; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.CoordinateHeights = new[] { 16, 16 }; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.Width = 2; + //TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + //TileObjectData.newTile.StyleWrapLimit = 2; + //TileObjectData.newTile.StyleMultiplier = 2; + //TileObjectData.newTile.StyleHorizontal = true; + //TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + //TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + //TileObjectData.addAlternate(1); + TileObjectData.addTile(Type); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); + disableSmartCursor = true; + adjTiles = new int[] { TileID.WorkBenches, TileID.Furnaces, TileID.Hellforge, TileID.Anvils, TileID.AlchemyTable, TileID.Sinks, + TileID.Sawmill, TileID.Loom, TileID.Chairs, TileID.Tables, TileID.Tables2, TileID.CookingPots, TileID.TinkerersWorkbench, + TileID.ImbuingStation, TileID.DyeVat, TileID.HeavyWorkBench, TileID.DemonAltar }; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 16, ItemType()); + } + } +} diff --git a/Tiles/PreHardmodeCraftingStation.png b/Tiles/PreHardmodeCraftingStation.png new file mode 100644 index 0000000..21d9bdf Binary files /dev/null and b/Tiles/PreHardmodeCraftingStation.png differ diff --git a/Tiles/SpecializedCraftingStation.cs b/Tiles/SpecializedCraftingStation.cs new file mode 100644 index 0000000..ef7d9e4 --- /dev/null +++ b/Tiles/SpecializedCraftingStation.cs @@ -0,0 +1,44 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using static Terraria.ModLoader.ModContent; + +namespace BuilderEssentials.Tiles +{ + class SpecializedCraftingStation : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileTable[Type] = true; + Main.tileLavaDeath[Type] = false; + animationFrameHeight = 54; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.CoordinateHeights = new[] { 16, 16 }; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.Width = 2; + //TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + //TileObjectData.newTile.StyleWrapLimit = 2; + //TileObjectData.newTile.StyleMultiplier = 2; + //TileObjectData.newTile.StyleHorizontal = true; + //TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + //TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + //TileObjectData.addAlternate(1); + TileObjectData.addTile(Type); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); + disableSmartCursor = true; + adjTiles = new int[] { TileID.Campfire, TileID.Kegs, TileID.Blendomatic, TileID.MeatGrinder }; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 16, ItemType()); + } + } +} diff --git a/Tiles/SpecializedCraftingStation.png b/Tiles/SpecializedCraftingStation.png new file mode 100644 index 0000000..fbc3c00 Binary files /dev/null and b/Tiles/SpecializedCraftingStation.png differ diff --git a/Tiles/ThemedFurnitureCraftingStation.cs b/Tiles/ThemedFurnitureCraftingStation.cs new file mode 100644 index 0000000..98620a3 --- /dev/null +++ b/Tiles/ThemedFurnitureCraftingStation.cs @@ -0,0 +1,47 @@ +using Terraria; +using Terraria.ID; +using Terraria.ModLoader; +using Terraria.ObjectData; +using static Terraria.ModLoader.ModContent; + +namespace BuilderEssentials.Tiles +{ + class ThemedFurnitureCraftingStation : ModTile + { + public override void SetDefaults() + { + Main.tileSolidTop[Type] = true; + Main.tileFrameImportant[Type] = true; + Main.tileNoAttach[Type] = true; + Main.tileTable[Type] = true; + Main.tileLavaDeath[Type] = false; + animationFrameHeight = 54; + TileObjectData.newTile.CopyFrom(TileObjectData.Style2x2); + TileObjectData.newTile.CoordinateHeights = new[] { 16, 16 }; + TileObjectData.newTile.Height = 2; + TileObjectData.newTile.CoordinateWidth = 16; + TileObjectData.newTile.Width = 2; + //TileObjectData.newTile.Direction = TileObjectDirection.PlaceLeft; + //TileObjectData.newTile.StyleWrapLimit = 2; + //TileObjectData.newTile.StyleMultiplier = 2; + //TileObjectData.newTile.StyleHorizontal = true; + //TileObjectData.newAlternate.CopyFrom(TileObjectData.newTile); + //TileObjectData.newAlternate.Direction = TileObjectDirection.PlaceRight; + //TileObjectData.addAlternate(1); + TileObjectData.addTile(Type); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsChair); + AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTorch); + disableSmartCursor = true; + adjTiles = new int[] { TileID.BoneWelder, TileID.GlassKiln, TileID.HoneyDispenser, TileID.IceMachine, + TileID.LivingLoom, TileID.SkyMill, TileID.Solidifier, TileID.FleshCloningVat, TileID.SteampunkBoiler, + TileID.LihzahrdFurnace, TileID.WaterDrip, TileID.Waterfall, TileID.LavaDrip, TileID.Lavafall, + TileID.HoneyDrip, TileID.Honeyfall, TileID.SnowCloud }; + } + + public override void KillMultiTile(int i, int j, int frameX, int frameY) + { + Item.NewItem(i * 16, j * 16, 32, 16, ItemType()); + } + } +} diff --git a/Tiles/ThemedFurnitureCraftingStation.png b/Tiles/ThemedFurnitureCraftingStation.png new file mode 100644 index 0000000..e034923 Binary files /dev/null and b/Tiles/ThemedFurnitureCraftingStation.png differ diff --git a/UI/BasePanel.cs b/UI/BasePanel.cs index 452384f..8535da4 100644 --- a/UI/BasePanel.cs +++ b/UI/BasePanel.cs @@ -17,9 +17,10 @@ public override void OnInitialize() { buttonTexture = BuilderEssentials.BuildingModeOff; button = new UIImageButton(buttonTexture); - //Bad positionning on screens != 1080p? - button.VAlign = 0.03f; - button.HAlign = 0.272f; + button.VAlign = 0f; //0.03f + button.HAlign = 0f; //0.272f + button.Top.Set(40f, 0); + button.Left.Set(510f, 0); button.OnClick += ChangeAccessories_OnClick; Append(button); }