diff --git a/code/game/objects/items/robot/robot_upgrades.dm b/code/game/objects/items/robot/robot_upgrades.dm index 975908106e..9e12bbd1d7 100644 --- a/code/game/objects/items/robot/robot_upgrades.dm +++ b/code/game/objects/items/robot/robot_upgrades.dm @@ -79,7 +79,40 @@ to_chat(user, "There's no room for another VTEC unit!") return FALSE - 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) + + +/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 + /obj/item/borg/upgrade/vtec/deactivate(mob/living/silicon/robot/R, user = usr) . = ..() diff --git a/icons/mob/actions.dmi b/icons/mob/actions.dmi index 7df2abd776..0ef4996b07 100644 Binary files a/icons/mob/actions.dmi and b/icons/mob/actions.dmi differ