Skip to content

Commit 7d8b1b3

Browse files
authored
Antag stingers are now defined on the datum (tgstation#84209)
1 parent f675f09 commit 7d8b1b3

File tree

13 files changed

+28
-18
lines changed

13 files changed

+28
-18
lines changed

code/modules/antagonists/_common/antag_datum.dm

+10
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ GLOBAL_LIST_EMPTY(antagonists)
6161
var/default_custom_objective = "Cause chaos on the space station."
6262
/// Whether we give a hardcore random bonus for greentexting as this antagonist while playing hardcore random
6363
var/hardcore_random_bonus = FALSE
64+
/// A path to the audio stinger that plays upon gaining this datum.
65+
var/stinger_sound
6466

6567
//ANTAG UI
6668

@@ -342,6 +344,14 @@ GLOBAL_LIST_EMPTY(antagonists)
342344
/datum/antagonist/proc/greet()
343345
if(!silent)
344346
to_chat(owner.current, span_big("You are \the [src]."))
347+
play_stinger()
348+
349+
/// Plays the antag stinger sound, if we have one
350+
/datum/antagonist/proc/play_stinger()
351+
if(isnull(stinger_sound))
352+
return
353+
354+
owner.current.playsound_local(get_turf(owner.current), stinger_sound, 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
345355

346356
/**
347357
* Proc that sends fluff or instructional messages to the player when they lose this antag datum.

code/modules/antagonists/battlecruiser/battlecruiser.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@
2020
antag_hud_name = "battlecruiser_crew"
2121
antagpanel_category = ANTAG_GROUP_SYNDICATE
2222
job_rank = ROLE_BATTLECRUISER_CREW
23+
stinger_sound = 'sound/ambience/antag/ops.ogg'
2324
/// Team to place the crewmember on.
2425
var/datum/team/battlecruiser/battlecruiser_team
2526

2627
/datum/antagonist/battlecruiser/get_team()
2728
return battlecruiser_team
2829

2930
/datum/antagonist/battlecruiser/greet()
30-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0, use_reverb = FALSE)
31+
play_stinger()
3132
to_chat(owner, span_big("You are a [name]!"))
3233
owner.announce_objectives()
3334

code/modules/antagonists/blob/blob_antag.dm

+1-2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
show_in_antagpanel = FALSE
77
job_rank = ROLE_BLOB
88
ui_name = "AntagInfoBlob"
9+
stinger_sound = 'sound/ambience/antag/blobalert.ogg'
910
/// Action to release a blob infection
1011
var/datum/action/innate/blobpop/pop_action
1112
/// Initial points for a human blob
@@ -31,8 +32,6 @@
3132
else
3233
has_already_popped = TRUE
3334

34-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/blobalert.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
35-
3635
/datum/antagonist/blob/on_gain()
3736
create_objectives()
3837
. = ..()

code/modules/antagonists/brother/brother.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
suicide_cry = "FOR MY BROTHER!!"
1010
antag_moodlet = /datum/mood_event/focused
1111
hardcore_random_bonus = TRUE
12+
stinger_sound = 'sound/ambience/antag/tatoralert.ogg'
1213
VAR_PRIVATE
1314
datum/team/brother_team/team
1415

@@ -172,7 +173,7 @@
172173
owner.announce_objectives()
173174

174175
/datum/antagonist/brother/proc/finalize_brother()
175-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
176+
play_stinger()
176177
team.update_name()
177178

178179
/datum/antagonist/brother/admin_add(datum/mind/new_owner,mob/admin)

code/modules/antagonists/changeling/changeling.dm

+3-1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
can_assign_self_objectives = TRUE
1515
default_custom_objective = "Consume the station's most valuable genomes."
1616
hardcore_random_bonus = TRUE
17+
stinger_sound = 'sound/ambience/antag/ling_alert.ogg'
1718
/// Whether to give this changeling objectives or not
1819
var/give_objectives = TRUE
1920
/// Weather we assign objectives which compete with other lings
@@ -127,7 +128,6 @@
127128
if(give_objectives)
128129
forge_objectives()
129130
owner.current.get_language_holder().omnitongue = TRUE
130-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ling_alert.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
131131
return ..()
132132

133133
/datum/antagonist/changeling/apply_innate_effects(mob/living/mob_override)
@@ -1023,6 +1023,7 @@
10231023
total_chem_storage = 50
10241024

10251025
/datum/antagonist/changeling/headslug/greet()
1026+
play_stinger()
10261027
to_chat(owner, span_boldannounce("You are a fresh changeling birthed from a headslug! \
10271028
You aren't as strong as a normal changeling, as you are newly born."))
10281029

@@ -1035,6 +1036,7 @@
10351036
return finish_preview_icon(final_icon)
10361037

10371038
/datum/antagonist/changeling/space/greet()
1039+
play_stinger()
10381040
to_chat(src, span_changeling("Our mind stirs to life, from the depths of an endless slumber..."))
10391041

10401042
/datum/outfit/changeling

code/modules/antagonists/cult/datums/cultist.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
preview_outfit = /datum/outfit/cultist
88
job_rank = ROLE_CULTIST
99
antag_hud_name = "cult"
10+
stinger_sound = 'sound/ambience/antag/bloodcult/bloodcult_gain.ogg'
1011

1112
///The vote ability Cultists have to elect someone to be the leader.
1213
var/datum/action/innate/cult/mastervote/vote_ability
@@ -23,7 +24,6 @@
2324

2425
/datum/antagonist/cult/greet()
2526
. = ..()
26-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/bloodcult/bloodcult_gain.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)//subject to change
2727
owner.announce_objectives()
2828

2929
/datum/antagonist/cult/on_gain()

code/modules/antagonists/heretic/heretic_antag.dm

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
can_assign_self_objectives = TRUE
2727
default_custom_objective = "Turn a department into a testament for your dark knowledge."
2828
hardcore_random_bonus = TRUE
29+
stinger_sound = 'sound/ambience/antag/heretic/heretic_gain.ogg'
2930
/// Whether we give this antagonist objectives on gain.
3031
var/give_objectives = TRUE
3132
/// Whether we've ascended! (Completed one of the final rituals)
@@ -206,8 +207,6 @@
206207
if(give_objectives)
207208
forge_primary_objectives()
208209

209-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/heretic/heretic_gain.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
210-
211210
for(var/starting_knowledge in GLOB.heretic_start_knowledge)
212211
gain_knowledge(starting_knowledge)
213212

code/modules/antagonists/heretic/heretic_monsters.dm

+1-4
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,10 @@
88
antag_hud_name = "heretic_beast"
99
suicide_cry = "MY MASTER SMILES UPON ME!!"
1010
show_in_antagpanel = FALSE
11+
stinger_sound = 'sound/ambience/antag/heretic/heretic_gain.ogg'
1112
/// Our master (a heretic)'s mind.
1213
var/datum/mind/master
1314

14-
/datum/antagonist/heretic_monster/on_gain()
15-
. = ..()
16-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/heretic/heretic_gain.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
17-
1815
/datum/antagonist/heretic_monster/on_removal()
1916
if(!silent)
2017
if(master?.current)

code/modules/antagonists/nukeop/datums/operative.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
show_to_ghosts = TRUE
99
hijack_speed = 2 //If you can't take out the station, take the shuttle instead.
1010
suicide_cry = "FOR THE SYNDICATE!!"
11+
stinger_sound = 'sound/ambience/antag/ops.ogg'
1112
/// Which nukie team are we on?
1213
var/datum/team/nuclear/nuke_team
1314
/// If not assigned a team by default ops will try to join existing ones, set this to TRUE to always create new team.
@@ -30,7 +31,7 @@
3031
var/discount_limited_amount = 10
3132

3233
/datum/antagonist/nukeop/greet()
33-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0, use_reverb = FALSE)
34+
play_stinger()
3435
to_chat(owner, span_big("You are a [nuke_team ? nuke_team.syndicate_name : "syndicate"] agent!"))
3536
owner.announce_objectives()
3637

code/modules/antagonists/nukeop/datums/operative_leader.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
H.update_icons()
2222

2323
/datum/antagonist/nukeop/leader/greet()
24-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/ops.ogg',100,0, use_reverb = FALSE)
24+
play_stinger()
2525
to_chat(owner, "<span class='warningplain'><B>You are the Syndicate [title] for this mission. You are responsible for guiding the team and your ID is the only one who can open the launch bay doors.</B></span>")
2626
to_chat(owner, "<span class='warningplain'><B>If you feel you are not up to this task, give your ID and radio to another operative.</B></span>")
2727
if(!CONFIG_GET(flag/disable_warops))

code/modules/antagonists/obsessed/obsessed.dm

+2-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
suicide_cry = "FOR MY LOVE!!"
1313
preview_outfit = /datum/outfit/obsessed
1414
hardcore_random_bonus = TRUE
15+
stinger_sound = 'sound/ambience/antag/creepalert.ogg'
1516
var/datum/brain_trauma/special/obsessed/trauma
1617

1718
/datum/antagonist/obsessed/admin_add(datum/mind/new_owner,mob/admin)
@@ -28,7 +29,7 @@
2829
C.gain_trauma(/datum/brain_trauma/special/obsessed)//ZAP
2930

3031
/datum/antagonist/obsessed/greet()
31-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/creepalert.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
32+
play_stinger()
3233
owner.announce_objectives()
3334

3435
/datum/antagonist/obsessed/Destroy()

code/modules/antagonists/revolution/revolution.dm

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
antag_moodlet = /datum/mood_event/revolution
77
antag_hud_name = "rev"
88
suicide_cry = "VIVA LA REVOLUTION!!"
9+
stinger_sound = 'sound/ambience/antag/revolutionary_tide.ogg'
910
var/datum/team/revolution/rev_team
1011

1112
/// When this antagonist is being de-antagged, this is the source. Can be a mob (for mindshield/blunt force trauma) or a #define string.
@@ -67,7 +68,6 @@
6768
/datum/antagonist/rev/greet()
6869
. = ..()
6970
to_chat(owner, span_userdanger("Help your cause. Do not harm your fellow freedom fighters. You can identify your comrades by the red \"R\" icons, and your leaders by the blue \"R\" icons. Help them kill the heads to win the revolution!"))
70-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/revolutionary_tide.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
7171
owner.announce_objectives()
7272

7373
/datum/antagonist/rev/create_team(datum/team/revolution/new_team)

code/modules/antagonists/traitor/datum_traitor.dm

+1-2
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
can_assign_self_objectives = TRUE
1818
default_custom_objective = "Perform an overcomplicated heist on valuable Nanotrasen assets."
1919
hardcore_random_bonus = TRUE
20+
stinger_sound = 'sound/ambience/antag/tatoralert.ogg'
2021

2122
///The flag of uplink that this traitor is supposed to have.
2223
var/uplink_flag_given = UPLINK_TRAITORS
@@ -114,8 +115,6 @@
114115

115116
owner.teach_crafting_recipe(/datum/crafting_recipe/syndicate_uplink_beacon)
116117

117-
owner.current.playsound_local(get_turf(owner.current), 'sound/ambience/antag/tatoralert.ogg', 100, FALSE, pressure_affected = FALSE, use_reverb = FALSE)
118-
119118
return ..()
120119

121120
/datum/antagonist/traitor/on_removal()

0 commit comments

Comments
 (0)