Skip to content

Commit

Permalink
Changed some items names and resprited the MultiCraftingStation
Browse files Browse the repository at this point in the history
  • Loading branch information
Kirtle committed Jun 12, 2020
1 parent 173da39 commit cb58314
Show file tree
Hide file tree
Showing 13 changed files with 79 additions and 54 deletions.
6 changes: 3 additions & 3 deletions Items/InfinitePlacement.cs → Items/InfiniteWrench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

namespace BuilderEssentials.Items
{
class InfinitePlacement : ModItem
class InfiniteWrench : ModItem
{
public override void SetStaticDefaults()
{
Expand All @@ -33,7 +33,7 @@ public override void SetDefaults()
Item otherAccessory = Main.LocalPlayer.armor[i];
if (!otherAccessory.IsAir &&
!item.IsTheSameAs(otherAccessory) &&
otherAccessory.modItem is InfinitePlacement)
otherAccessory.modItem is InfiniteWrench)
{
return (i, otherAccessory);
}
Expand Down Expand Up @@ -91,7 +91,7 @@ public override void AddRecipes()
{
//Not really worried about balancing at this point
ModRecipe modRecipe = new ModRecipe(mod);
modRecipe.AddIngredient(mod.GetItem("InfiniteUpgrade"), 1);
modRecipe.AddIngredient(mod.GetItem("InfinityUpgrade"), 1);
modRecipe.AddIngredient(mod.GetItem("PlacementWrench"), 1);
modRecipe.AddTile(TileID.TinkerersWorkbench);
modRecipe.SetResult(this);
Expand Down
File renamed without changes
4 changes: 2 additions & 2 deletions Items/InfiniteUpgrade.cs → Items/InfinityUpgrade.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

namespace BuilderEssentials.Items
{
class InfiniteUpgrade : ModItem
class InfinityUpgrade : ModItem
{
public override void SetStaticDefaults()
{
Expand All @@ -34,7 +34,7 @@ public override void SetDefaults()
Item otherAccessory = Main.LocalPlayer.armor[i];
if (!otherAccessory.IsAir &&
!item.IsTheSameAs(otherAccessory) &&
otherAccessory.modItem is InfinitePlacement)
otherAccessory.modItem is InfinityUpgrade)
{
return (i, otherAccessory);
}
Expand Down
File renamed without changes
12 changes: 6 additions & 6 deletions Items/Placeable/MultiCraftingStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

namespace BuilderEssentials.Items.Placeable
{
class MultiCraftingStation : ModItem
{
class MultiCraftingStation : ModItem
{
public override void SetStaticDefaults()
{
Tooltip.SetDefault("This is a modded workbench.");
Expand All @@ -31,16 +31,16 @@ public override void SetDefaults()
item.createTile = TileType<Tiles.MultiCraftingStation>();
}

//TODO: Separate recipe into Pre-Hardmode, Hardmode + Specialized and Themed Furniture
//Max 14 ingredients for each recipe
public override void AddRecipes()
//TODO: Separate recipe into Pre-Hardmode, Hardmode + Specialized and Themed Furniture
//Max 14 ingredients for each recipe
public override void AddRecipes()
{
ModRecipe recipe = new ModRecipe(mod);
recipe.AddIngredient(mod.GetItem("PreHardmodeCraftingStation"), 1);
recipe.AddIngredient(mod.GetItem("HardmodeCraftingStation"), 1);
recipe.AddIngredient(mod.GetItem("SpecializedCraftingStation"), 1);
recipe.AddIngredient(mod.GetItem("ThemedFurnitureCraftingStation"), 1);
recipe.AddTile(TileID.DemonAltar);
recipe.AddTile(TileID.TinkerersWorkbench);
recipe.SetResult(this);
recipe.AddRecipe();
}
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.
2 changes: 1 addition & 1 deletion Items/PlacementWrench.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public override void SetDefaults()
Item otherAccessory = Main.LocalPlayer.armor[i];
if (!otherAccessory.IsAir &&
!item.IsTheSameAs(otherAccessory) &&
otherAccessory.modItem is InfinitePlacement)
otherAccessory.modItem is PlacementWrench)
{
return (i, otherAccessory);
}
Expand Down
2 changes: 1 addition & 1 deletion Items/SpecializedCraftingStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public override void AddRecipes()
recipe.AddIngredient(ItemID.MeatGrinder, 1);
recipe.AddRecipeGroup("BuilderEssentials:Campfires", 1);

recipe.AddTile(TileID.DemonAltar);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
Expand Down
2 changes: 1 addition & 1 deletion Items/ThemedFurnitureCraftingStation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public override void AddRecipes()
recipe.AddIngredient(ItemID.FleshCloningVaat, 1);
recipe.AddIngredient(ItemID.SteampunkBoiler, 1);
recipe.AddIngredient(ItemID.LihzahrdFurnace, 1);
recipe.AddTile(TileID.DemonAltar);
recipe.AddTile(TileID.MythrilAnvil);
recipe.SetResult(this);
recipe.AddRecipe();
}
Expand Down
86 changes: 56 additions & 30 deletions Tiles/MultiCraftingStation.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Terraria;
using Terraria.DataStructures;
using Terraria.Enums;
using Terraria.ID;
using Terraria.ModLoader;
using Terraria.ObjectData;
Expand All @@ -10,35 +12,59 @@ namespace BuilderEssentials.Tiles
{
class MultiCraftingStation : ModTile
{
public override void SetDefaults()
{
Main.tileSolidTop[Type] = false;
Main.tileFrameImportant[Type] = true;
Main.tileNoAttach[Type] = true;
Main.tileTable[Type] = true;
Main.tileLavaDeath[Type] = true;
TileObjectData.newTile.CopyFrom(TileObjectData.Style3x3);
TileObjectData.newTile.Origin = new Point16(1, 1);
TileObjectData.newTile.CoordinateHeights = new[] { 16, 16, 16 };
TileObjectData.newTile.Height = 3;
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.Width = 3;
TileObjectData.addTile(Type);
AddToArray(ref TileID.Sets.RoomNeeds.CountsAsTable);
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, TileID.MythrilAnvil,
TileID.AdamantiteForge, TileID.Bookcases, TileID.CrystalBall, TileID.Autohammer, TileID.LunarCraftingStation,
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};
}
public override void SetDefaults()
{
Main.tileSolidTop[Type] = false;
Main.tileFrameImportant[Type] = true;
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;
TileObjectData.newTile.CoordinateWidth = 16;
TileObjectData.newTile.Width = 4;
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, TileID.MythrilAnvil,
TileID.AdamantiteForge, TileID.Bookcases, TileID.CrystalBall, TileID.Autohammer, TileID.LunarCraftingStation,
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};
}

public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 32, 16, ItemType<Items.Placeable.MultiCraftingStation>());
}
}
public override void AnimateTile(ref int frame, ref int frameCounter)
{
//Spend 10 ticks on each of 8 frames, looping
frameCounter++;
if (frameCounter > 8)
{
frameCounter = 0;
frame++;
if (frame > 6)
{
frame = 0;
}
}
}

public override void KillMultiTile(int i, int j, int frameX, int frameY)
{
Item.NewItem(i * 16, j * 16, 32, 16, ItemType<Items.Placeable.MultiCraftingStation>());
}
}
}
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.
5 changes: 3 additions & 2 deletions build.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
displayName = Builder Essentials
author = Kirtle
version = 0.1.5
buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*
version = 0.1.6
buildIgnore = *.csproj, *.user, obj\*, bin\*, .vs\*
homepage = https://forums.terraria.org/index.php?threads/builder-essentials.94175/
14 changes: 6 additions & 8 deletions description.txt
Original file line number Diff line number Diff line change
@@ -1,15 +1,13 @@
Builder Essentials is a mod designed to help and improve building in survival (and post moonlord / creative).
Builder Essentials is a mod designed to help and improve building in survival (and post Moon Lord / creative).

The main feature is a toggleable seconday accessory system allowing for 5-7 building accessories while being able to go back to your normal accessories, with a press of a key.
On top of that, the mod also adds:

- A MultiCraftingStation that can be used to craft all the recipes in the game. (Divided in 4 crafting stations: Pre hardmode, Hardmode, Themed furniture and Specialized items)
- An accessory that allows infinite reach and fast placement. (Divided in 2 accessories, for each functionality alone as well)
The main feature is a toggleable secondary accessory system allowing for 5-7 building accessories while being able to go back to your normal accessories, with a press of a key.
On top of that, this mod adds more useful tools! Check its Homepage!

Default KeyBind to toggle Building Mode is N, be sure to set it up on the configs.

Happy Building! Kirtle

Latest Changelog:
- Introduced 2 new accessories that make up the 2 functionalities present in the Infinite Placement accessory
- Added Infinite Reach to the Infinite Placement accessory
- Updated some accessories names
- Resprited the Multi Crafting Station
- Added a homepage, the thread on Terraria Forums!

0 comments on commit cb58314

Please sign in to comment.