Improving keborgs' movement, not removing.
This commit is contained in:
@@ -5,21 +5,23 @@
|
||||
. = ..()
|
||||
if(. && sprinting && !(movement_type & FLYING) && canmove && !resting)
|
||||
if(!(cell?.use(25)))
|
||||
togglesprint()
|
||||
togglesprint(TRUE)
|
||||
|
||||
/mob/living/silicon/robot/movement_delay()
|
||||
. = ..()
|
||||
if(!resting && !sprinting)
|
||||
. += 1
|
||||
|
||||
/mob/living/silicon/robot/proc/togglesprint() //Basically a copypaste of the proc from /mob/living/carbon/human
|
||||
sprinting = !sprinting
|
||||
/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))
|
||||
return FALSE
|
||||
sprinting = shutdown ? FALSE : !sprinting
|
||||
if(!resting && canmove)
|
||||
if(sprinting)
|
||||
playsound_local(src, 'modular_citadel/sound/misc/sprintactivate.ogg', 50, FALSE, pressure_affected = FALSE)
|
||||
else
|
||||
if(!(cell?.charge))
|
||||
return FALSE
|
||||
if(shutdown)
|
||||
playsound_local(src, 'sound/effects/light_flicker.ogg', 50, FALSE, pressure_affected = FALSE)
|
||||
playsound_local(src, 'modular_citadel/sound/misc/sprintdeactivate.ogg', 50, FALSE, pressure_affected = FALSE)
|
||||
if(hud_used && hud_used.static_inventory)
|
||||
for(var/obj/screen/sprintbutton/selector in hud_used.static_inventory)
|
||||
|
||||
Reference in New Issue
Block a user