Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit 9cbf43a

Browse files
authored
Lets nukies use the self-destruct terminal, balances it (#22870)
* DECOMPRESSED REFERENCE * its -> their
1 parent 73b2f92 commit 9cbf43a

File tree

5 files changed

+31
-5
lines changed

5 files changed

+31
-5
lines changed

code/__DEFINES/antagonists.dm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
#define NUKE_RESULT_NOSURVIVORS 6
1313
#define NUKE_RESULT_WRONG_STATION 7
1414
#define NUKE_RESULT_WRONG_STATION_DEAD 8
15+
#define NUKE_RESULT_SELF_DESTRUCT 9
1516

1617
//fugitive end results
1718
#define FUGITIVE_RESULT_BADASS_HUNTER 0

code/modules/antagonists/nukeop/equipment/nuclearbomb.dm

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@
6666
icon = 'icons/obj/machines/nuke_terminal.dmi'
6767
anchored = TRUE //stops it being moved
6868

69+
/obj/machinery/nuclearbomb/selfdestruct/examine(mob/user)
70+
. = ..()
71+
. += span_boldnotice("Self-destruct sequence requires the disk to remain inside until detonation. Ejection will cancel detonation.")
72+
6973
/obj/machinery/nuclearbomb/syndicate
7074
//ui_style = "syndicate" // actually the nuke op bomb is a stole nt bomb
7175

@@ -316,6 +320,8 @@
316320
playsound(src, 'sound/machines/nuke/general_beep.ogg', 50, FALSE)
317321
auth = I
318322
. = TRUE
323+
if(istype(src, /obj/machinery/nuclearbomb/selfdestruct) && timing)
324+
set_active() // Disarm if ejected, selfdestruct requires disk the entire way for balance reasons
319325
update_ui_mode()
320326
if("keypad")
321327
if(auth)
@@ -476,8 +482,10 @@
476482
SSshuttle.registerHostileEnvironment(src)
477483
SSshuttle.lockdown = TRUE
478484

485+
var/is_self_destruct = istype(src, /obj/machinery/nuclearbomb/selfdestruct)
486+
479487
//Cinematic
480-
SSgamemode.OnNukeExplosion(off_station)
488+
SSgamemode.OnNukeExplosion(off_station, is_self_destruct)
481489
really_actually_explode(off_station)
482490
SSticker.roundend_check_paused = FALSE
483491

code/modules/antagonists/nukeop/nukeop.dm

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,10 @@
8181
stack_trace("Syndicate nuke not found during nuke team creation.")
8282
nuke_team.memorized_code = null
8383

84+
var/obj/machinery/nuclearbomb/selfdestruct/humiliate_nuke = find_self_destruct()
85+
if(humiliate_nuke && nuke_team.memorized_code)
86+
humiliate_nuke.r_code = nuke_team.memorized_code
87+
8488
/datum/antagonist/nukeop/proc/give_alias()
8589
if(nuke_team && nuke_team.syndicate_name)
8690
var/mob/living/carbon/human/H = owner.current
@@ -178,7 +182,7 @@
178182
/datum/outfit/nuclear_operative_elite
179183
name = "Nuclear Operative (Elite, Preview only)"
180184
mask = /obj/item/clothing/mask/gas/syndicate
181-
uniform = /obj/item/clothing/under/syndicate
185+
uniform = /obj/item/clothing/under/syndicate
182186
suit = /obj/item/clothing/suit/space/hardsuit/syndi/elite
183187
head = /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite
184188
r_hand = /obj/item/shield/energy
@@ -332,9 +336,12 @@
332336
var/syndies_didnt_escape = !syndies_escaped()
333337
var/station_was_nuked = SSgamemode.station_was_nuked
334338
var/nuke_off_station = SSgamemode.nuke_off_station
339+
var/self_destructed = SSgamemode.nuke_self_destruct
335340

336341
if(nuke_off_station == NUKE_SYNDICATE_BASE)
337342
return NUKE_RESULT_FLUKE
343+
else if(station_was_nuked && self_destructed)
344+
return NUKE_RESULT_SELF_DESTRUCT
338345
else if(station_was_nuked && !nuke_off_station && !syndies_didnt_escape)
339346
return NUKE_RESULT_NUKE_WIN
340347
else if (station_was_nuked && !nuke_off_station && syndies_didnt_escape)
@@ -362,6 +369,9 @@
362369
if(NUKE_RESULT_FLUKE)
363370
parts += "<span class='redtext big'>Humiliating Syndicate Defeat</span>"
364371
parts += "<B>The crew of [station_name()] gave [syndicate_name] operatives back their bomb! The syndicate base was destroyed!</B> Next time, don't lose the nuke!"
372+
if(NUKE_RESULT_SELF_DESTRUCT)
373+
parts += "<span class='greentext big'>Humiliating Crew Defeat</span>"
374+
parts += "<B>As far as Nanotrasen cares, the crew of [station_name()] activated their self destruct device for unknown reasons.</B> Surviving crew will be interrogated and heavily penalized."
365375
if(NUKE_RESULT_NUKE_WIN)
366376
parts += "<span class='greentext big'>Syndicate Major Victory!</span>"
367377
parts += "<B>[syndicate_name] operatives have destroyed [station_name()]!</B>"

yogstation/code/game/gamemodes/clean_this_shit_up/other.dm

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,14 @@
3333
//nukies
3434
var/station_was_nuked = FALSE
3535
var/nuke_off_station = FALSE
36+
var/nuke_self_destruct = FALSE
3637

3738
// dunno what this one did
3839
var/allow_persistence_save = FALSE
3940

4041
// rewrite this to be objective track stuff instead
4142
var/list/datum/station_goal/station_goals = list()
42-
43+
4344
/// Associative list of current players, in order: living players, living antagonists, dead players and observers.
4445
var/list/list/current_players = list(CURRENT_LIVING_PLAYERS = list(), CURRENT_LIVING_ANTAGS = list(), CURRENT_DEAD_PLAYERS = list(), CURRENT_OBSERVERS = list())
4546

@@ -297,7 +298,8 @@
297298

298299
return round_credits
299300

300-
/datum/controller/subsystem/gamemode/proc/OnNukeExplosion(off_station)
301+
/datum/controller/subsystem/gamemode/proc/OnNukeExplosion(off_station, is_self_destruct = FALSE)
301302
nuke_off_station = off_station
302303
if(off_station < 2)
303304
station_was_nuked = TRUE //Will end the round on next check.
305+
nuke_self_destruct = is_self_destruct
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,9 @@
11
/datum/antagonist/nukeop/proc/find_nuke() // Finds a nuke we can blow up
22
for(var/obj/machinery/nuclearbomb/syndicate/denton in GLOB.nuke_list)
33
if(!istype(denton,/obj/machinery/nuclearbomb/syndicate/bananium) && !denton.centcom) // OH MY GOD JC A BOMB
4-
return denton // A BOMB!
4+
return denton // A BOMB!
5+
6+
/datum/antagonist/nukeop/proc/find_self_destruct() // Finds a station-side self-destruct terminal
7+
for(var/obj/machinery/nuclearbomb/selfdestruct/selfd in GLOB.nuke_list)
8+
if(!selfd.centcom && is_station_level(selfd.z))
9+
return selfd

0 commit comments

Comments
 (0)