remodularize vtec code

Works as expected now but, combat rework meme jog/spring override speeds
This commit is contained in:
Poojawa
2018-10-20 07:19:19 -05:00
parent 4fd8ca146b
commit d429eb67cd
3 changed files with 30 additions and 32 deletions
@@ -83,38 +83,6 @@
//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 (.)
@@ -1 +1,29 @@
// 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*1.25
action.button_icon_state = "Chevron_State_[currentState]"
action.UpdateButtonIcon()
return
@@ -43,6 +43,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
desc = "The jaws of the law."
force = 12
attack_verb = list("chomped", "bit", "ripped", "mauled", "enforced")
status = 1
to_chat(user, "<span class='notice'>Your jaws are now [status ? "Combat" : "Pup'd"].</span>")
else
name = "puppy jaws"
@@ -50,6 +51,7 @@ SLEEPER CODE IS IN game/objects/items/devices/dogborg_sleeper.dm !
desc = "The jaws of a small dog."
force = 5
attack_verb = list("nibbled", "bit", "gnawed", "chomped", "nommed")
status = 0
if(R.emagged)
to_chat(user, "<span class='notice'>Your jaws are now [status ? "Combat" : "Pup'd"].</span>")
update_icon()