mirror of
https://github.com/SPLURT-Station/S.P.L.U.R.T-Station-13.git
synced 2025-12-10 09:54:52 +00:00
Merge pull request #9962 from Ghommie/Ghommie-cit399
Fixes limbs' set_disabled.
This commit is contained in:
@@ -248,11 +248,12 @@
|
|||||||
|
|
||||||
/obj/item/bodypart/proc/set_disabled(new_disabled)
|
/obj/item/bodypart/proc/set_disabled(new_disabled)
|
||||||
if(disabled == new_disabled)
|
if(disabled == new_disabled)
|
||||||
return
|
return FALSE
|
||||||
disabled = new_disabled
|
disabled = new_disabled
|
||||||
owner.update_health_hud() //update the healthdoll
|
owner.update_health_hud() //update the healthdoll
|
||||||
owner.update_body()
|
owner.update_body()
|
||||||
owner.update_canmove()
|
owner.update_canmove()
|
||||||
|
return TRUE
|
||||||
|
|
||||||
//Updates an organ's brute/burn states for use by update_damage_overlays()
|
//Updates an organ's brute/burn states for use by update_damage_overlays()
|
||||||
//Returns 1 if we need to update overlays. 0 otherwise.
|
//Returns 1 if we need to update overlays. 0 otherwise.
|
||||||
@@ -654,20 +655,17 @@
|
|||||||
|
|
||||||
/obj/item/bodypart/l_arm/set_disabled(new_disabled)
|
/obj/item/bodypart/l_arm/set_disabled(new_disabled)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(disabled == new_disabled)
|
if(!.)
|
||||||
return
|
return
|
||||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
if(owner.stat < UNCONSCIOUS)
|
||||||
if(owner.stat > UNCONSCIOUS)
|
switch(disabled)
|
||||||
owner.emote("scream")
|
if(BODYPART_DISABLED_DAMAGE)
|
||||||
if(. && (owner.stat > DEAD))
|
owner.emote("scream")
|
||||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||||
if(held_index)
|
if(BODYPART_DISABLED_PARALYSIS)
|
||||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
if(held_index)
|
||||||
if(. && (owner.stat > DEAD))
|
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
|
||||||
if(held_index)
|
|
||||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
|
||||||
if(owner.hud_used)
|
if(owner.hud_used)
|
||||||
var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
|
var/obj/screen/inventory/hand/L = owner.hud_used.hand_slots["[held_index]"]
|
||||||
if(L)
|
if(L)
|
||||||
@@ -718,20 +716,17 @@
|
|||||||
|
|
||||||
/obj/item/bodypart/r_arm/set_disabled(new_disabled)
|
/obj/item/bodypart/r_arm/set_disabled(new_disabled)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(disabled == new_disabled)
|
if(!.)
|
||||||
return
|
return
|
||||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
if(owner.stat < UNCONSCIOUS)
|
||||||
if(owner.stat > UNCONSCIOUS)
|
switch(disabled)
|
||||||
owner.emote("scream")
|
if(BODYPART_DISABLED_DAMAGE)
|
||||||
if(. && (owner.stat > DEAD))
|
owner.emote("scream")
|
||||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||||
if(held_index)
|
if(BODYPART_DISABLED_PARALYSIS)
|
||||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
if(held_index)
|
||||||
if(. && (owner.stat > DEAD))
|
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
||||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
|
||||||
if(held_index)
|
|
||||||
owner.dropItemToGround(owner.get_item_for_held_index(held_index))
|
|
||||||
if(owner.hud_used)
|
if(owner.hud_used)
|
||||||
var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
|
var/obj/screen/inventory/hand/R = owner.hud_used.hand_slots["[held_index]"]
|
||||||
if(R)
|
if(R)
|
||||||
@@ -783,15 +778,13 @@
|
|||||||
|
|
||||||
/obj/item/bodypart/l_leg/set_disabled(new_disabled)
|
/obj/item/bodypart/l_leg/set_disabled(new_disabled)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(disabled == new_disabled)
|
if(!. || owner.stat >= UNCONSCIOUS)
|
||||||
return
|
return
|
||||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
switch(disabled)
|
||||||
if(owner.stat > UNCONSCIOUS)
|
if(BODYPART_DISABLED_DAMAGE)
|
||||||
owner.emote("scream")
|
owner.emote("scream")
|
||||||
if(. && (owner.stat > DEAD))
|
|
||||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
if(BODYPART_DISABLED_PARALYSIS)
|
||||||
if(. && (owner.stat > DEAD))
|
|
||||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||||
|
|
||||||
|
|
||||||
@@ -845,15 +838,13 @@
|
|||||||
|
|
||||||
/obj/item/bodypart/r_leg/set_disabled(new_disabled)
|
/obj/item/bodypart/r_leg/set_disabled(new_disabled)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(disabled == new_disabled)
|
if(!. || owner.stat >= UNCONSCIOUS)
|
||||||
return
|
return
|
||||||
if(disabled == BODYPART_DISABLED_DAMAGE)
|
switch(disabled)
|
||||||
if(owner.stat > UNCONSCIOUS)
|
if(BODYPART_DISABLED_DAMAGE)
|
||||||
owner.emote("scream")
|
owner.emote("scream")
|
||||||
if(. && (owner.stat > DEAD))
|
|
||||||
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
to_chat(owner, "<span class='userdanger'>Your [name] is too damaged to function!</span>")
|
||||||
else if(disabled == BODYPART_DISABLED_PARALYSIS)
|
if(BODYPART_DISABLED_PARALYSIS)
|
||||||
if(. && (owner.stat > DEAD))
|
|
||||||
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
to_chat(owner, "<span class='userdanger'>You can't feel your [name]!</span>")
|
||||||
|
|
||||||
/obj/item/bodypart/r_leg/digitigrade
|
/obj/item/bodypart/r_leg/digitigrade
|
||||||
|
|||||||
Reference in New Issue
Block a user