Skip to content

Commit

Permalink
Fixed the Building Mode UI position on screen and more
Browse files Browse the repository at this point in the history
Added the 4 crafting stations that make up the MultiCraftingStation. Updated the MultiCraftingStation Tile sprite.
  • Loading branch information
Kirtle committed Jun 12, 2020
1 parent cb58314 commit 6971f28
Show file tree
Hide file tree
Showing 26 changed files with 254 additions and 41 deletions.
2 changes: 1 addition & 1 deletion BuilderEssentials.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Binary file removed Items/HardmodeCraftingStation.png
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -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<Tiles.HardmodeCraftingStation>();
item.rare = ItemRarityID.Red;
}

Expand Down
Binary file added Items/Placeable/HardmodeCraftingStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions Items/Placeable/MultiCraftingStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -29,6 +29,7 @@ public override void SetDefaults()
item.consumable = true;
item.value = 150;
item.createTile = TileType<Tiles.MultiCraftingStation>();
item.rare = ItemRarityID.Red;
}

//TODO: Separate recipe into Pre-Hardmode, Hardmode + Specialized and Themed Furniture
Expand Down
Binary file modified Items/Placeable/MultiCraftingStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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<Tiles.PreHardmodeCraftingStation>();
item.rare = ItemRarityID.Red;
}

Expand Down
Binary file added Items/Placeable/PreHardmodeCraftingStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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<Tiles.SpecializedCraftingStation>();
item.rare = ItemRarityID.Red;
}

Expand Down
Binary file added Items/Placeable/SpecializedCraftingStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -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<Tiles.ThemedFurnitureCraftingStation>();
item.rare = ItemRarityID.Red;
}

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed Items/PreHardmodeCraftingStation.png
Binary file not shown.
Binary file removed Items/SpecializedCraftingStation.png
Binary file not shown.
Binary file removed Items/ThemedFurnitureCraftingStation.png
Binary file not shown.
45 changes: 45 additions & 0 deletions Tiles/HardmodeCraftingStation.cs
Original file line number Diff line number Diff line change
@@ -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<Items.Placeable.HardmodeCraftingStation>());
}
}
}
Binary file added Tiles/HardmodeCraftingStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 7 additions & 10 deletions Tiles/MultiCraftingStation.cs
Original file line number Diff line number Diff line change
@@ -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;
Expand All @@ -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;
Expand All @@ -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)
Expand Down
Binary file modified Tiles/MultiCraftingStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
46 changes: 46 additions & 0 deletions Tiles/PreHardmodeCraftingStation.cs
Original file line number Diff line number Diff line change
@@ -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<Items.Placeable.PreHardmodeCraftingStation>());
}
}
}
Binary file added Tiles/PreHardmodeCraftingStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
44 changes: 44 additions & 0 deletions Tiles/SpecializedCraftingStation.cs
Original file line number Diff line number Diff line change
@@ -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<Items.Placeable.SpecializedCraftingStation>());
}
}
}
Binary file added Tiles/SpecializedCraftingStation.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 6971f28

Please sign in to comment.