Skip to content

Commit

Permalink
TGS Test Merge (#6633)
Browse files Browse the repository at this point in the history
  • Loading branch information
cm13-github committed Jul 16, 2024
2 parents 1c0a5b9 + fe7a420 commit 12308df
Show file tree
Hide file tree
Showing 48 changed files with 434 additions and 94 deletions.
6 changes: 3 additions & 3 deletions code/__DEFINES/layers.dm
Original file line number Diff line number Diff line change
Expand Up @@ -239,12 +239,12 @@
#define EXTERIOR_LIGHTING_PLANE 101
#define NVG_PLANE 110

///Popup Chat Messages
#define RUNECHAT_PLANE 501

#define RENDER_PLANE_GAME 990
#define RENDER_PLANE_NON_GAME 995

///Popup Chat Messages
#define RUNECHAT_PLANE 996

#define ESCAPE_MENU_PLANE 997

#define RENDER_PLANE_MASTER 999
Expand Down
1 change: 1 addition & 0 deletions code/_onclick/ventcrawl.dm
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@
return

visible_message(SPAN_NOTICE("[src] begins climbing into [vent_found]."), SPAN_NOTICE("We begin climbing into [vent_found]."))
emote("me", message = "begins crawling into [vent_found].")
vent_found.animate_ventcrawl()
if(!do_after(src, 45, INTERRUPT_NO_NEEDHAND, BUSY_ICON_GENERIC))
vent_found.animate_ventcrawl_reset()
Expand Down
2 changes: 2 additions & 0 deletions code/datums/ammo/bullet/bullet.dm
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@
SPAN_HIGHDANGER("[user] aims \the [fired_from] directly at your head!"),
SPAN_DANGER("[user] aims \the [fired_from] at [execution_target]'s head!"))

user.emote("me", message = "aims [fired_from] at [execution_target]'s head!")

user.next_move += 1.1 SECONDS //PB has no click delay; readding it here to prevent people accidentally queuing up multiple executions.

if(!do_after(user, 1 SECONDS, INTERRUPT_ALL, BUSY_ICON_HOSTILE) || !user.Adjacent(execution_target))
Expand Down
4 changes: 4 additions & 0 deletions code/datums/ammo/bullet/shotgun.dm
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@
living_mob.apply_effect(1, SUPERSLOW)
living_mob.apply_effect(2, SLOW)
to_chat(living_mob, SPAN_HIGHDANGER("The impact knocks you off-balance!"))
if(ishuman(living_mob))
living_mob.emote("me", message = "is knocked off their feet by the [src]")
living_mob.apply_stamina_damage(fired_projectile.ammo.damage, fired_projectile.def_zone, ARMOR_BULLET)

/datum/ammo/bullet/shotgun/beanbag
Expand Down Expand Up @@ -259,6 +261,8 @@
living_mob.apply_effect(1, SUPERSLOW)
living_mob.apply_effect(2, SLOW)
to_chat(living_mob, SPAN_HIGHDANGER("The impact knocks you off-balance!"))
if(ishuman(living_mob))
living_mob.emote("me", message = "is knocked off their feet by the [src]")
living_mob.apply_stamina_damage(fired_projectile.ammo.damage, fired_projectile.def_zone, ARMOR_BULLET)

/datum/ammo/bullet/shotgun/heavy/beanbag
Expand Down
1 change: 1 addition & 0 deletions code/datums/ammo/energy.dm
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
var/mob/living/carbon/human/humanus = mobs
humanus.disable_special_items() // Disables scout cloak
humanus.make_jittery(40)
humanus.emote("electrocuted")

/datum/ammo/energy/taser/precise
name = "precise taser bolt"
Expand Down
4 changes: 3 additions & 1 deletion code/datums/ammo/xeno.dm
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@
if(M.GetKnockDownDuration() < 5) // Nobody actually knows what this means. Supposedly it means less than 10 seconds. Frankly if you get locked into 10s of knockdown to begin with there are bigger issues.
M.KnockDown(power)
M.Stun(power)
M.emote("foamfall")
M.visible_message(SPAN_DANGER("[M] falls prone."))

