Skip to content

Commit

Permalink
Lets nukies use the self-destruct terminal, balances it (#22870)
Browse files Browse the repository at this point in the history
* DECOMPRESSED REFERENCE

* its -> their
  • Loading branch information
ynot01 authored Jan 13, 2025
1 parent 73b2f92 commit 9cbf43a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 5 deletions.
1 change: 1 addition & 0 deletions code/__DEFINES/antagonists.dm
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#define NUKE_RESULT_NOSURVIVORS 6
#define NUKE_RESULT_WRONG_STATION 7
#define NUKE_RESULT_WRONG_STATION_DEAD 8
#define NUKE_RESULT_SELF_DESTRUCT 9

//fugitive end results
#define FUGITIVE_RESULT_BADASS_HUNTER 0
Expand Down
10 changes: 9 additions & 1 deletion code/modules/antagonists/nukeop/equipment/nuclearbomb.dm
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
icon = 'icons/obj/machines/nuke_terminal.dmi'
anchored = TRUE //stops it being moved

/obj/machinery/nuclearbomb/selfdestruct/examine(mob/user)
. = ..()
. += span_boldnotice("Self-destruct sequence requires the disk to remain inside until detonation. Ejection will cancel detonation.")

/obj/machinery/nuclearbomb/syndicate
//ui_style = "syndicate" // actually the nuke op bomb is a stole nt bomb

Expand Down Expand Up @@ -316,6 +320,8 @@
playsound(src, 'sound/machines/nuke/general_beep.ogg', 50, FALSE)
auth = I
. = TRUE
if(istype(src, /obj/machinery/nuclearbomb/selfdestruct) && timing)
set_active() // Disarm if ejected, selfdestruct requires disk the entire way for balance reasons
update_ui_mode()
if("keypad")
if(auth)
Expand Down Expand Up @@ -476,8 +482,10 @@
SSshuttle.registerHostileEnvironment(src)
SSshuttle.lockdown = TRUE

var/is_self_destruct = istype(src, /obj/machinery/nuclearbomb/selfdestruct)

//Cinematic
SSgamemode.OnNukeExplosion(off_station)
SSgamemode.OnNukeExplosion(off_station, is_self_destruct)
really_actually_explode(off_station)
SSticker.roundend_check_paused = FALSE

Expand Down
12 changes: 11 additions & 1 deletion code/modules/antagonists/nukeop/nukeop.dm
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,10 @@
stack_trace("Syndicate nuke not found during nuke team creation.")
nuke_team.memorized_code = null

var/obj/machinery/nuclearbomb/selfdestruct/humiliate_nuke = find_self_destruct()
if(humiliate_nuke && nuke_team.memorized_code)
humiliate_nuke.r_code = nuke_team.memorized_code

/datum/antagonist/nukeop/proc/give_alias()
if(nuke_team && nuke_team.syndicate_name)
var/mob/living/carbon/human/H = owner.current
Expand Down Expand Up @@ -178,7 +182,7 @@
/datum/outfit/nuclear_operative_elite
name = "Nuclear Operative (Elite, Preview only)"
mask = /obj/item/clothing/mask/gas/syndicate
uniform = /obj/item/clothing/under/syndicate
uniform = /obj/item/clothing/under/syndicate
suit = /obj/item/clothing/suit/space/hardsuit/syndi/elite
head = /obj/item/clothing/head/helmet/space/hardsuit/syndi/elite
r_hand = /obj/item/shield/energy
Expand Down Expand Up @@ -332,9 +336,12 @@
var/syndies_didnt_escape = !syndies_escaped()
var/station_was_nuked = SSgamemode.station_was_nuked
var/nuke_off_station = SSgamemode.nuke_off_station
var/self_destructed = SSgamemode.nuke_self_destruct

if(nuke_off_station == NUKE_SYNDICATE_BASE)
return NUKE_RESULT_FLUKE
else if(station_was_nuked && self_destructed)
return NUKE_RESULT_SELF_DESTRUCT
else if(station_was_nuked && !nuke_off_station && !syndies_didnt_escape)
return NUKE_RESULT_NUKE_WIN
else if (station_was_nuked && !nuke_off_station && syndies_didnt_escape)
Expand Down Expand Up @@ -362,6 +369,9 @@
if(NUKE_RESULT_FLUKE)
parts += "<span class='redtext big'>Humiliating Syndicate Defeat</span>"
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!"
if(NUKE_RESULT_SELF_DESTRUCT)
parts += "<span class='greentext big'>Humiliating Crew Defeat</span>"
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."
if(NUKE_RESULT_NUKE_WIN)
parts += "<span class='greentext big'>Syndicate Major Victory!</span>"
parts += "<B>[syndicate_name] operatives have destroyed [station_name()]!</B>"
Expand Down
6 changes: 4 additions & 2 deletions yogstation/code/game/gamemodes/clean_this_shit_up/other.dm
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,14 @@
//nukies
var/station_was_nuked = FALSE
var/nuke_off_station = FALSE
var/nuke_self_destruct = FALSE

// dunno what this one did
var/allow_persistence_save = FALSE

// rewrite this to be objective track stuff instead
var/list/datum/station_goal/station_goals = list()

/// Associative list of current players, in order: living players, living antagonists, dead players and observers.
var/list/list/current_players = list(CURRENT_LIVING_PLAYERS = list(), CURRENT_LIVING_ANTAGS = list(), CURRENT_DEAD_PLAYERS = list(), CURRENT_OBSERVERS = list())

Expand Down Expand Up @@ -297,7 +298,8 @@

return round_credits

/datum/controller/subsystem/gamemode/proc/OnNukeExplosion(off_station)
/datum/controller/subsystem/gamemode/proc/OnNukeExplosion(off_station, is_self_destruct = FALSE)
nuke_off_station = off_station
if(off_station < 2)
station_was_nuked = TRUE //Will end the round on next check.
nuke_self_destruct = is_self_destruct
7 changes: 6 additions & 1 deletion yogstation/code/modules/antagonists/nukeop/nukeop.dm
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
/datum/antagonist/nukeop/proc/find_nuke() // Finds a nuke we can blow up
for(var/obj/machinery/nuclearbomb/syndicate/denton in GLOB.nuke_list)
if(!istype(denton,/obj/machinery/nuclearbomb/syndicate/bananium) && !denton.centcom) // OH MY GOD JC A BOMB
return denton // A BOMB!
return denton // A BOMB!

/datum/antagonist/nukeop/proc/find_self_destruct() // Finds a station-side self-destruct terminal
for(var/obj/machinery/nuclearbomb/selfdestruct/selfd in GLOB.nuke_list)
if(!selfd.centcom && is_station_level(selfd.z))
return selfd

0 comments on commit 9cbf43a

Please sign in to comment.