Cleaning up some runtimes (#16027)

This commit is contained in:
Wildkins
2023-03-13 19:22:43 +00:00
committed by GitHub
parent 6ce513cb40
commit 209a0a2e0f
16 changed files with 42 additions and 20 deletions
+1 -1
View File
@@ -481,7 +481,7 @@ This function completely restores a damaged organ to perfect condition.
/obj/item/organ/external/proc/createwound(var/type = CUT, var/damage)
if(damage <= 0)
if(damage <= 0 || !owner)
return
//moved this before the open_wound check so that having many small wounds for example doesn't somehow protect you from taking internal damage (because of the return)
+1 -1
View File
@@ -42,7 +42,7 @@ mob/var/next_pain_time = 0
var/force_emote = species.get_pain_emote(src, power)
if(force_emote && prob(power))
var/singleton/emote/use_emote = usable_emotes[force_emote]
if(!(use_emote.message_type == AUDIBLE_MESSAGE && silent))
if(use_emote && !(use_emote.message_type == AUDIBLE_MESSAGE && silent))
emote(force_emote)
next_pain_time = world.time + 5 SECONDS
+2 -1
View File
@@ -194,7 +194,8 @@
/obj/item/organ/external/hand/take_damage(brute, burn, damage_flags, used_weapon, list/forbidden_limbs, silent)
. = ..()
owner.update_hud_hands()
if(owner)
owner.update_hud_hands()
/obj/item/organ/external/hand/removed()
owner.drop_from_inventory(owner.gloves)