From d5993539b8a24a90c761d787b0478a0d66e59166 Mon Sep 17 00:00:00 2001 From: DeltaFire Date: Thu, 12 Nov 2020 16:27:09 +0100 Subject: [PATCH] fixes vtec persisting after removal --- code/game/objects/items/robot/robot_upgrades.dm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 9f098bc16c..291fc30aa2 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -80,6 +80,7 @@ as performing this in action() will cause the upgrade to end up in the borg inst desc = "Used to kick in a cyborg's VTEC systems, increasing their speed." icon_state = "cyborg_upgrade2" require_module = 1 + var/obj/effect/proc_holder/silicon/cyborg/vtecControl/VC /obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R, user = usr) . = ..() @@ -91,12 +92,14 @@ as performing this in action() will cause the upgrade to end up in the borg inst //R.speed = -2 // Gotta go fast. //Citadel change - makes vtecs give an ability rather than reducing the borg's speed instantly - R.AddAbility(new/obj/effect/proc_holder/silicon/cyborg/vtecControl) + VC = new /obj/effect/proc_holder/silicon/cyborg/vtecControl + R.AddAbility(VC) R.cansprint = 0 /obj/item/borg/upgrade/vtec/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() if (.) + R.RemoveAbility(VC) R.speed = initial(R.speed) R.cansprint = 1