From 1aefd0de23cd292f8abaef2bdb5d0475b8aa5222 Mon Sep 17 00:00:00 2001 From: Matt Atlas Date: Mon, 7 Sep 2020 20:33:53 +0200 Subject: [PATCH] Fixes human think() emotes. (#9906) --- code/_onclick/other_mobs.dm | 2 +- code/modules/admin/verbs/bluespacetech.dm | 2 +- code/modules/mob/language/station.dm | 2 +- code/modules/mob/living/bot/cleanbot.dm | 2 +- code/modules/mob/living/bot/ed209bot.dm | 16 ++++---- code/modules/mob/living/bot/floorbot.dm | 2 +- code/modules/mob/living/bot/medbot.dm | 2 +- code/modules/mob/living/bot/secbot.dm | 2 +- code/modules/mob/living/carbon/human/human.dm | 2 +- .../mob/living/carbon/human/human_powers.dm | 2 +- .../human/species/station/human/human.dm | 12 +++--- .../carbon/human/species/station/monkey.dm | 4 +- code/modules/mob/living/say.dm | 4 +- .../mob/living/silicon/robot/presets.dm | 2 +- .../mob/living/simple_animal/hostile/bear.dm | 12 +++--- .../mob/living/simple_animal/hostile/carp.dm | 2 +- .../mob/living/simple_animal/simple_animal.dm | 4 +- .../artifacts/items/scrying_orb.dm | 2 +- html/changelogs/mattatlas-emotefixes.yml | 41 +++++++++++++++++++ 19 files changed, 79 insertions(+), 38 deletions(-) create mode 100644 html/changelogs/mattatlas-emotefixes.yml diff --git a/code/_onclick/other_mobs.dm b/code/_onclick/other_mobs.dm index 07788621a5c..bbb20c2ad0c 100644 --- a/code/_onclick/other_mobs.dm +++ b/code/_onclick/other_mobs.dm @@ -156,7 +156,7 @@ return if(istype(A,/mob/living)) if(melee_damage_upper == 0) - custom_emote(1,"[friendly] [A]!") + custom_emote(VISIBLE_MESSAGE,"[friendly] [A]!") return if(ckey) add_logs(src, A, attacktext) diff --git a/code/modules/admin/verbs/bluespacetech.dm b/code/modules/admin/verbs/bluespacetech.dm index 63ce3944a00..87129ace9bb 100644 --- a/code/modules/admin/verbs/bluespacetech.dm +++ b/code/modules/admin/verbs/bluespacetech.dm @@ -159,7 +159,7 @@ bsv() return - src.custom_emote(1,"presses a button on their suit, followed by a polite bow.") + src.custom_emote(VISIBLE_MESSAGE,"presses a button on their suit, followed by a polite bow.") spark(src, 5, alldirs) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, src), 10, TIMER_CLIENT_TIME) animate(src, alpha = 0, time = 9, easing = QUAD_EASING) diff --git a/code/modules/mob/language/station.dm b/code/modules/mob/language/station.dm index ddc4b3b46f3..12f2d921be9 100644 --- a/code/modules/mob/language/station.dm +++ b/code/modules/mob/language/station.dm @@ -189,7 +189,7 @@ var/msg = "[name], [speaker_mask][format_message(message, get_spoken_verb(message))]" if(isvaurca(speaker)) - speaker.custom_emote(1, "[pick("twitches their antennae", "twitches their antennae rhythmically")].") + speaker.custom_emote(VISIBLE_MESSAGE, "[pick("twitches their antennae", "twitches their antennae rhythmically")].") if (within_jamming_range(speaker)) // The user thinks that the message got through. diff --git a/code/modules/mob/living/bot/cleanbot.dm b/code/modules/mob/living/bot/cleanbot.dm index 8f6735f6534..0fa4578cec7 100644 --- a/code/modules/mob/living/bot/cleanbot.dm +++ b/code/modules/mob/living/bot/cleanbot.dm @@ -107,7 +107,7 @@ var/list/cleanbot_types // Going to use this to generate a list of types once th return if(!screw_loose && !odd_button && prob(2) && world.time > last_emote + 2 MINUTES) - custom_emote(2, "makes an excited beeping booping sound!") + custom_emote(AUDIBLE_MESSAGE, "makes an excited beeping booping sound!") last_emote = world.time if(screw_loose && prob(5)) // Make a mess diff --git a/code/modules/mob/living/bot/ed209bot.dm b/code/modules/mob/living/bot/ed209bot.dm index 3f2a1515087..5bef2537a4a 100644 --- a/code/modules/mob/living/bot/ed209bot.dm +++ b/code/modules/mob/living/bot/ed209bot.dm @@ -140,7 +140,7 @@ arrest_type = 0 if(isnull(target)) - custom_emote(2, "[emote_hear], \"Error, unit is unable to find target in view range!\"") + custom_emote(AUDIBLE_MESSAGE, "[emote_hear], \"Error, unit is unable to find target in view range!\"") return 0 else if(ishuman(target)) @@ -155,10 +155,10 @@ if(R && R.security) R.security.criminal = "*Arrest*" else - custom_emote(2, "[emote_hear], \"Warning, [target] does not have Security records! Enabling security records check mode!\"") + custom_emote(AUDIBLE_MESSAGE, "[emote_hear], \"Warning, [target] does not have Security records! Enabling security records check mode!\"") check_records = TRUE mode = SECBOT_HUNT - custom_emote(2, "[emote_hear], \"[arrest_type ? ("Detaining") : ("Arresting")] [target]\"") + custom_emote(AUDIBLE_MESSAGE, "[emote_hear], \"[arrest_type ? ("Detaining") : ("Arresting")] [target]\"") /mob/living/bot/secbot/ed209/proc/stay_command(var/mob/speaker,var/text) walk_to(src, src, 0, move_to_delay) @@ -166,7 +166,7 @@ auto_patrol = 0 target = null check_records = FALSE - custom_emote(2, "[emote_hear], \"Roger that, going into idle mode. Auto patrol disabled.\"") + custom_emote(AUDIBLE_MESSAGE, "[emote_hear], \"Roger that, going into idle mode. Auto patrol disabled.\"") return 1 /mob/living/bot/secbot/ed209/proc/stop_command(var/mob/speaker,var/text) @@ -174,7 +174,7 @@ return walk_to(src, src, 0, move_to_delay) check_records = FALSE - custom_emote(2, "[emote_hear], \"Roger that, unit going offline.\"") + custom_emote(AUDIBLE_MESSAGE, "[emote_hear], \"Roger that, unit going offline.\"") turn_off() return 1 @@ -183,7 +183,7 @@ mode = SECBOT_IDLE auto_patrol = 1 target = null - custom_emote(2, "[emote_hear], \"Roger that, starting patrol now.\"") + custom_emote(AUDIBLE_MESSAGE, "[emote_hear], \"Roger that, starting patrol now.\"") return 1 /mob/living/bot/secbot/ed209/proc/follow_command(var/mob/speaker,var/text) @@ -191,7 +191,7 @@ if(findtext(text,"me")) mode = SECBOT_FOLLOW target = speaker - custom_emote(2, "[emote_hear], \"Roger that, following you\"") + custom_emote(AUDIBLE_MESSAGE, "[emote_hear], \"Roger that, following you\"") return 1 target = get_target_by_name(text) @@ -202,7 +202,7 @@ return 0 mode = SECBOT_FOLLOW - custom_emote(2, "[emote_hear], \"Roger that, following [target]\"") + custom_emote(AUDIBLE_MESSAGE, "[emote_hear], \"Roger that, following [target]\"") return 1 diff --git a/code/modules/mob/living/bot/floorbot.dm b/code/modules/mob/living/bot/floorbot.dm index 410499d816f..859a15e2e4c 100644 --- a/code/modules/mob/living/bot/floorbot.dm +++ b/code/modules/mob/living/bot/floorbot.dm @@ -115,7 +115,7 @@ addTiles(1) if(prob(5)) - custom_emote(2, "makes an excited booping beeping sound!") + custom_emote(AUDIBLE_MESSAGE, "makes an excited booping beeping sound!") /mob/living/bot/floorbot/think() ..() diff --git a/code/modules/mob/living/bot/medbot.dm b/code/modules/mob/living/bot/medbot.dm index 7a45b8aa635..dd5defcb266 100644 --- a/code/modules/mob/living/bot/medbot.dm +++ b/code/modules/mob/living/bot/medbot.dm @@ -68,7 +68,7 @@ if(last_newpatient_speak + 300 < world.time) var/message = pick("Hey, [H.name]! Hold on, I'm coming.", "Wait [H.name]! I want to help!", "[H.name], you appear to be injured!") say(message) - custom_emote(1, "points at [H.name].") + custom_emote(VISIBLE_MESSAGE, "points at [H.name].") last_newpatient_speak = world.time break diff --git a/code/modules/mob/living/bot/secbot.dm b/code/modules/mob/living/bot/secbot.dm index a00e82552b7..1a3e7b2e277 100644 --- a/code/modules/mob/living/bot/secbot.dm +++ b/code/modules/mob/living/bot/secbot.dm @@ -354,7 +354,7 @@ if(threat >= 4) target = M say("Level [threat] infraction alert!") - custom_emote(1, "points at [M.name]!") + custom_emote(VISIBLE_MESSAGE, "points at [M.name]!") mode = SECBOT_HUNT break return diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm index de972ccaedb..c0366333bdc 100644 --- a/code/modules/mob/living/carbon/human/human.dm +++ b/code/modules/mob/living/carbon/human/human.dm @@ -963,7 +963,7 @@ nothing_to_puke = TRUE if(nothing_to_puke) - custom_emote(1,"dry heaves.") + custom_emote(VISIBLE_MESSAGE,"dry heaves.") return var/list/vomitCandidate = typecacheof(/obj/machinery/disposal) + typecacheof(/obj/structure/sink) + typecacheof(/obj/structure/toilet) diff --git a/code/modules/mob/living/carbon/human/human_powers.dm b/code/modules/mob/living/carbon/human/human_powers.dm index 7f9494208d2..c625d02508e 100644 --- a/code/modules/mob/living/carbon/human/human_powers.dm +++ b/code/modules/mob/living/carbon/human/human_powers.dm @@ -1149,7 +1149,7 @@ mob/living/carbon/human/proc/change_monitor() to_chat(src, SPAN_NOTICE("You can't flick your tongue out with something covering your face.")) return else - custom_emote(1, "flicks their tongue out.") + custom_emote(VISIBLE_MESSAGE, "flicks their tongue out.") var/datum/gas_mixture/mixture = src.loc.return_air() var/total_moles = mixture.total_moles diff --git a/code/modules/mob/living/carbon/human/species/station/human/human.dm b/code/modules/mob/living/carbon/human/species/station/human/human.dm index cc7427ca34c..dd460f83728 100644 --- a/code/modules/mob/living/carbon/human/species/station/human/human.dm +++ b/code/modules/mob/living/carbon/human/species/station/human/human.dm @@ -57,7 +57,7 @@ H.emote("scream") if(!H.restrained() && H.lying && H.shock_stage >= 60 && prob(3)) - H.custom_emote("thrashes in agony") + H.custom_emote(VISIBLE_MESSAGE, "thrashes in agony") if(!H.restrained() && H.shock_stage < 40 && prob(3)) var/maxdam = 0 @@ -73,13 +73,13 @@ maxdam = dam if(damaged_organ) if(damaged_organ.status & ORGAN_BLEEDING) - H.custom_emote("clutches [H.get_pronoun("his")] [damaged_organ.name], trying to stop the blood.") + H.custom_emote(VISIBLE_MESSAGE, "clutches [H.get_pronoun("his")] [damaged_organ.name], trying to stop the blood.") else if(damaged_organ.status & ORGAN_BROKEN) - H.custom_emote("holds [H.get_pronoun("his")] [damaged_organ.name] carefully.") + H.custom_emote(VISIBLE_MESSAGE, "holds [H.get_pronoun("his")] [damaged_organ.name] carefully.") else if(damaged_organ.burn_dam > damaged_organ.brute_dam && damaged_organ.organ_tag != BP_HEAD) - H.custom_emote("blows on [H.get_pronoun("his")] [damaged_organ.name] carefully.") + H.custom_emote(VISIBLE_MESSAGE, "blows on [H.get_pronoun("his")] [damaged_organ.name] carefully.") else - H.custom_emote("rubs [H.get_pronoun("his")] [damaged_organ.name] carefully.") + H.custom_emote(VISIBLE_MESSAGE, "rubs [H.get_pronoun("his")] [damaged_organ.name] carefully.") for(var/obj/item/organ/I in H.internal_organs) if((I.status & ORGAN_DEAD) || BP_IS_ROBOTIC(I)) @@ -87,4 +87,4 @@ if(I.damage > 2) if(prob(2)) var/obj/item/organ/external/parent = H.get_organ(I.parent_organ) - H.custom_emote("clutches [H.get_pronoun("his")] [parent.name]!") + H.custom_emote(VISIBLE_MESSAGE, "clutches [H.get_pronoun("his")] [parent.name]!") diff --git a/code/modules/mob/living/carbon/human/species/station/monkey.dm b/code/modules/mob/living/carbon/human/species/station/monkey.dm index fa8089b1204..a7291ebc52f 100644 --- a/code/modules/mob/living/carbon/human/species/station/monkey.dm +++ b/code/modules/mob/living/carbon/human/species/station/monkey.dm @@ -60,7 +60,7 @@ H.emote(pick("scratch","jump","roll","tail")) if(H.get_shock() && H.shock_stage < 40 && prob(3)) - H.custom_emote("chimpers pitifully") + H.custom_emote(AUDIBLE_MESSAGE, "chimpers pitifully") if(H.shock_stage > 10 && prob(3)) H.emote(pick("cry","whimper")) @@ -69,7 +69,7 @@ H.emote("scream") if(!H.restrained() && H.lying && H.shock_stage >= 60 && prob(3)) - H.custom_emote("thrashes in agony") + H.custom_emote(AUDIBLE_MESSAGE, "thrashes in agony") /datum/species/monkey/get_random_name() return "[lowertext(name)] ([rand(100,999)])" diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index 68340a0076e..87f417d45c9 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -167,7 +167,7 @@ proc/get_radio_key_from_channel(var/channel) if(emote.Find(message)) if(emote.group[1] == "*") return emote(copytext(message, 2)) - if(emote.group[1] == "^") return custom_emote(1, copytext(message,2)) + if(emote.group[1] == "^") return custom_emote(VISIBLE_MESSAGE, copytext(message,2)) //parse the radio code and consume it if (message_mode) @@ -225,7 +225,7 @@ proc/get_radio_key_from_channel(var/channel) if (speaking) if (speaking.flags & NONVERBAL) if (prob(30)) - src.custom_emote(1, "[pick(speaking.signlang_verb)].") + src.custom_emote(VISIBLE_MESSAGE, "[pick(speaking.signlang_verb)].") if (speaking.flags & SIGNLANG) return say_signlang(message, pick(speaking.signlang_verb), speaking) diff --git a/code/modules/mob/living/silicon/robot/presets.dm b/code/modules/mob/living/silicon/robot/presets.dm index 62ca9176d90..8b85f44477a 100644 --- a/code/modules/mob/living/silicon/robot/presets.dm +++ b/code/modules/mob/living/silicon/robot/presets.dm @@ -52,7 +52,7 @@ set desc = "Activate bluespace to leave and return to your original mob (if you have one)." set category = "BST" - src.custom_emote(1, "politely beeps as its lights start to flash.") + src.custom_emote(VISIBLE_MESSAGE, "politely beeps as its lights start to flash.") spark(src, 5, alldirs) addtimer(CALLBACK(GLOBAL_PROC, .proc/qdel, src), 10, TIMER_CLIENT_TIME) animate(src, alpha = 0, time = 9, easing = QUAD_EASING) diff --git a/code/modules/mob/living/simple_animal/hostile/bear.dm b/code/modules/mob/living/simple_animal/hostile/bear.dm index 310cd123a02..0b92edde5ec 100644 --- a/code/modules/mob/living/simple_animal/hostile/bear.dm +++ b/code/modules/mob/living/simple_animal/hostile/bear.dm @@ -137,7 +137,7 @@ if(stance_step in list(1,4,7)) //every 3 ticks var/action = pick( list( "growls at [target_mob]", "stares angrily at [target_mob]", "prepares to attack [target_mob]", "closely watches [target_mob]" ) ) if(action) - custom_emote(1,action) + custom_emote(VISIBLE_MESSAGE,action) speak_audio() else stance_step-- @@ -240,7 +240,7 @@ /mob/living/simple_animal/hostile/bear/proc/tire_out() - custom_emote(1, "is worn out and needs to rest." ) + custom_emote(VISIBLE_MESSAGE, "is worn out and needs to rest." ) set_stance(HOSTILE_STANCE_TIRED) speak_audio() stance_step = 0 @@ -294,7 +294,7 @@ /mob/living/simple_animal/hostile/bear/FoundTarget() if(target_mob) turns_since_hit = 0 - custom_emote(1,"stares alertly at [target_mob]") + custom_emote(VISIBLE_MESSAGE,"stares alertly at [target_mob]") speak_audio() //If we're idle, move up to alert. @@ -323,7 +323,7 @@ var/targetname = target_mob.name if(..()) turns_since_hit = 0 - custom_emote(1, pick( list("crushes [targetname] in its arms","slashes at [targetname]", "bites [targetname]", "mauls [targetname]", "tears into [targetname]", "rends [targetname]") ) ) + custom_emote(VISIBLE_MESSAGE, pick( list("crushes [targetname] in its arms","slashes at [targetname]", "bites [targetname]", "mauls [targetname]", "tears into [targetname]", "rends [targetname]") ) ) if (prob(15)) growl_loud() else if (prob(10)) @@ -350,7 +350,7 @@ if (bearmode != former) var/healthpercent if (bearmode == BEARMODE_SPACE) - custom_emote(1, "looks bright, energised and aggressive!" ) + custom_emote(VISIBLE_MESSAGE, "looks bright, energised and aggressive!" ) healthpercent = health / maxHealth maxHealth = initial(maxHealth) * 1.5 health = maxHealth * healthpercent @@ -359,7 +359,7 @@ turns_per_move -= 2 growl_loud() else - custom_emote(1, "looks darker and more subdued." ) + custom_emote(VISIBLE_MESSAGE, "looks darker and more subdued." ) healthpercent = health / maxHealth maxHealth = initial(maxHealth) health = maxHealth * healthpercent diff --git a/code/modules/mob/living/simple_animal/hostile/carp.dm b/code/modules/mob/living/simple_animal/hostile/carp.dm index e43f0491a17..cd0bf43d69a 100644 --- a/code/modules/mob/living/simple_animal/hostile/carp.dm +++ b/code/modules/mob/living/simple_animal/hostile/carp.dm @@ -106,7 +106,7 @@ /mob/living/simple_animal/hostile/carp/russian/FindTarget() . = ..() if(.) - custom_emote(1,"spots a filthy capitalist!") + custom_emote(VISIBLE_MESSAGE,"spots a filthy capitalist!") /mob/living/simple_animal/hostile/carp/shark name = "space shark" diff --git a/code/modules/mob/living/simple_animal/simple_animal.dm b/code/modules/mob/living/simple_animal/simple_animal.dm index 20160f5b25c..5162133e800 100644 --- a/code/modules/mob/living/simple_animal/simple_animal.dm +++ b/code/modules/mob/living/simple_animal/simple_animal.dm @@ -359,10 +359,10 @@ return /mob/living/simple_animal/proc/visible_emote(var/act_desc, var/log_emote=1) - custom_emote(1, act_desc, log_emote) + custom_emote(VISIBLE_MESSAGE, act_desc, log_emote) /mob/living/simple_animal/proc/audible_emote(var/act_desc) - custom_emote(2, act_desc) + custom_emote(AUDIBLE_MESSAGE, act_desc) /* mob/living/simple_animal/bullet_act(var/obj/item/projectile/Proj) diff --git a/code/modules/spell_system/artifacts/items/scrying_orb.dm b/code/modules/spell_system/artifacts/items/scrying_orb.dm index 57ee0b4ebbe..3c6d7270512 100644 --- a/code/modules/spell_system/artifacts/items/scrying_orb.dm +++ b/code/modules/spell_system/artifacts/items/scrying_orb.dm @@ -23,7 +23,7 @@ to_chat(user, "You stare deep into the abyss... and the abyss stares back.") sleep(10) to_chat(user, "Your [E.name] fill with painful light, and you feel a sharp burning sensation in your head!") - user.custom_emote(2, "screams in horror!") + user.custom_emote(AUDIBLE_MESSAGE, "screams in horror!") playsound(user, 'sound/hallucinations/far_noise.ogg', 40, 1) user.drop_item() user.visible_message("Ashes pour out of [user]'s eye sockets!") diff --git a/html/changelogs/mattatlas-emotefixes.yml b/html/changelogs/mattatlas-emotefixes.yml new file mode 100644 index 00000000000..3cdc8dfa536 --- /dev/null +++ b/html/changelogs/mattatlas-emotefixes.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - bugfix: "Fixes no-client human pain emotes not working."