Fixes human think() emotes. (#9906)

This commit is contained in:
Matt Atlas
2020-09-07 20:33:53 +02:00
committed by GitHub
parent a590c39817
commit 1aefd0de23
19 changed files with 79 additions and 38 deletions
+1 -1
View File
@@ -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)
+1 -1
View File
@@ -189,7 +189,7 @@
var/msg = "<i><span class='game say'>[name], <span class='name'>[speaker_mask]</span>[format_message(message, get_spoken_verb(message))]</span></i>"
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.
+1 -1
View File
@@ -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
+8 -8
View File
@@ -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
+1 -1
View File
@@ -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()
..()
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
@@ -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)
@@ -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
@@ -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]!")
@@ -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)])"
+2 -2
View File
@@ -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)
@@ -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)
@@ -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
@@ -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"
@@ -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)
@@ -23,7 +23,7 @@
to_chat(user, "<span class='warning'>You stare deep into the abyss... and the abyss stares back.</span>")
sleep(10)
to_chat(user, "<span class='warning'>Your [E.name] fill with painful light, and you feel a sharp burning sensation in your head!</span>")
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("<span class='danger'>Ashes pour out of [user]'s eye sockets!</span>")