Merge pull request #9863 from BlackMajor/Yote

No adrenals for borgs please
This commit is contained in:
nik707
2019-12-12 23:50:34 -06:00
committed by GitHub
3 changed files with 6 additions and 2 deletions

View File

@@ -74,7 +74,7 @@
/obj/item/borg/upgrade/vtec/action(mob/living/silicon/robot/R, user = usr)
. = ..()
if(.)
if(R.speed < 0)
if(!R.cansprint)
to_chat(R, "<span class='notice'>A VTEC unit is already installed!</span>")
to_chat(user, "<span class='notice'>There's no room for another VTEC unit!</span>")
return FALSE
@@ -82,11 +82,13 @@
//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)
R.cansprint = 0
/obj/item/borg/upgrade/vtec/deactivate(mob/living/silicon/robot/R, user = usr)
. = ..()
if (.)
R.speed = initial(R.speed)
R.cansprint = 1
/obj/item/borg/upgrade/disablercooler
name = "cyborg rapid energy blaster cooling module"

View File

@@ -112,6 +112,8 @@
var/bellyup = 0
var/dogborg = FALSE
var/cansprint = 1
/mob/living/silicon/robot/get_cell()
return cell

View File

@@ -14,7 +14,7 @@
. += speed
/mob/living/silicon/robot/proc/togglesprint(shutdown = FALSE) //Basically a copypaste of the proc from /mob/living/carbon/human
if(!shutdown && (!cell || cell.charge < 25))
if(!shutdown && (!cell || cell.charge < 25) || !cansprint)
return FALSE
sprinting = shutdown ? FALSE : !sprinting
if(!resting && canmove)