Acidwood wall

This commit is contained in:
IbanPlay committed 2022-07-24 22:54:22 +02:00
1 parent c8af8e5750
commit de4846087b
5 files changed
+69

No files matched your search

+5
View File
@@ -2,6 +2,7 @@
using CalamityMod.Tiles.Abyss;
using Terraria.ID;
using Terraria.ModLoader;
using CalamityMod.Items.Placeables.Walls;
namespace CalamityMod.Items.Placeables
{
@@ -32,6 +33,10 @@ namespace CalamityMod.Items.Placeables
CreateRecipe().
AddIngredient<AcidwoodPlatform>(2).
Register();
CreateRecipe(1).
AddIngredient(ModContent.ItemType<AcidwoodWallItem>(), 4).
AddTile(TileID.WorkBenches).Register();
}
}
}
@@ -0,0 +1,37 @@
using Terraria.ModLoader;
using WallTiles = CalamityMod.Walls;
using Terraria.ID;
namespace CalamityMod.Items.Placeables.Walls
{
public class AcidwoodWallItem : ModItem
{
public override void SetStaticDefaults()
{
DisplayName.SetDefault("Acidwood Wall");
SacrificeTotal = 400;
}
public override void SetDefaults()
{
Item.width = 18;
Item.height = 18;
Item.maxStack = 999;
Item.useTurn = true;
Item.autoReuse = true;
Item.useAnimation = 15;
Item.useTime = 7;
Item.useStyle = ItemUseStyleID.Swing;
Item.consumable = true;
Item.createWall = ModContent.WallType<WallTiles.AcidwoodWall>();
}
public override void AddRecipes()
{
CreateRecipe(4).
AddIngredient(ModContent.ItemType<Acidwood>()).
AddTile(TileID.WorkBenches).
Register();
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 559 B

+27
View File
@@ -0,0 +1,27 @@
using Microsoft.Xna.Framework;
using Terraria.ModLoader;
using CalamityMod.Items.Placeables.Walls;
using Terraria;
using Terraria.ID;
namespace CalamityMod.Walls
{
public class AcidwoodWall : ModWall
{
public override void SetStaticDefaults()
{
Main.wallHouse[Type] = true;
ItemDrop = ModContent.ItemType<AcidwoodWallItem>();
HitSound = SoundID.Dig;
AddMapEntry(new Color(96, 69, 39));
}
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, 7, 0f, 0f, 1, new Color(255, 255, 255), 1f);
return false;
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB