From a873ffc3447f1cc044b1bd2ec68688f3f1f027d2 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Sat, 12 Dec 2020 01:47:10 +0100 Subject: [PATCH] [MIRROR] Ninja Equipment Fixes (#2142) * Ninja Equipment Fixes (#55240) Fixes an issue with space ninja not gaining speed in some issues on suit initialization. Also finally fixes the issue of space ninja cooldowns Both of these are issues with Space Ninja and should be fixed so the antag can function properly. * Ninja Equipment Fixes Co-authored-by: IndieanaJones <47086570+IndieanaJones@users.noreply.github.com> --- code/modules/ninja/suit/shoes.dm | 1 + code/modules/ninja/suit/suit.dm | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/code/modules/ninja/suit/shoes.dm b/code/modules/ninja/suit/shoes.dm index cde636bb115..d2e4ffcc04b 100644 --- a/code/modules/ninja/suit/shoes.dm +++ b/code/modules/ninja/suit/shoes.dm @@ -21,3 +21,4 @@ min_cold_protection_temperature = SHOES_MIN_TEMP_PROTECT heat_protection = FEET max_heat_protection_temperature = SHOES_MAX_TEMP_PROTECT + slowdown = -1 diff --git a/code/modules/ninja/suit/suit.dm b/code/modules/ninja/suit/suit.dm index 5ebec42d049..c4988e57ad9 100644 --- a/code/modules/ninja/suit/suit.dm +++ b/code/modules/ninja/suit/suit.dm @@ -100,7 +100,7 @@ terminate() // Kills the suit and attached objects. else if(cell.charge > 0) if(s_coold > 0) - s_coold -= delta_time // Checks for ability s_cooldown first. + s_coold = max(s_coold - delta_time, 0) // Checks for ability s_cooldown first. cell.charge -= s_cost * delta_time // s_cost is the default energy cost each ntick, usually 5. if(stealth) // If stealth is active. cell.charge -= s_acost * delta_time @@ -205,7 +205,6 @@ ADD_TRAIT(n_hood, TRAIT_NODROP, NINJA_SUIT_TRAIT) n_shoes = ninja.shoes ADD_TRAIT(n_shoes, TRAIT_NODROP, NINJA_SUIT_TRAIT) - n_shoes.slowdown-- n_gloves = ninja.gloves ADD_TRAIT(n_gloves, TRAIT_NODROP, NINJA_SUIT_TRAIT) n_mask = ninja.wear_mask @@ -230,7 +229,6 @@ n_hood.icon_state = "s-ninja" if(n_shoes) REMOVE_TRAIT(n_shoes, TRAIT_NODROP, NINJA_SUIT_TRAIT) - n_shoes.slowdown++ if(n_gloves) n_gloves.icon_state = "black" REMOVE_TRAIT(n_gloves, TRAIT_NODROP, NINJA_SUIT_TRAIT)