/proc/apply_scatter_neuro(mob/living/M)
Expand Down Expand Up @@ -252,6 +253,7 @@
neuro_effect.duration += 5
moob.apply_effect(3, DAZE)
to_chat(moob, SPAN_HIGHDANGER("Neurotoxic liquid spreads all over you and immediately soaks into your pores and orifices! Oh fuck!")) // Fucked up but have a chance to escape rather than being game-ended
INVOKE_ASYNC(moob, TYPE_PROC_REF(/mob, emote), "neuroglob")
drop_nade(get_turf(proj), proj,TRUE)

/datum/ammo/xeno/boiler_gas/on_hit_obj(obj/outbacksteakhouse, obj/projectile/proj)
Expand Down Expand Up @@ -298,7 +300,7 @@
return
to_chat(moob,SPAN_HIGHDANGER("Acid covers your body! Oh fuck!"))
playsound(moob,"acid_strike",75,1)
INVOKE_ASYNC(moob, TYPE_PROC_REF(/mob, emote), "pain") // why do I need this bullshit
INVOKE_ASYNC(moob, TYPE_PROC_REF(/mob, emote), "acidglob") // why do I need this bullshit
new /datum/effects/acid(moob, proj.firer)
drop_nade(get_turf(proj), proj,TRUE)

Expand Down
43 changes: 24 additions & 19 deletions code/datums/effects/neurotoxin.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
var/stumble = TRUE
/// Probability of stumbling per proc. Changed by code.
var/stumble_prob = 0
/// Chance of blood_cough per proc (damaging)
var/bloodcough_prob = 0
/// Chance of emote_prob per proc (damaging)
var/emote_prob = 0
/// Whether or not we hallucinate. (small rng stun chance)
var/hallucinate = TRUE
// Tick-based chat cooldown so it doesn't get too spammy
Expand All @@ -40,32 +40,31 @@

if(issynth(affected_atom))
return

// General effects
affected_mob.last_damage_data = cause_data
affected_mob.apply_stamina_damage(stam_dam)
affected_mob.make_dizzy(12)

// Effect levels (shit that doesn't stack)
switch(duration)

if(0 to 9)
msg = initial(msg)
bloodcough_prob = initial(bloodcough_prob)
emote_prob = initial(emote_prob)
stumble_prob = initial(stumble_prob)

if(10 to 14) // 2 ticks in smoke
msg = SPAN_DANGER("You body starts feeling numb, you can't feel your fingers!")
bloodcough_prob = 10
emote_prob = 10

if(15 to 19) // 3 ticks in smoke
msg = pick(SPAN_BOLDNOTICE("Why am I here?"),SPAN_HIGHDANGER("Your entire body feels numb!"), SPAN_HIGHDANGER("You notice your movement is erratic!"), SPAN_HIGHDANGER("You panic as numbness takes over your body!"))
bloodcough_prob = 20
emote_prob = 20
stumble_prob = 5

if(20 to 24) // 4 ticks in smoke
msg = SPAN_DANGER("Your eyes sting, you can't see!")
bloodcough_prob = 25
emote_prob = 25
stumble_prob = 25

if(25 to INFINITY) // 5+ ticks in smoke
Expand Down Expand Up @@ -95,28 +94,34 @@
affected_mob.SetEarDeafness(max(affected_mob.ear_deaf, floor(strength*1.5))) //Paralysis of hearing system, aka deafness

if(duration >= 50) // 10+ ticks, apply some semi-perm damage and end their suffering if they are somehow still alive by now
affected_mob.emote("foamchoke")
affected_mob.apply_internal_damage(10,"liver")
affected_mob.apply_damage(150,OXY)

// Applying additonal effects and messages
if(prob(stumble_prob) && stumble)
if(affected_mob.is_mob_incapacitated())
return
affected_mob.visible_message(SPAN_DANGER("[affected_mob] misteps in their confusion!")
,SPAN_HIGHDANGER("You stumble!"))
if(prob(stumble_prob) && stumble &! affected_mob.is_mob_incapacitated())
affected_mob.emote("stumble")
step(affected_mob, pick(CARDINAL_ALL_DIRS))
affected_mob.apply_effect(5, DAZE) // Unable to talk and weldervision
affected_mob.make_jittery(25)
affected_mob.make_dizzy(55)
affected_mob.emote("pain")
stumble = FALSE
addtimer(VARSET_CALLBACK(src,stumble,TRUE),3 SECONDS)
duration++

