-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added a Crafting Station that allows all recipes in the game and a ho…
…tkey to toggle Building Mode Also updated the InfinitePlacement Sprite
- Loading branch information
Kirtle
committed
Jun 10, 2020
1 parent
720ac41
commit 281ca53
Showing
9 changed files
with
120 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Text; | ||
using System.Threading.Tasks; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
using static Terraria.ModLoader.ModContent; | ||
|
||
namespace BuilderEssentials.Items.Placeable | ||
{ | ||
class MultiCraftingStation : ModItem | ||
{ | ||
public override void SetStaticDefaults() | ||
{ | ||
Tooltip.SetDefault("This is a modded workbench."); | ||
} | ||
|
||
public override void SetDefaults() | ||
{ | ||
item.width = 48; | ||
item.height = 48; | ||
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.MultiCraftingStation>(); | ||
} | ||
|
||
public override void AddRecipes() | ||
{ | ||
ModRecipe recipe = new ModRecipe(mod); | ||
recipe.AddIngredient(ItemID.WorkBench); | ||
recipe.SetResult(this); | ||
recipe.AddRecipe(); | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
using Microsoft.Xna.Framework; | ||
using Terraria; | ||
using Terraria.DataStructures; | ||
using Terraria.ID; | ||
using Terraria.ModLoader; | ||
using Terraria.ObjectData; | ||
using static Terraria.ModLoader.ModContent; | ||
|
||
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 KillMultiTile(int i, int j, int frameX, int frameY) | ||
{ | ||
Item.NewItem(i * 16, j * 16, 32, 16, ItemType<Items.Placeable.MultiCraftingStation>()); | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters