From 979b6adde2483d17df794133b2626730590cb1e5 Mon Sep 17 00:00:00 2001 From: YouHaveTrouble Date: Sat, 3 Dec 2022 10:00:04 +0100 Subject: [PATCH] code style improvements --- Items/KatanaRedo.cs | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Items/KatanaRedo.cs b/Items/KatanaRedo.cs index 71f6367..545558b 100644 --- a/Items/KatanaRedo.cs +++ b/Items/KatanaRedo.cs @@ -10,19 +10,16 @@ public class KatanaRedo : GlobalItem { public override void ModifyTooltips(Item item, List tooltips) { - if (item.type == ItemID.Katana) { - tooltips.Insert(5, new TooltipLine(YHTMod.GetInstance(), "flavor" , "Nothing personel kid.")); - tooltips.Insert(6, new TooltipLine(YHTMod.GetInstance(), "usage" , "Right click to teleport behind them.")); - } - + if (item.type != ItemID.Katana) return; + tooltips.Insert(5, new TooltipLine(YHTMod.GetInstance(), "flavor" , "Nothing personel kid.")); + tooltips.Insert(6, new TooltipLine(YHTMod.GetInstance(), "usage" , "Right click to teleport behind them.")); } public override bool AltFunctionUse(Item item, Player player) { - if (item.type == ItemID.Katana) { - return true; + if (item.type != ItemID.Katana) { + return base.AltFunctionUse(item, player); } - - return base.AltFunctionUse(item, player); + return true; } public override bool? UseItem(Item item, Player player) {