if(prob(bloodcough_prob))
affected_mob.emote("cough")
if(prob(emote_prob))
affected_mob.Slow(1)
affected_mob.apply_damage(5,BRUTE, "chest")
to_chat(affected_mob, SPAN_DANGER("You cough up blood!"))
affected_mob.apply_damage(5, BRUTE, "chest")
switch(duration)
if(0 to 19)
if(affected_mob.is_mob_incapacitated())
affected_mob.emote(pick("seize", "thrash", "shake", "bloodcough", ))
else
affected_mob.emote(pick("bloodcough", "clutchhead", "wheeze"))
if(20 to 27)
affected_mob.emote(pick("seize", "eyescratch", "bloodcough"))
if(28 to INFINITY)
affected_mob.emote(pick("seize", "thrash", "shake", "foam", "eyescratch"))

if(chat_cd <= 0)
to_chat(affected_mob,msg)
Expand Down Expand Up @@ -150,7 +155,7 @@
to_chat(victim,SPAN_HIGHDANGER("A SHELL IS ABOUT TO IMPACT [pick(SPAN_UNDERLINE("TOWARDS THE [pick("WEST","EAST","SOUTH","NORTH")]"),SPAN_UNDERLINE("RIGHT ONTOP OF YOU!"))]!"))
addtimer(CALLBACK(GLOBAL_PROC, GLOBAL_PROC_REF(playsound_client), victim.client,'sound/weapons/gun_mortar_travel.ogg'), 1 SECONDS)
if(43 to 69)
victim.emote(pick("twitch","drool","moan","giggle"))
victim.emote(pick("twitch", "drool"," groan", "giggle", "rapidblink", "stare"))
victim.hallucination = 3
victim.druggy = 3
if(70 to 100) // sound based hallucination
Expand Down
3 changes: 3 additions & 0 deletions code/datums/elements/strippable.dm
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,8 @@
SPAN_NOTICE("[user] tries to put [equipping] on [source]."),
SPAN_NOTICE("[user] tries to put [equipping] on you.")
)
user.emote("me", 1, "begins to put [equipping] on [source].")


if (ismob(source))
var/mob/sourcemob = source
Expand Down Expand Up @@ -152,6 +154,7 @@
SPAN_WARNING("[user] tries to remove [source]'s [item]."),
SPAN_DANGER("[user] tries to remove your [item].")
)
user.emote("me", 1, "begins to remove [item] from [source].")

if (ismob(source))
var/mob/sourcemob = source
Expand Down
1 change: 1 addition & 0 deletions code/datums/elements/suturing.dm
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ YOU TO 200 DAMAGE. I ASK NOT FOR MY OWN MEDIC EGOSTROKING, BUT FOR THE GOOD OF T
SPAN_HELPFUL("[user] [description_verb]s some of the [description_wounds] on your [target_limb.display_name]."),
SPAN_NOTICE("[user] [description_verb]s some of the [description_wounds] on [possessive_their] [target_limb.display_name]."))

user.emote("me", message = "[description_verb]s some of the [description_wounds] on [possessive_their] [target_limb.display_name].")
suture(suturing_item, user, target, target_limb, TRUE) //Loop - untreated wounds remain.

////////////////////////////////////
Expand Down
66 changes: 38 additions & 28 deletions code/datums/emotes.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@
var/sound
/// Used for the honk borg emote.
var/vary = FALSE
/// Can only code call this event instead of the player.
/// Can only code call this emote
var/only_forced = FALSE
/// Can only code call this audio instead of the player.
var/only_forced_audio = FALSE
/// The cooldown between the uses of the emote.
var/cooldown = 0.8 SECONDS
Expand Down Expand Up @@ -119,38 +121,46 @@
continue
if(ghost.client.prefs.toggles_chat & CHAT_GHOSTSIGHT && !(ghost in viewers(user_turf, null)))
ghost.show_message(formatted_message)
if(emote_type & EMOTE_AUDIBLE) //emote is audible
var/formatted_deaf_message = "<b>[paygrade][user]</b> [alt_message ? alt_message : key_third_person] silently."
user.audible_message(formatted_message, deaf_message = formatted_deaf_message)
else if(emote_type & EMOTE_VISIBLE) //emote is visible
user.visible_message(formatted_message, blind_message = SPAN_EMOTE("You see how <b>[user]</b> [msg]"))
if(emote_type & EMOTE_IMPORTANT)
for(var/mob/living/viewer in viewers())
if(is_blind(viewer) && isdeaf(viewer))
to_chat(viewer, msg)

