Clean up tool code.

This commit is contained in:
Big Duckie
2022-07-05 17:03:46 -06:00
parent 5ea7aceefa
commit f3cfce7792
3 changed files with 38 additions and 36 deletions
+11 -10
View File
@@ -15,6 +15,7 @@ public class GoldenHamaxe : ModItem
public override void SetDefaults()
{
Item.damage = 68;
Item.DamageType = DamageClass.Melee;
Item.width = 70;
Item.height = 60;
Item.useTime = 10;
@@ -32,22 +33,22 @@ public class GoldenHamaxe : ModItem
public override void AddRecipes()
{
Recipe val = CreateRecipe();
val.AddIngredient(ItemID.Picksaw, 1);
val.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 12);
val.AddTile(TileID.AdamantiteForge);
val.Register();
CreateRecipe()
.AddIngredient(ItemID.Picksaw, 1)
.AddIngredient(ModContent.ItemType<Items.CraftingIngredients.GoddessGold>(), 12)
.AddTile(TileID.AdamantiteForge)
.Register();
}
public override void MeleeEffects(Player player, Rectangle hitbox)
{
if (Main.rand.NextBool(3))
{
int num1 = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.MeatDust>());
Main.dust[num1].scale = 1f;
Main.dust[num1].velocity.Y = 0f;
Main.dust[num1].velocity.X = 0.5f;
Main.dust[num1].noGravity = true;
int dust = Dust.NewDust(new Vector2(hitbox.X, hitbox.Y), hitbox.Width, hitbox.Height, ModContent.DustType<Dusts.MeatDust>());
Main.dust[dust].scale = 1f;
Main.dust[dust].velocity.Y = 0f;
Main.dust[dust].velocity.X = 0.5f;
Main.dust[dust].noGravity = true;
}
}
}