Ports emote decls from Bay + automatic pain emotes. (#9215)

This commit is contained in:
Matt Atlas
2020-07-03 20:14:23 +02:00
committed by GitHub
parent 431949383f
commit 107bbc58d8
30 changed files with 1369 additions and 908 deletions
+7 -1
View File
@@ -43,6 +43,12 @@ mob/var/next_pain_time = 0
else
to_chat(src, "<span class='warning'>[message]</span>")
var/force_emote = species.get_pain_emote(src, power)
if(force_emote && prob(power))
var/decl/emote/use_emote = usable_emotes[force_emote]
if(!(use_emote.message_type == AUDIBLE_MESSAGE && silent))
emote(force_emote)
next_pain_time = world.time + (100-power)
/mob/living/carbon/human/proc/handle_pain()
@@ -81,7 +87,7 @@ mob/var/next_pain_time = 0
if(70 to 10000)
msg = "[burning ? species.organ_high_burn_message : species.organ_high_pain_message]"
msg = replacetext(msg, "%PARTNAME%", damaged_organ.name)
custom_pain(msg, maxdam, prob(10), damaged_organ, TRUE)
custom_pain(msg, maxdam, prob(30), damaged_organ, TRUE)
// Damage to internal organs hurts a lot.
for(var/obj/item/organ/internal/I in internal_organs)