if(intentional)
if(emote_type & EMOTE_VISIBLE)
var/list/viewers = get_mobs_in_view(7, user)
for(var/mob/current_mob in viewers)
for(var/obj/object in current_mob.contents)
if((object.flags_atom & USES_SEEING))
seeing_obj |= object
if(!(current_mob.client?.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES))
viewers -= current_mob
run_langchat(user, viewers)
else if(emote_type & EMOTE_AUDIBLE)
var/list/heard = get_mobs_in_view(7, user)
for(var/mob/current_mob in heard)
for(var/obj/object in current_mob.contents)
if((object.flags_atom & USES_HEARING))
seeing_obj |= object
if(current_mob.ear_deaf)
heard -= current_mob
continue
if(!(current_mob.client?.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES))
heard -= current_mob
run_langchat(user, heard)
if(emote_type & EMOTE_VISIBLE && emote_type & EMOTE_AUDIBLE)
var/list/viewers = get_mobs_in_view(7, user)
for(var/mob/current_mob in viewers)
for(var/obj/object in current_mob.contents)
if((object.flags_atom & USES_SEEING))
seeing_obj |= object
if(!(current_mob.client?.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES) || current_mob.stat == UNCONSCIOUS)
viewers -= current_mob
var/formatted_deaf_message = "<b>[paygrade][user]</b> [alt_message ? alt_message : key_third_person] but you can't hear a thing."
user.audible_message(formatted_message, deaf_message = formatted_deaf_message)
run_langchat(user, viewers)
else if(emote_type & EMOTE_VISIBLE)
var/list/viewers = get_mobs_in_view(7, user)
for(var/mob/current_mob in viewers)
for(var/obj/object in current_mob.contents)
if((object.flags_atom & USES_SEEING))
seeing_obj |= object
if(!(current_mob.client?.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES) || current_mob.stat == UNCONSCIOUS)
viewers -= current_mob
if(is_blind(current_mob) && user != current_mob) //no emote if they blind
viewers -= current_mob
user.ranged_message(formatted_message)
run_langchat(user, viewers)
else if(emote_type & EMOTE_AUDIBLE)
var/list/hearers = get_mobs_in_view(7, user)
for(var/mob/current_mob in hearers)
for(var/obj/object in current_mob.contents)
if((object.flags_atom & USES_HEARING))
seeing_obj |= object
if(!(current_mob.client?.prefs.toggles_langchat & LANGCHAT_SEE_EMOTES) || current_mob.stat == UNCONSCIOUS)
hearers -= current_mob
if(isdeaf(current_mob)) //no emote if they deaf
hearers -= current_mob
user.audible_message(formatted_message)
run_langchat(user, hearers)

for(var/obj/object as anything in seeing_obj)
object.see_emote(user, msg, (emote_type & EMOTE_AUDIBLE))
Expand Down
3 changes: 2 additions & 1 deletion code/game/objects/effects/aliens.dm
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
..()
if(AM == cause_data.resolve_mob())
return

if(isliving(AM))
var/mob/living/living_mob = AM
if(living_mob.ally_of_hivenumber(hivenumber))
Expand Down Expand Up @@ -222,6 +222,7 @@
if (buffed_splash)
hooman.KnockDown(stun_duration)
to_chat(hooman, SPAN_HIGHDANGER("The acid coating on you starts bubbling and sizzling wildly!"))
hooman.emote("acidglob")
hooman.last_damage_data = cause_data
hooman.apply_armoured_damage(damage * 0.25, ARMOR_BIO, BURN, "l_foot", 20)
hooman.apply_armoured_damage(damage * 0.25, ARMOR_BIO, BURN, "r_foot", 20)
Expand Down
10 changes: 4 additions & 6 deletions code/game/objects/effects/effect_system/smoke.dm
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@
if(affected_mob.coughedtime < world.time && !affected_mob.stat)
affected_mob.coughedtime = world.time + 2 SECONDS
if(ishuman(affected_mob)) //Humans only to avoid issues
affected_mob.emote("cough")
affected_mob.emote(pick("cough", "squint"))
return TRUE

