mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 14:08:44 +01:00
Removes more sleeps from init (#17332)
* splits emotes into original (custom_emote) and automatic (automatic_custom_emote) * no copy paste * immunosuprizine touchup * srcining
This commit is contained in:
@@ -146,7 +146,7 @@ var/list/overminds = list()
|
||||
//Handle nonverbal languages here
|
||||
for(var/datum/multilingual_say_piece/S in message_pieces)
|
||||
if(S.speaking.flags & NONVERBAL)
|
||||
custom_emote(1, "[pick(S.speaking.signlang_verb)].")
|
||||
custom_emote(VISIBLE_MESSAGE, "[pick(S.speaking.signlang_verb)].")
|
||||
|
||||
for(var/mob/M in listening)
|
||||
spawn()
|
||||
|
||||
@@ -0,0 +1,86 @@
|
||||
|
||||
/// This is the custom_emote that you'll want to use if you want the mob to be able to input their emote.
|
||||
/mob/proc/custom_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/range = world.view, var/check_stat = TRUE)
|
||||
|
||||
if((check_stat && (src && stat)) || (!use_me && usr == src))
|
||||
to_chat(src, "You are unable to emote.")
|
||||
return
|
||||
|
||||
var/input
|
||||
if(!message)
|
||||
input = sanitize(tgui_input_text(src,"Choose an emote to display."))
|
||||
else
|
||||
input = message
|
||||
process_emote(m_type, message, input, range)
|
||||
|
||||
/// This is the custom_emote that you'll want to use if you're forcing something to custom emote with no input from the mob.
|
||||
/// By default, we have a visible message, our range is world.view, and we do NOT check the stat.
|
||||
/mob/proc/automatic_custom_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/range = world.view, var/check_stat = FALSE)
|
||||
if(check_stat && (src && stat))
|
||||
return
|
||||
var/input = message
|
||||
process_emote(m_type, message, input, range)
|
||||
|
||||
//The actual meat and potatoes of the emote processing.
|
||||
/mob/proc/process_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/input, var/range = world.view)
|
||||
var/list/formatted
|
||||
var/runemessage
|
||||
if(input)
|
||||
formatted = format_emote(src, message)
|
||||
if(!islist(formatted))
|
||||
return
|
||||
message = formatted["pretext"] + formatted["nametext"] + formatted["subtext"]
|
||||
runemessage = formatted["subtext"]
|
||||
// This is just personal preference (but I'm objectively right) that custom emotes shouldn't have periods at the end in runechat
|
||||
runemessage = replacetext(runemessage,".","",length(runemessage),length(runemessage)+1)
|
||||
else
|
||||
return
|
||||
|
||||
if(input)
|
||||
log_emote(message,src) //Log before we add junk
|
||||
if(client)
|
||||
message = span_emote(span_bold("[src]") + " [input]")
|
||||
else
|
||||
message = span_npc_emote(span_bold("[src]") + " [input]")
|
||||
else
|
||||
return
|
||||
|
||||
if(message)
|
||||
message = encode_html_emphasis(message)
|
||||
|
||||
var/ourfreq = null
|
||||
if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if(L.voice_freq > 0 )
|
||||
ourfreq = L.voice_freq
|
||||
|
||||
|
||||
// Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(!T) return
|
||||
|
||||
if(client)
|
||||
playsound(T, pick(emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds)
|
||||
|
||||
var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE)
|
||||
var/list/m_viewers = in_range["mobs"]
|
||||
var/list/o_viewers = in_range["objs"]
|
||||
|
||||
for(var/mob/M as anything in m_viewers)
|
||||
if(M)
|
||||
if(isobserver(M))
|
||||
message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]")
|
||||
if(src.client && M && !(get_z(src) == get_z(M)))
|
||||
message = span_multizsay("[message]")
|
||||
// If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind
|
||||
if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/holder) && src.loc.loc == M)))
|
||||
M.show_message(message)
|
||||
else
|
||||
M.show_message(message, m_type)
|
||||
M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE))
|
||||
|
||||
for(var/obj/O as anything in o_viewers)
|
||||
if(O)
|
||||
O.see_emote(src, message, m_type)
|
||||
@@ -161,84 +161,6 @@
|
||||
nametext = span_bold("[emoter]")
|
||||
return list("pretext" = pretext, "nametext" = nametext, "subtext" = subtext)
|
||||
|
||||
/mob/proc/custom_emote(var/m_type = VISIBLE_MESSAGE, var/message, var/range = world.view)
|
||||
|
||||
if((usr && stat) || (!use_me && usr == src))
|
||||
to_chat(src, "You are unable to emote.")
|
||||
return
|
||||
|
||||
var/input
|
||||
if(!message)
|
||||
input = sanitize(tgui_input_text(src,"Choose an emote to display."))
|
||||
else
|
||||
input = message
|
||||
|
||||
var/list/formatted
|
||||
var/runemessage
|
||||
if(input)
|
||||
formatted = format_emote(src, message)
|
||||
if(!islist(formatted))
|
||||
return
|
||||
message = formatted["pretext"] + formatted["nametext"] + formatted["subtext"]
|
||||
runemessage = formatted["subtext"]
|
||||
// This is just personal preference (but I'm objectively right) that custom emotes shouldn't have periods at the end in runechat
|
||||
runemessage = replacetext(runemessage,".","",length(runemessage),length(runemessage)+1)
|
||||
else
|
||||
return
|
||||
|
||||
if(input)
|
||||
log_emote(message,src) //Log before we add junk
|
||||
if(usr && usr.client)
|
||||
message = span_emote(span_bold("[src]") + " [input]")
|
||||
else
|
||||
message = span_npc_emote(span_bold("[src]") + " [input]")
|
||||
else
|
||||
return
|
||||
|
||||
if(message)
|
||||
message = encode_html_emphasis(message)
|
||||
|
||||
var/ourfreq = null
|
||||
if(isliving(src))
|
||||
var/mob/living/L = src
|
||||
if(L.voice_freq > 0 )
|
||||
ourfreq = L.voice_freq
|
||||
|
||||
|
||||
// Hearing gasp and such every five seconds is not good emotes were not global for a reason.
|
||||
// Maybe some people are okay with that.
|
||||
var/turf/T = get_turf(src)
|
||||
|
||||
if(!T) return
|
||||
|
||||
if(client)
|
||||
playsound(T, pick(emote_sound), 25, TRUE, falloff = 1 , is_global = TRUE, frequency = ourfreq, ignore_walls = FALSE, preference = /datum/preference/toggle/emote_sounds)
|
||||
|
||||
var/list/in_range = get_mobs_and_objs_in_view_fast(T,range,2,remote_ghosts = client ? TRUE : FALSE)
|
||||
var/list/m_viewers = in_range["mobs"]
|
||||
var/list/o_viewers = in_range["objs"]
|
||||
|
||||
for(var/mob/M as anything in m_viewers)
|
||||
spawn(0) // It's possible that it could be deleted in the meantime, or that it runtimes.
|
||||
if(M)
|
||||
if(isobserver(M))
|
||||
message = span_emote(span_bold("[src]") + " ([ghost_follow_link(src, M)]) [input]")
|
||||
if(usr && usr.client && M && !(get_z(usr) == get_z(M)))
|
||||
message = span_multizsay("[message]")
|
||||
// If you are in the same tile, right next to, or being held by a person doing an emote, you should be able to see it while blind
|
||||
if(m_type != AUDIBLE_MESSAGE && (src.Adjacent(M) || (istype(src.loc, /obj/item/holder) && src.loc.loc == M)))
|
||||
M.show_message(message)
|
||||
else
|
||||
M.show_message(message, m_type)
|
||||
M.create_chat_message(src, "[runemessage]", FALSE, list("emote"), (m_type == AUDIBLE_MESSAGE))
|
||||
|
||||
for(var/obj/O as anything in o_viewers)
|
||||
spawn(0)
|
||||
if(O)
|
||||
O.see_emote(src, message, m_type)
|
||||
|
||||
|
||||
|
||||
// Specific mob type exceptions below.
|
||||
/mob/living/silicon/ai/emote(var/act, var/type, var/message)
|
||||
var/obj/machinery/hologram/holopad/T = src.holo
|
||||
|
||||
@@ -398,7 +398,7 @@
|
||||
reagents.trans_to_mob(user, bitesize, CHEM_INGEST)
|
||||
spawn(5)
|
||||
if(!src && !user.client)
|
||||
user.custom_emote(1,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]")
|
||||
user.automatic_custom_emote(VISIBLE_MESSAGE,"[pick("burps", "cries for more", "burps twice", "looks at the area where the food was")]", check_stat = TRUE)
|
||||
qdel(src)
|
||||
On_Consume(user)
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
/datum/genetics/side_effect/genetic_burn/start(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.custom_emote(VISIBLE_MESSAGE, "starts turning very red..")
|
||||
H.automatic_custom_emote(VISIBLE_MESSAGE, "starts turning very red..", check_stat = TRUE)
|
||||
|
||||
/datum/genetics/side_effect/genetic_burn/finish(datum/weakref/WR)
|
||||
if(..()) return
|
||||
@@ -52,7 +52,7 @@
|
||||
|
||||
/datum/genetics/side_effect/bone_snap/start(mob/living/carbon/human/H)
|
||||
..()
|
||||
H.custom_emote(VISIBLE_MESSAGE, "'s limbs start shivering uncontrollably.")
|
||||
H.automatic_custom_emote(VISIBLE_MESSAGE, "'s limbs start shivering uncontrollably.", check_stat = TRUE)
|
||||
|
||||
/datum/genetics/side_effect/bone_snap/finish(datum/weakref/WR)
|
||||
if(..()) return
|
||||
@@ -70,7 +70,7 @@
|
||||
/datum/genetics/side_effect/confuse/start(mob/living/carbon/human/H)
|
||||
..()
|
||||
var/datum/gender/T = gender_datums[H.get_visible_gender()]
|
||||
H.custom_emote(VISIBLE_MESSAGE, "has drool running down from [T.his] mouth.")
|
||||
H.automatic_custom_emote(VISIBLE_MESSAGE, "has drool running down from [T.his] mouth.", check_stat = TRUE)
|
||||
|
||||
/datum/genetics/side_effect/confuse/finish(datum/weakref/WR)
|
||||
if(..()) return
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
/mob/living/bot/cleanbot/handleIdle()
|
||||
if(!wet_floors && !spray_blood && vocal && prob(2))
|
||||
custom_emote(2, "makes an excited booping sound!")
|
||||
automatic_custom_emote(AUDIBLE_MESSAGE, "makes an excited booping sound!")
|
||||
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
|
||||
|
||||
if(wet_floors && prob(5)) // Make a mess
|
||||
@@ -118,7 +118,7 @@
|
||||
if(istype(D, /obj/effect/decal/cleanable))
|
||||
cleantime = istype(D, /obj/effect/decal/cleanable/dirt) ? 10 : 50
|
||||
if(prob(20))
|
||||
custom_emote(2, "begins to clean up \the [D]")
|
||||
automatic_custom_emote(AUDIBLE_MESSAGE, "begins to clean up \the [D]")
|
||||
if(do_after(src, cleantime * cTimeMult))
|
||||
if(istype(loc, /turf/simulated))
|
||||
var/turf/simulated/f = loc
|
||||
@@ -137,7 +137,7 @@
|
||||
cleantime += 50
|
||||
if(cleantime != 0)
|
||||
if(prob(20))
|
||||
custom_emote(2, "begins to clean up \the [loc]")
|
||||
automatic_custom_emote(AUDIBLE_MESSAGE, "begins to clean up \the [loc]")
|
||||
if(do_after(src, cleantime * cTimeMult))
|
||||
if(blood)
|
||||
clean_blood()
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
/mob/living/bot/cleanbot/edCLN/handleIdle()
|
||||
if(vocal && prob(10))
|
||||
custom_emote(2, "makes a less than thrilled beeping sound.")
|
||||
automatic_custom_emote(AUDIBLE_MESSAGE, "makes a less than thrilled beeping sound.")
|
||||
playsound(src, 'sound/machines/synth_yes.ogg', 50, 0)
|
||||
|
||||
if(red_switch && !blue_switch && !green_switch && prob(10) || src.emagged)
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
addTiles(1)
|
||||
|
||||
if(vocal && prob(1))
|
||||
custom_emote(2, "makes an excited beeping sound!")
|
||||
automatic_custom_emote(AUDIBLE_MESSAGE, "makes an excited beeping sound!")
|
||||
playsound(src, 'sound/machines/twobeep.ogg', 50, 0)
|
||||
|
||||
/mob/living/bot/floorbot/handleAdjacentTarget()
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
var/message = pick(message_options)
|
||||
say(message)
|
||||
playsound(src, message_options[message], 50, 0)
|
||||
custom_emote(1, "points at [H.name].")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "points at [H.name].")
|
||||
last_newpatient_speak = world.time
|
||||
break
|
||||
|
||||
|
||||
@@ -188,13 +188,13 @@
|
||||
update_icons()
|
||||
|
||||
/mob/living/bot/mulebot/handleFrustrated(has_target)
|
||||
custom_emote(2, "makes a sighing buzz.")
|
||||
automatic_custom_emote(AUDIBLE_MESSAGE, "makes a sighing buzz.")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
..()
|
||||
|
||||
/mob/living/bot/mulebot/handleAdjacentTarget()
|
||||
if(target == src.loc)
|
||||
custom_emote(2, "makes a chiming sound.")
|
||||
automatic_custom_emote(AUDIBLE_MESSAGE, "makes a chiming sound.")
|
||||
playsound(src, 'sound/machines/chime.ogg', 50, 0)
|
||||
UnarmedAttack(target)
|
||||
resetTarget()
|
||||
@@ -283,7 +283,7 @@
|
||||
return
|
||||
|
||||
if(crates_only && !istype(C,/obj/structure/closet/crate))
|
||||
custom_emote(2, "makes a sighing buzz.")
|
||||
automatic_custom_emote(AUDIBLE_MESSAGE, "makes a sighing buzz.")
|
||||
playsound(src, 'sound/machines/buzz-sigh.ogg', 50, 0)
|
||||
return
|
||||
|
||||
|
||||
@@ -250,7 +250,7 @@
|
||||
target = M
|
||||
awaiting_surrender = 0
|
||||
say("Level [threat] infraction alert!")
|
||||
custom_emote(1, "points at [M.name]!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "points at [M.name]!")
|
||||
playsound(src, pick(threat_found_sounds), 50)
|
||||
return
|
||||
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
if(11 to 30)
|
||||
H.custom_pain("The muscles in your body cramp up painfully.",0)
|
||||
if(31 to INFINITY)
|
||||
H.custom_emote(VISIBLE_MESSAGE, "flinches as all the muscles in their body cramp up.")
|
||||
H.automatic_custom_emote(VISIBLE_MESSAGE, "flinches as all the muscles in their body cramp up.", check_stat = TRUE)
|
||||
H.custom_pain("There's pain all over your body.",1)
|
||||
|
||||
// ITCH
|
||||
@@ -145,5 +145,5 @@
|
||||
if(11 to 30)
|
||||
H.custom_pain("You want to scratch your itch badly.",0)
|
||||
if(31 to INFINITY)
|
||||
H.custom_emote(VISIBLE_MESSAGE, "shivers slightly.")
|
||||
H.automatic_custom_emote(VISIBLE_MESSAGE, "shivers slightly.", check_stat = TRUE)
|
||||
H.custom_pain("This itch makes it really hard to concentrate.",1)
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
if(11 to 30)
|
||||
H.custom_pain("The muscles in your body cramp up painfully.",0)
|
||||
if(31 to INFINITY)
|
||||
H.custom_emote(VISIBLE_MESSAGE, "flinches as all the muscles in their body cramp up.")
|
||||
H.automatic_custom_emote(VISIBLE_MESSAGE, "flinches as all the muscles in their body cramp up.", check_stat = TRUE)
|
||||
H.custom_pain("There's pain all over your body.",1)
|
||||
|
||||
// ITCH
|
||||
@@ -145,5 +145,5 @@
|
||||
if(11 to 30)
|
||||
H.custom_pain("You want to scratch your itch badly.",0)
|
||||
if(31 to INFINITY)
|
||||
H.custom_emote(VISIBLE_MESSAGE, "shivers slightly.")
|
||||
H.automatic_custom_emote(VISIBLE_MESSAGE, "shivers slightly.", check_stat = TRUE)
|
||||
H.custom_pain("This itch makes it really hard to concentrate.",1)
|
||||
|
||||
@@ -82,10 +82,10 @@ emp_act
|
||||
drop_from_inventory(c_hand)
|
||||
if(!isbelly(loc)) //VOREStation Add
|
||||
if (affected.robotic >= ORGAN_ROBOT)
|
||||
custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [affected.name] malfunctioning!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [affected.name] malfunctioning!", check_stat = TRUE)
|
||||
else
|
||||
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
|
||||
custom_emote(VISIBLE_MESSAGE, "[affected.organ_can_feel_pain() ? "" : emote_scream] drops what they were holding in their [affected.name]!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "[affected.organ_can_feel_pain() ? "" : emote_scream] drops what they were holding in their [affected.name]!", check_stat = TRUE)
|
||||
|
||||
..(stun_amount, agony_amount, def_zone)
|
||||
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
if(!(lying || resting) && !isbelly(loc))
|
||||
if(limb_pain)
|
||||
emote("scream")
|
||||
custom_emote(1, "collapses!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "collapses!", check_stat = TRUE)
|
||||
if(!(lying || resting)) // stops permastun with SPINE sdisability
|
||||
Weaken(5) //can't emote while weakened, apparently.
|
||||
|
||||
@@ -155,7 +155,7 @@
|
||||
|
||||
if(!isbelly(loc))
|
||||
var/emote_scream = pick("screams in pain and ", "lets out a sharp cry and ", "cries out and ")
|
||||
custom_emote(VISIBLE_MESSAGE, "[(can_feel_pain()) ? "" : emote_scream ]drops what they were holding in their [E.name]!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "[(can_feel_pain()) ? "" : emote_scream ]drops what they were holding in their [E.name]!", check_stat = TRUE)
|
||||
if(can_feel_pain())
|
||||
emote("pain")
|
||||
|
||||
@@ -171,7 +171,7 @@
|
||||
drop_from_inventory(r_hand)
|
||||
|
||||
if(!isbelly(loc))
|
||||
custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [E.name] malfunctioning!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "drops what they were holding, their [E.name] malfunctioning!", check_stat = TRUE)
|
||||
|
||||
var/datum/effect/effect/system/spark_spread/spark_system = new /datum/effect/effect/system/spark_spread()
|
||||
spark_system.set_up(5, 0, src)
|
||||
|
||||
@@ -196,7 +196,7 @@
|
||||
if(dna)
|
||||
if(disabilities & DETERIORATE && prob(2) && prob(3)) // stacked percents for rarity
|
||||
// random strange symptoms from organ/limb
|
||||
custom_emote(VISIBLE_MESSAGE, "flinches slightly.")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "flinches slightly.", check_stat = TRUE)
|
||||
switch(rand(1,4))
|
||||
if(1)
|
||||
adjustToxLoss(rand(2,8))
|
||||
@@ -1949,7 +1949,7 @@
|
||||
|
||||
if(shock_stage >= 30)
|
||||
if(shock_stage == 30 && !isbelly(loc))
|
||||
custom_emote(VISIBLE_MESSAGE, "is having trouble keeping their eyes open.")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "is having trouble keeping their eyes open.", check_stat = TRUE)
|
||||
eye_blurry = max(2, eye_blurry)
|
||||
if(traumatic_shock >= 80)
|
||||
stuttering = max(stuttering, 5)
|
||||
@@ -1961,7 +1961,7 @@
|
||||
|
||||
if (shock_stage >= 60)
|
||||
if(shock_stage == 60 && !isbelly(loc))
|
||||
custom_emote(VISIBLE_MESSAGE, "'s body becomes limp.")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "'s body becomes limp.", check_stat = TRUE)
|
||||
if (prob(2))
|
||||
if(traumatic_shock >= 80)
|
||||
to_chat(src, span_danger("[pick("The pain is excruciating", "Please, just end the pain", "Your whole body is going numb")]!"))
|
||||
@@ -1985,7 +1985,7 @@
|
||||
|
||||
if(shock_stage == 150)
|
||||
if(!isbelly(loc))
|
||||
custom_emote(VISIBLE_MESSAGE, "can no longer stand, collapsing!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE, "can no longer stand, collapsing!", check_stat = TRUE)
|
||||
if(prob(60))
|
||||
emote("pain")
|
||||
Weaken(20)
|
||||
|
||||
@@ -133,7 +133,7 @@
|
||||
phaseanim.adjust_scale(src.size_multiplier, src.size_multiplier)
|
||||
phaseanim.dir = dir
|
||||
alpha = 0
|
||||
INVOKE_ASYNC(src, PROC_REF(custom_emote),1,"phases in!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
|
||||
|
||||
addtimer(CALLBACK(src, PROC_REF(shadekin_complete_phase_in), original_canmove), 5, TIMER_DELETE_ME)
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
ability_flags |= AB_PHASE_SHIFTING
|
||||
throwpass = TRUE
|
||||
custom_emote(1,"phases out!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
|
||||
name = get_visible_name()
|
||||
|
||||
for(var/obj/belly/B as anything in vore_organs)
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
if(T.primitive_expression_messages.len)
|
||||
geneexpression = pick(T.primitive_expression_messages)
|
||||
if(geneexpression)
|
||||
H.custom_emote(VISIBLE_MESSAGE, "[geneexpression]")
|
||||
H.automatic_custom_emote(VISIBLE_MESSAGE, "[geneexpression]", check_stat = TRUE)
|
||||
else
|
||||
H.emote(pick("scratch","jump","roll","tail"))
|
||||
// More... intense, expressions...
|
||||
|
||||
@@ -178,7 +178,7 @@ var/list/channel_to_radio_key = new
|
||||
//Maybe they are using say/whisper to do a quick emote, so do those
|
||||
switch(copytext(message, 1, 2))
|
||||
if("*") return emote(copytext(message, 2))
|
||||
if("^") return custom_emote(1, copytext(message, 2))
|
||||
if("^") return custom_emote(VISIBLE_MESSAGE, copytext(message, 2))
|
||||
|
||||
//Parse the radio code and consume it
|
||||
if(message_mode)
|
||||
@@ -318,7 +318,7 @@ var/list/channel_to_radio_key = new
|
||||
//Handle nonverbal languages here
|
||||
for(var/datum/multilingual_say_piece/S in message_pieces)
|
||||
if((S.speaking.flags & NONVERBAL) || (S.speaking.flags & INAUDIBLE))
|
||||
custom_emote(1, "[pick(S.speaking.signlang_verb)].")
|
||||
custom_emote(VISIBLE_MESSAGE, "[pick(S.speaking.signlang_verb)].")
|
||||
do_sound = FALSE
|
||||
|
||||
//These will contain the main receivers of the message
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
if(isliving(A))
|
||||
var/mob/living/L = A
|
||||
if(istype(L) && (!has_hands || !L.attempt_to_scoop(src)))
|
||||
custom_emote(1,"[pick(friendly)] \the [A]!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"[pick(friendly)] \the [A]!", check_stat = TRUE)
|
||||
if(istype(A,/obj/structure/micro_tunnel)) //Allows simplemobs to click on mouse holes, mice should be allowed to go in mouse holes, and other mobs
|
||||
var/obj/structure/micro_tunnel/t = A //should be allowed to drag the mice out of the mouse holes!
|
||||
t.tunnel_interact(src)
|
||||
@@ -26,7 +26,7 @@
|
||||
return
|
||||
|
||||
else if(melee_damage_upper == 0 && isliving(A))
|
||||
custom_emote(1,"[pick(friendly)] \the [A]!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"[pick(friendly)] \the [A]!", check_stat = TRUE)
|
||||
|
||||
else
|
||||
attack_target(A)
|
||||
|
||||
@@ -45,7 +45,7 @@
|
||||
|
||||
//Cosmetics mostly
|
||||
flick("phasein",src)
|
||||
custom_emote(1,"phases in!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
|
||||
sleep(30) //The duration of the TP animation
|
||||
is_shifting = FALSE
|
||||
canmove = original_canmove
|
||||
@@ -83,7 +83,7 @@
|
||||
else
|
||||
shifted_out = TRUE
|
||||
shift_state = AB_SHIFT_PASSIVE
|
||||
custom_emote(1,"phases out!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
|
||||
real_name = name
|
||||
name = "Something"
|
||||
health = maxHealth //Fullheal
|
||||
@@ -139,7 +139,7 @@
|
||||
is_shifting = TRUE
|
||||
|
||||
shifted_out = TRUE
|
||||
custom_emote(1,"phases out!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
|
||||
real_name = name
|
||||
name = "Something"
|
||||
|
||||
@@ -179,7 +179,7 @@
|
||||
|
||||
//Cosmetics mostly
|
||||
flick("phasein",src)
|
||||
custom_emote(1,"phases in!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
|
||||
sleep(30) //The duration of the TP animation
|
||||
is_shifting = FALSE
|
||||
canmove = original_canmove
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
/mob/living/simple_mob/vore/aggressive/dragon/FindTarget()
|
||||
. = ..()
|
||||
if(.)
|
||||
custom_emote(1,"snaps at [.]")
|
||||
customautomatic_custom_emote_emote(1,"snaps at [.]")
|
||||
*/
|
||||
// Activate Noms!
|
||||
/mob/living/simple_mob/vore/aggressive/dragon
|
||||
|
||||
@@ -155,12 +155,12 @@
|
||||
var/mob/living/L = A
|
||||
if(will_eat(L))
|
||||
var/obj/belly/B = vore_organs[1]
|
||||
custom_emote(message = "snatches and devours [L]!")
|
||||
automatic_custom_emote(message = "snatches and devours [L]!")
|
||||
B.nom_mob(L)
|
||||
ai_holder.find_target()
|
||||
return
|
||||
else if(L.size_multiplier <= 0.5 && L.step_mechanics_pref)
|
||||
custom_emote(message = "stomps [L] into oblivion!")
|
||||
automatic_custom_emote(message = "stomps [L] into oblivion!")
|
||||
L.gib()
|
||||
return
|
||||
else
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
|
||||
//Cosmetics mostly
|
||||
flick("tp_in",src)
|
||||
custom_emote(1,"phases in!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
|
||||
sleep(5) //The duration of the TP animation
|
||||
canmove = original_canmove
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
else
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
mouse_opacity = 0
|
||||
custom_emote(1,"phases out!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
|
||||
real_name = name
|
||||
name = "Something"
|
||||
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
//Cosmetics mostly
|
||||
flick("tp_in",src)
|
||||
INVOKE_ASYNC(src, PROC_REF(custom_emote),1,"phases in!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases in!")
|
||||
|
||||
addtimer(CALLBACK(src, PROC_REF(shadekin_complete_phase_in), original_canmove), 5, TIMER_DELETE_ME)
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
// change
|
||||
ability_flags |= AB_PHASE_SHIFTED
|
||||
throwpass = TRUE
|
||||
custom_emote(1,"phases out!")
|
||||
automatic_custom_emote(VISIBLE_MESSAGE,"phases out!")
|
||||
real_name = name
|
||||
name = "Something"
|
||||
|
||||
|
||||
@@ -23,11 +23,11 @@
|
||||
if(inflamed == 1)
|
||||
if(prob(5))
|
||||
to_chat(owner, span_warning("You feel a stinging pain in your abdomen!"))
|
||||
owner.custom_emote(VISIBLE_MESSAGE, "winces slightly.")
|
||||
owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces slightly.", check_stat = TRUE)
|
||||
if(inflamed > 1)
|
||||
if(prob(3))
|
||||
to_chat(owner, span_warning("You feel a stabbing pain in your abdomen!"))
|
||||
owner.custom_emote(VISIBLE_MESSAGE, "winces painfully.")
|
||||
owner.automatic_custom_emote(VISIBLE_MESSAGE, "winces painfully.", check_stat = TRUE)
|
||||
owner.adjustToxLoss(1)
|
||||
if(inflamed > 2)
|
||||
if(prob(1))
|
||||
|
||||
@@ -13,27 +13,27 @@
|
||||
|
||||
if(is_broken())
|
||||
if(prob(4))
|
||||
spawn owner?.custom_emote(VISIBLE_MESSAGE, "coughs up a large amount of blood!")
|
||||
owner.automatic_custom_emote(VISIBLE_MESSAGE, "coughs up a large amount of blood!", check_stat = TRUE)
|
||||
var/bleeding_rng = rand(3,5)
|
||||
owner.drip(bleeding_rng)
|
||||
if(prob(8)) //This is a medical emergency. Will kill within minutes unless exceedingly lucky.
|
||||
spawn owner?.custom_emote(VISIBLE_MESSAGE, "gasps for air!")
|
||||
owner.automatic_custom_emote(VISIBLE_MESSAGE, "gasps for air!", check_stat = TRUE)
|
||||
owner.AdjustLosebreath(15)
|
||||
|
||||
else if(is_bruised()) //Only bruised? That's an annoyance and can cause some more damage (via brainloss due to oxyloss)
|
||||
if(prob(2)) //But let's not kill people too quickly.
|
||||
spawn owner?.custom_emote(VISIBLE_MESSAGE, "coughs up a small amount of blood!")
|
||||
owner.automatic_custom_emote(VISIBLE_MESSAGE, "coughs up a small amount of blood!", check_stat = TRUE)
|
||||
var/bleeding_rng = rand(1,2)
|
||||
owner.drip(bleeding_rng)
|
||||
if(prob(4)) //Get to medical quickly. but shouldn't kill without exceedingly bad RNG.
|
||||
spawn owner?.custom_emote(VISIBLE_MESSAGE, "gasps for air!")
|
||||
owner.automatic_custom_emote(VISIBLE_MESSAGE, "gasps for air!", check_stat = TRUE)
|
||||
owner.AdjustLosebreath(10) //Losebreath is a DoT that does 1:1 damage and prevents oxyloss healing via breathing.
|
||||
|
||||
if(owner.internal_organs_by_name[O_BRAIN]) // As the brain starts having Trouble, the lungs start malfunctioning.
|
||||
var/obj/item/organ/internal/brain/Brain = owner.internal_organs_by_name[O_BRAIN]
|
||||
if(Brain.get_control_efficiency() <= 0.8)
|
||||
if(prob(4 / max(0.1,Brain.get_control_efficiency())))
|
||||
spawn owner?.custom_emote(VISIBLE_MESSAGE, "gasps for air!")
|
||||
owner.automatic_custom_emote(VISIBLE_MESSAGE, "gasps for air!", check_stat = TRUE)
|
||||
owner.AdjustLosebreath(round(3 / max(0.1,Brain.get_control_efficiency())))
|
||||
|
||||
/obj/item/organ/internal/lungs/proc/rupture()
|
||||
|
||||
@@ -39,16 +39,16 @@
|
||||
// Glass present
|
||||
else if(glass)
|
||||
if(user.a_intent == I_HURT)
|
||||
user.custom_emote(VISIBLE_MESSAGE, "smashes the glass on [src]!")
|
||||
user.automatic_custom_emote(VISIBLE_MESSAGE, "smashes the glass on [src]!")
|
||||
glass = FALSE
|
||||
playsound(src, 'sound/effects/hit_on_shattered_glass.ogg')
|
||||
update_icon()
|
||||
else
|
||||
user.custom_emote(VISIBLE_MESSAGE, "pats [src] in a friendly manner.")
|
||||
user.automatic_custom_emote(VISIBLE_MESSAGE, "pats [src] in a friendly manner.")
|
||||
to_chat(user, span_warning("If you're trying to break the glass, you'll have to hit it harder than that..."))
|
||||
// Must be !glass and !launched
|
||||
else
|
||||
user.custom_emote(VISIBLE_MESSAGE, "pushes the button on [src]!")
|
||||
user.automatic_custom_emote(VISIBLE_MESSAGE, "pushes the button on [src]!")
|
||||
launch(user)
|
||||
playsound(src, get_sfx("button"))
|
||||
update_icon()
|
||||
|
||||
@@ -920,27 +920,27 @@
|
||||
metabolism = REM * 0.06
|
||||
|
||||
/datum/reagent/immunosuprizine/affect_blood(var/mob/living/carbon/M, var/alien, var/removed)
|
||||
var/strength_mod = 1 * M.species.chem_strength_heal
|
||||
var/strength_mod = 1 // * M.species.chem_strength_heal //Just removing the chem strength adjustment. It'd require division, which is best avoided.
|
||||
|
||||
if(alien == IS_DIONA) // It's a tree.
|
||||
strength_mod = 0.25
|
||||
strength_mod = 4
|
||||
|
||||
if(alien == IS_SLIME) // Diffculty bonding with internal cellular structure.
|
||||
strength_mod = 0.75
|
||||
strength_mod = 1.3
|
||||
|
||||
if(alien == IS_SKRELL) // Natural inclination toward toxins.
|
||||
strength_mod = 1.5
|
||||
strength_mod = 0.66
|
||||
|
||||
if(alien == IS_UNATHI) // Natural regeneration, robust biology.
|
||||
strength_mod = 1.75
|
||||
strength_mod = 0.6
|
||||
|
||||
if(alien == IS_TAJARA) // Highest metabolism.
|
||||
strength_mod = 2
|
||||
strength_mod = 0.5
|
||||
|
||||
if(ishuman(M))
|
||||
var/mob/living/carbon/human/H = M
|
||||
if(alien != IS_DIONA)
|
||||
H.adjustToxLoss((30 / strength_mod) * removed)
|
||||
H.adjustToxLoss((30 * strength_mod) * removed)
|
||||
|
||||
var/list/organtotal = list()
|
||||
organtotal |= H.organs
|
||||
@@ -962,7 +962,7 @@
|
||||
var/rejectmem = I.can_reject
|
||||
I.can_reject = initial(I.can_reject)
|
||||
if(rejectmem != I.can_reject)
|
||||
H.adjustToxLoss((15 / strength_mod))
|
||||
H.adjustToxLoss((15 / strength_mod) * removed) //Someone forgot a * removed here in the past. It made it so 1u of this chem would do (baseline) 1245 toxins per unit, or 15 toxins per tick.
|
||||
I.take_damage(1)
|
||||
|
||||
/datum/reagent/skrellimmuno //skrell exist?
|
||||
|
||||
Reference in New Issue
Block a user