adapt ooga booga C# code style

This commit is contained in:
2025-12-22 17:59:47 +01:00
parent ee06338f22
commit 50d7f8b0d2
11 changed files with 69 additions and 51 deletions
+16 -10
View File
@@ -7,17 +7,20 @@ using Terraria.ModLoader;
using YHTMod.Buffs;
using YHTMod.Projectiles.Weapons;
namespace YHTMod.Items;
namespace YHTMod.Items;
public class ToclafaneStaff : ModItem {
public override void SetStaticDefaults() {
ItemID.Sets.GamepadWholeScreenUseRange[Item.type] = true; // This lets the player target anywhere on the whole screen while using a controller.
public class ToclafaneStaff : ModItem
{
public override void SetStaticDefaults()
{
ItemID.Sets.GamepadWholeScreenUseRange[Item.type] =
true; // This lets the player target anywhere on the whole screen while using a controller.
ItemID.Sets.LockOnIgnoresCollision[Item.type] = true;
CreativeItemSacrificesCatalog.Instance.SacrificeCountNeededByItemId[Type] = 1;
}
public override void SetDefaults() {
public override void SetDefaults()
{
Item.damage = 30;
Item.knockBack = 3f;
Item.mana = 10;
@@ -35,13 +38,16 @@ public class ToclafaneStaff : ModItem {
Item.shoot = ModContent.ProjectileType<ToclafaneMinion>();
}
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity, int type, int damage, float knockback) {
public override bool Shoot(Player player, EntitySource_ItemUse_WithAmmo source, Vector2 position, Vector2 velocity,
int type, int damage, float knockback)
{
player.AddBuff(Item.buffType, 2);
position = Main.MouseWorld;
return base.Shoot(player, source, position, velocity, type, damage, knockback);
}
public override void AddRecipes() {
public override void AddRecipes()
{
CreateRecipe()
.AddIngredient(ItemID.GuideVoodooDoll, 1)
.AddIngredient(ItemID.HallowedBar, 15)
@@ -79,4 +85,4 @@ public class ToclafaneStaff : ModItem {
.AddTile(TileID.MythrilAnvil)
.Register();
}
}
}