/////////////////////////////////////////////
Expand Down Expand Up @@ -300,7 +300,7 @@
if(creature.coughedtime < world.time && !creature.stat)
creature.coughedtime = world.time + 2 SECONDS
if(ishuman(creature)) //Humans only to avoid issues
creature.emote("gasp")
creature.emote(pick("gasp", "squint", "eyebleed", "bloodcough"))
return TRUE

/////////////////////////////////////////////
Expand Down Expand Up @@ -346,7 +346,7 @@
affected_mob.visible_message(SPAN_DANGER("[affected_mob]'s skin is sloughing off!"),\
SPAN_DANGER("Your skin is sloughing off!"))
else
affected_mob.emote("cough")
affected_mob.emote(pick("gasp", "squint", "eyebleed", "bloodcough"))

if(isyautja(affected_mob) || isxeno(affected_mob))
damage *= xeno_yautja_reduction
Expand Down Expand Up @@ -427,9 +427,7 @@
if(human_creature && creature.coughedtime < world.time && !creature.stat) //Coughing/gasping
creature.coughedtime = world.time + 1.5 SECONDS
if(prob(50))
creature.emote("cough")
else
creature.emote("gasp")
creature.emote(pick("cough", "bloodcough", "squint", "gasp"))

var/stun_chance = 20
if(xeno_affecting)
Expand Down
1 change: 1 addition & 0 deletions code/game/objects/items/devices/defibrillator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@

user.visible_message(SPAN_NOTICE("[user] starts setting up the paddles on [H]'s chest"), \
SPAN_HELPFUL("You start <b>setting up</b> the paddles on <b>[H]</b>'s chest."))
user.emote("me", message = "starts setting up the paddles on [H]'s chest.")
playsound(get_turf(src),'sound/items/defib_charge.ogg', 25, 0) //Do NOT vary this tune, it needs to be precisely 7 seconds

//Taking square root not to make defibs too fast...
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/handcuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
msg_admin_attack("[key_name(user)] attempted to handcuff [key_name(human_mob)] in [get_area(src)] ([loc.x],[loc.y],[loc.z]).", loc.x, loc.y, loc.z)

user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [human_mob]."))
user.emote("me", message = "attempts to put [src] on [human_mob].")
if(do_after(user, cuff_delay, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, human_mob, INTERRUPT_MOVED, BUSY_ICON_GENERIC))
if(src == user.get_active_hand() && !human_mob.handcuffed && Adjacent(user))
if(iscarbon(human_mob))
Expand All @@ -55,6 +56,7 @@
user.count_niche_stat(STATISTICS_NICHE_HANDCUFF)

else if(ismonkey(target))
user.emote("me", message = "attempts to put [src] on [target].")
user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [target]."))
if(do_after(user, 30, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, target, INTERRUPT_MOVED, BUSY_ICON_GENERIC))
if(src == user.get_active_hand() && !target.handcuffed && Adjacent(user))
Expand Down
2 changes: 2 additions & 0 deletions code/game/objects/items/legcuffs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
msg_admin_attack("[key_name(user)] attempted to legcuff [key_name(human_target)] in [get_area(src)] ([loc.x],[loc.y],[loc.z]).", loc.x, loc.y, loc.z)

user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [human_target]."))
user.emote("me", message = "tries to put [src] on [human_target]")
if(do_after(user, cuff_delay, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, human_target, INTERRUPT_MOVED, BUSY_ICON_GENERIC))
if(src == user.get_active_hand() && !human_target.legcuffed && Adjacent(user))
if(iscarbon(human_target))
Expand All @@ -40,6 +41,7 @@
user.count_niche_stat(STATISTICS_NICHE_HANDCUFF)

else if (ismonkey(target))
user.emote("me", message = "tries to put [src] on [target]")
user.visible_message(SPAN_NOTICE("[user] tries to put [src] on [target]."))
if(do_after(user, 30, INTERRUPT_MOVED, BUSY_ICON_HOSTILE, target, INTERRUPT_MOVED, BUSY_ICON_GENERIC))
if(src == user.get_active_hand() && !target.legcuffed && Adjacent(user))
Expand Down
Loading

0 comments on commit 12308df

Please sign in to comment.