This commit is contained in:
joep van der velden
2018-11-15 14:06:22 +01:00
parent 888e26b22c
commit 54f033ac75
2 changed files with 25 additions and 1 deletions
@@ -207,7 +207,6 @@
canmove = 0
else
canmove = 1
update_stat("robot/update_canmove")
update_transform()
if(!delay_action_updates)
update_action_buttons_icon()
@@ -34,6 +34,31 @@
// diag_hud_set_health()
// update_health_hud()
/mob/living/silicon/robot/SetStunned(amount, updating = 1, force = 0) //if you REALLY need to set stun to a set amount without the whole "can't go below current stunned"
. = STATUS_UPDATE_CANMOVE
if((!!amount) == (!!stunned)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
if(status_flags & CANSTUN || force)
stunned = max(amount, 0)
if(updating)
update_stat()
else
return STATUS_UPDATE_NONE
/mob/living/silicon/robot/SetWeakened(amount, updating = 1, force = 0)
. = STATUS_UPDATE_CANMOVE
if((!!amount) == (!!weakened)) // We're not changing from + to 0 or vice versa
updating = FALSE
. = STATUS_UPDATE_NONE
if(status_flags & CANWEAKEN || force)
weakened = max(amount, 0)
if(updating)
update_stat()
else
return STATUS_UPDATE_NONE
/mob/living/silicon/robot/update_revive(updating = TRUE)
. = ..(updating)
if(.)