From 1d6355534c127435ed9885946fe627f58da47450 Mon Sep 17 00:00:00 2001 From: Poojawa Date: Sat, 20 Oct 2018 04:18:09 -0500 Subject: [PATCH] Unmodularizes vtech controls I swear most of this shit just doesn't work in modularization anymore. --- .../objects/items/robot/robot_upgrades.dm | 34 ++++++++++++++++++- .../objects/items/robot/robot_upgrades.dm | 29 ---------------- 2 files changed, 33 insertions(+), 30 deletions(-) diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 3bac97b009..d11919cf32 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -80,9 +80,41 @@ return FALSE //R.speed = -2 // Gotta go fast. - //Citadel change - makes vtecs give an ability rather than reducing the borg's speed instantly + //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) +// Citadel's Vtech Controller +/obj/effect/proc_holder/silicon/cyborg/vtecControl + name = "vTec Control" + desc = "Allows finer-grained control of the vTec speed boost." + action_icon = 'icons/mob/actions.dmi' + action_icon_state = "Chevron_State_0" + + var/currentState = 0 + var/maxReduction = 2 + + +/obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user) + + var/mob/living/silicon/robot/self = usr + + currentState = (currentState + 1) % 3 + + if(usr) + switch(currentState) + if (0) + self.speed += maxReduction + if (1) + self.speed -= maxReduction*0.5 + if (2) + self.speed -= maxReduction*0.5 + + action.button_icon_state = "Chevron_State_[currentState]" + action.UpdateButtonIcon() + + return +//End of Citadel vtec controller edit + /obj/item/borg/upgrade/vtec/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() if (.) diff --git a/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm b/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm index 279685e94a..8b13789179 100644 --- a/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm +++ b/modular_citadel/code/game/objects/items/robot/robot_upgrades.dm @@ -1,30 +1 @@ -//V-tech kicked in yo -/obj/effect/proc_holder/silicon/cyborg/vtecControl - name = "vTec Control" - desc = "Allows finer-grained control of the vTec speed boost." - action_icon = 'icons/mob/actions.dmi' - action_icon_state = "Chevron_State_0" - var/currentState = 0 - var/maxReduction = 2 - - -/obj/effect/proc_holder/silicon/cyborg/vtecControl/Click(mob/living/silicon/robot/user) - - var/mob/living/silicon/robot/self = usr - - currentState = (currentState + 1) % 3 - - if(usr) - switch(currentState) - if (0) - self.speed += maxReduction - if (1) - self.speed -= maxReduction*0.5 - if (2) - self.speed -= maxReduction*0.5 - - action.button_icon_state = "Chevron_State_[currentState]" - action.UpdateButtonIcon() - - return