Skip to content

Assault Operative Rework - GIVE ME THAT BOUNTY!!!!!!!! #6665

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 10 commits into
base: master
Choose a base branch
from
2 changes: 1 addition & 1 deletion code/__DEFINES/~monkestation/assault.dm
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@
#define ASSAULTOPS_PARTLY_DEAD 1
#define ASSAULTOPS_ALL_ALIVE 2

#define GOLDENEYE_REQUIRED_KEYS_MAXIMUM 3
#define GOLDENEYE_REQUIRED_MINDS_MAXIMUM 3

#define TRACK_GOLDENEYE 4
25 changes: 8 additions & 17 deletions monkestation/code/modules/assault_ops/code/antagonist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,7 @@
return ..()

/datum/antagonist/assault_operative/apply_innate_effects(mob/living/mob_override)
var/mob/living/target = mob_override || owner.current
monitor = target.AddComponent(/datum/component/team_monitor, "goldeneye_key")
for(var/obj/item/goldeneye_key/keycard as anything in SSgoldeneye.goldeneye_keys)
if(QDELETED(keycard))
continue
monitor.add_to_tracking_network(keycard.beacon)
monitor.show_hud(target)
add_team_hud(target, /datum/antagonist/assault_operative)


/datum/antagonist/assault_operative/remove_innate_effects(mob/living/mob_override)
var/mob/living/target = mob_override || owner.current
Expand All @@ -64,7 +57,7 @@

/datum/antagonist/assault_operative/on_gain()
. = ..()
RegisterSignal(SSdcs, COMSIG_GLOB_GOLDENEYE_KEY_CREATED, PROC_REF(on_goldeneye_key_created))
//RegisterSignal(SSdcs, COMSIG_GLOB_GOLDENEYE_KEY_CREATED, PROC_REF(on_goldeneye_key_created))
equip_operative()
forge_objectives()
if(send_to_spawnpoint)
Expand Down Expand Up @@ -93,15 +86,14 @@
// UI systems
/datum/antagonist/assault_operative/ui_data(mob/user)
return list(
"uploaded_keys" = SSgoldeneye.uploaded_keys,
"uploaded_minds" = SSgoldeneye.uploaded_minds,
"available_targets" = get_available_targets(),
"extracted_targets" = get_extracted_targets(),
"goldeneye_keys" = get_goldeneye_keys(),
)

/datum/antagonist/assault_operative/ui_static_data(mob/user)
return list(
"required_keys" = SSgoldeneye.required_keys,
"required_minds" = SSgoldeneye.required_minds,
"objectives" = get_objectives(),
)

Expand All @@ -124,7 +116,7 @@
"job" = iterating_mind.assigned_role.title,
))
return extracted_targets_data

/*
/datum/antagonist/assault_operative/proc/get_goldeneye_keys()
. = list()
for(var/obj/item/goldeneye_key/keycard as anything in SSgoldeneye.goldeneye_keys)
Expand All @@ -139,7 +131,7 @@
"coord_z" = location.z,
"ref" = REF(keycard),
))

*/

/datum/antagonist/assault_operative/forge_objectives()
if(assault_team)
Expand Down Expand Up @@ -199,11 +191,11 @@
disky.Shift(NORTH, 6)
final_icon.Blend(disky, ICON_UNDERLAY)
return finish_preview_icon(final_icon)

/*
/datum/antagonist/assault_operative/proc/on_goldeneye_key_created(datum/source, obj/item/goldeneye_key/key)
SIGNAL_HANDLER
monitor?.add_to_tracking_network(key.beacon)

*/
/**
* ASSAULT OPERATIVE TEAM DATUM
*/
Expand Down Expand Up @@ -254,7 +246,6 @@
else
parts += "<span class='neutraltext big'>Neutral Victory</span>"
parts += "<B>Mission aborted!</B>"
parts += span_redtext("GoldenEye keys uploaded: [SSgoldeneye.uploaded_keys]/[SSgoldeneye.required_keys]")

var/text = "<br><span class='header'>The assault operatives were:</span>"
text += printplayerlist(members)
Expand Down
136 changes: 38 additions & 98 deletions monkestation/code/modules/assault_ops/code/goldeneye.dm
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
#define ICARUS_IGNITION_TIME (20 SECONDS)
#define ICARUS_IGNITION_TIME (180 SECONDS)

/**
* GoldenEye defence network
*
* Contains: Subsystem, Keycard, Terminal and Objective
*
* 5/11/2025 GOLDENEYE keycards removed entirely in favor of soley 'abduct' objectives.
*/

SUBSYSTEM_DEF(goldeneye)
name = "GoldenEye"
flags = SS_NO_INIT | SS_NO_FIRE
/// A tracked list of all our keys.
var/list/goldeneye_keys = list()
var/list/goldeneye_minds = list()
/// A list of minds that have been extracted and thus cannot be extracted again.
var/list/goldeneye_extracted_minds = list()
/// How many keys have been uploaded to GoldenEye.
var/uploaded_keys = 0
/// We are removing keycards, so uploaded minds instead.
var/uploaded_minds = 0
/// How many keys do we need to activate GoldenEye? Can be overriden by Dynamic if there aren't enough heads of staff.
var/required_keys = GOLDENEYE_REQUIRED_KEYS_MAXIMUM
var/required_minds = GOLDENEYE_REQUIRED_MINDS_MAXIMUM
/// Have we been activated?
var/goldeneye_activated = FALSE
/// How long until ICARUS fires?
var/ignition_time = ICARUS_IGNITION_TIME
//if the goldeneye console is destroyed or not
var/console_status = TRUE

/datum/controller/subsystem/goldeneye/Recover()
goldeneye_keys = SSgoldeneye.goldeneye_keys
goldeneye_minds = SSgoldeneye.goldeneye_minds
goldeneye_extracted_minds = SSgoldeneye.goldeneye_extracted_minds
uploaded_keys = SSgoldeneye.uploaded_keys
required_keys = SSgoldeneye.required_keys
uploaded_minds = SSgoldeneye.uploaded_minds
required_minds = SSgoldeneye.required_minds
goldeneye_activated = SSgoldeneye.goldeneye_activated
ignition_time = SSgoldeneye.ignition_time

/// A safe proc for adding a targets mind to the tracked extracted minds.
/// A safe proc for adding a targets mind to the tracked extracted minds and incrementing the uploaded minds counter.
/datum/controller/subsystem/goldeneye/proc/extract_mind(datum/mind/target_mind)
goldeneye_extracted_minds += target_mind

/// A safe proc for registering a new key to the goldeneye system.
/datum/controller/subsystem/goldeneye/proc/upload_key()
uploaded_keys++
uploaded_minds++
check_condition()

/// Checks our activation condition after an upload has occured.
/datum/controller/subsystem/goldeneye/proc/check_condition()
if(uploaded_keys >= required_keys)
activate()
if(uploaded_minds >= required_minds)
goldeneye_activated = TRUE
return
priority_announce("UNAUTHORISED KEYCARD UPLOAD DETECTED. [uploaded_keys]/[required_keys] KEYCARDS UPLOADED.", "GoldenEye Defence Network")
priority_announce("SYNDICATE MENTAL PROBING SEQUENCE UNDER WAY. [uploaded_minds]/[required_minds] MINDS UPLOADED.", "GoldenEye Defence Network")

/// Activates goldeneye.
/datum/controller/subsystem/goldeneye/proc/activate()
Expand All @@ -54,13 +55,17 @@ SUBSYSTEM_DEF(goldeneye)
Targeting system override detected... \n \
New target: /NTSS13/ \n \
ICARUS firing protocols activated. \n \
ETA to fire: [ignition_time / 10] seconds."
ETA to fire: [ignition_time / 60] minutes."

//priority_announce(message, "GoldenEye Defence Network", ANNOUNCER_ICARUS)
// Set delta alert, wait a few minutes, fire multiple lasers
priority_announce(message, "GoldenEye Defence Network", ANNOUNCER_ICARUS)
goldeneye_activated = TRUE

addtimer(CALLBACK(src, PROC_REF(fire_icarus)), ignition_time)

SSsecurity_level.set_level(SEC_LEVEL_DELTA)
addtimer(CALLBACK(src, PROC_REF(fire_icarus)), ignition_time) //fire icarus multiple times?
//waits 3 minutes before firing. sets a gps signal to the goldeneye console. if the console is destroyed, it will not fire
var/obj/item/gps/goldeneye_gps = new /obj/item/gps
goldeneye_gps.gpstag = "GoldenEye Console"
goldeneye_gps.forceMove(locate(/obj/machinery/goldeneye_upload_terminal))

/datum/controller/subsystem/goldeneye/proc/fire_icarus()
var/datum/round_event_control/icarus_sunbeam/event_to_start = new()
Expand All @@ -76,98 +81,33 @@ SUBSYSTEM_DEF(goldeneye)
return TRUE
return FALSE

// Goldeneye key
/obj/item/goldeneye_key
name = "\improper GoldenEye authentication keycard"
desc = "A high profile authentication keycard to Nanotrasen's GoldenEye defence network. It seems indestructible."
icon = 'monkestation/code/modules/assault_ops/icons/goldeneye.dmi'
icon_state = "goldeneye_key"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
max_integrity = INFINITY
/// A unique tag that is used to identify this key.
var/goldeneye_tag = "G00000"
/// Flavour text for who's mind is in the key.
var/extract_name = "NO DATA"
/// The color used for the tracking hUD element.
var/beacon_color = COLOR_WHITE
/// The tracking beacon component, used so the operatives can track it via HUD arrows.
var/datum/component/tracking_beacon/beacon

/obj/item/goldeneye_key/Initialize(mapload)
. = ..()
SSgoldeneye.goldeneye_keys += src
goldeneye_tag = "G[rand(10000, 99999)]"
name = "\improper GoldenEye authentication keycard: [goldeneye_tag]"
AddComponent(/datum/component/stationloving/goldeneye)
AddComponent(/datum/component/gps, goldeneye_tag)
beacon = AddComponent(/datum/component/tracking_beacon, "goldeneye_key", _colour = choose_beacon_color(), _global = TRUE, _always_update = TRUE)
SSpoints_of_interest.make_point_of_interest(src)
SEND_GLOBAL_SIGNAL(COMSIG_GLOB_GOLDENEYE_KEY_CREATED, src)

/obj/item/goldeneye_key/Destroy(force)
SSgoldeneye.goldeneye_keys -= src
QDEL_NULL(beacon)
return ..()

/obj/item/goldeneye_key/proc/choose_beacon_color()
var/static/list/possible_beacon_colors
var/static/next_beacon_color = 1
if(isnull(possible_beacon_colors))
possible_beacon_colors = shuffle(flatten_list(GLOB.cable_colors))
beacon_color = possible_beacon_colors[next_beacon_color]
next_beacon_color = WRAP_UP(next_beacon_color, length(possible_beacon_colors))
return beacon_color

/obj/item/goldeneye_key/examine(mob/user)
. = ..()
. += "The DNA data link belongs to: [extract_name]"

// Upload terminal
/obj/machinery/goldeneye_upload_terminal
name = "\improper GoldenEye Defnet Upload Terminal"
desc = "An ominous terminal with some ports and keypads, the screen is scrolling with illegible nonsense. It has a strange marking on the side, a red ring with a gold circle within."
icon = 'monkestation/code/modules/assault_ops/icons/goldeneye.dmi'
icon_state = "goldeneye_terminal"
resistance_flags = INDESTRUCTIBLE | LAVA_PROOF | FIRE_PROOF | UNACIDABLE | ACID_PROOF
density = TRUE
/// Is the system currently in use? Used to prevent spam and abuse.
var/uploading = FALSE


/obj/machinery/goldeneye_upload_terminal/attackby(obj/item/weapon, mob/user, params)
/obj/machinery/goldeneye_upload_terminal/attackby(obj/item/weapon, mob/user, params) //attack by an empty hand
. = ..()
if(uploading)
return
if(!is_station_level(z))
say("CONNECTION TO GOLDENEYE NOT DETECTED: Please return to comms range.")
playsound(src, 'sound/machines/nuke/angry_beep.ogg', 100)
return
if(!istype(weapon, /obj/item/goldeneye_key))
say("AUTHENTICATION ERROR: Please do not insert foreign objects into terminal.")
playsound(src, 'sound/machines/nuke/angry_beep.ogg', 100)
return
var/obj/item/goldeneye_key/inserting_key = weapon
say("GOLDENEYE KEYCARD ACCEPTED: Please wait while the keycard is verified...")
playsound(src, 'sound/machines/nuke/general_beep.ogg', 100)
uploading = TRUE
if(do_after(user, 10 SECONDS, src))
say("GOLDENEYE KEYCARD AUTHENTICATED!")
playsound(src, 'sound/machines/nuke/confirm_beep.ogg', 100)
SSgoldeneye.upload_key()
uploading = FALSE
// Remove its stationloving, so we can delete it.
qdel(inserting_key.GetComponent(/datum/component/stationloving/goldeneye))
qdel(inserting_key)
else
say("GOLDENEYE KEYCARD VERIFICATION FAILED: Please try again.")
playsound(src, 'sound/machines/nuke/angry_beep.ogg', 100)
uploading = FALSE
if(SSgoldeneye.goldeneye_activated)
SSgoldeneye.activate()
/obj/machinery/goldeneye_upload_terminal/Destroy()
. = ..()
SSgoldeneye.console_status = FALSE
priority_announce("GoldenEye Defence Network Link Destroyed- System Offline", "Goldeneye Defense Network", ANNOUNCER_ICARUS)
SSsecurity_level.set_level(SEC_LEVEL_BLUE)
GLOB.machines.Remove(src)
SSmachines.unregister_machine(src)

// Objective
//objective
/datum/objective/goldeneye
name = "subvert goldeneye"
objective_name = "Subvert GoldenEye"
explanation_text = "Extract all of the required GoldenEye authentication keys from the heads of staff and activate GoldenEye."
explanation_text = "Steal key information from the heads of staff and activate GoldenEye."
martyr_compatible = TRUE

/datum/objective/goldeneye/check_completion()
Expand Down
53 changes: 8 additions & 45 deletions monkestation/code/modules/assault_ops/code/interrogator.dm
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
*/
/obj/machinery/interrogator
name = "In-TERROR-gator"
desc = "A morraly corrupt piece of machinery used to extract the human mind into a GoldenEye authentication key. The process is said to be one of the most painful experiences someone can endure. Alt + Click to start the process."
desc = "A morraly corrupt piece of machinery used to extract specific information from a human mind. The process is said to be one of the most uncomfortable experiences someone can endure. Alt + Click to start the process."
icon = 'monkestation/code/modules/assault_ops/icons/goldeneye.dmi'
icon_state = "interrogator_open"
state_open = FALSE
Expand Down Expand Up @@ -57,7 +57,7 @@
/obj/machinery/interrogator/examine(mob/user)
. = ..()
. += "It requies a direct link to a Nanotrasen defence network, stay near a Nanotrasen comms sat!"
. += span_info(span_italics("If a target has committed suicide, their body can still be used to instantly extract the keycard."))
. += span_info(span_italics("If a target has committed suicide, their body can still be used to instantly extract the data."))

/obj/machinery/interrogator/AltClick(mob/user)
. = ..()
Expand Down Expand Up @@ -149,8 +149,8 @@
/obj/machinery/interrogator/proc/handle_victim_suicide(mob/living/carbon/human/victim)
if(!HAS_TRAIT(victim, TRAIT_SUICIDED))
return FALSE
say("Extraction completed instantly due to target's mental state. A key is being sent aboard! Crew will shortly detect the keycard!")
send_keycard()
say("Extraction completed instantly due to target's mental state.")
SSgoldeneye.extract_mind(victim.mind)
addtimer(CALLBACK(src, PROC_REF(announce_creation)), ALERT_CREW_TIME)
return TRUE

Expand Down Expand Up @@ -191,15 +191,15 @@
say("Critical error! Aborting.")
playsound(src, 'sound/machines/scanbuzz.ogg', 100)
return
to_chat(human_occupant, span_userdanger("You feel something penetrating your brain, it feels as though your childhood memories are fading! Please, make it stop! After a moment of silence, you realize you can't remember what happened to you!"))
to_chat(human_occupant, span_userdanger("You feel something looking around your brain! A second later, you feel the thoughts being physically removed from your head!"))
human_occupant.emote("scream")
human_occupant.adjustBruteLoss(30)
human_occupant.set_jitter_if_lower(3 MINUTES)
human_occupant.Unconscious(1 MINUTES)
playsound(src, 'sound/effects/dismember.ogg', 100)
playsound(src, 'sound/machines/ping.ogg', 100)
say("Process complete! A key is being sent aboard! Crew will shortly detect the keycard!")
send_keycard()
say("Process complete!")
SSgoldeneye.extract_mind(human_occupant.mind)
processing = FALSE
locked = FALSE
update_appearance()
Expand All @@ -208,9 +208,7 @@
addtimer(CALLBACK(src, PROC_REF(announce_creation)), ALERT_CREW_TIME)

/obj/machinery/interrogator/proc/announce_creation()
priority_announce("CRITICAL SECURITY BREACH DETECTED! A GoldenEye authentication keycard has been illegally extracted and is being sent in somewhere on the station!", "GoldenEye Defence Network")
for(var/obj/item/pinpointer/nuke/disk_pinpointers in GLOB.pinpointer_list)
disk_pinpointers.switch_mode_to(TRACK_GOLDENEYE) //Pinpointer will track the newly created goldeneye key.
priority_announce("CRITICAL SECURITY BREACH DETECTED! Goldeneye security defense protocols initiated!", "GoldenEye Defence Network") //Pinpointer will track the newly created goldeneye key.

if(SSshuttle.emergency.mode == SHUTTLE_CALL)
var/delaytime = 5 MINUTES
Expand All @@ -220,41 +218,6 @@
if(surplus > 0)
SSshuttle.block_recall(surplus)

/obj/machinery/interrogator/proc/send_keycard()
var/turf/landingzone = find_drop_turf()
var/obj/item/goldeneye_key/new_key
if(!landingzone)
new_key = new(src)
else
new_key = new
new_key.extract_name = human_occupant.real_name
// Add them to the goldeneye extracted list. This list is capable of having nulls.
SSgoldeneye.extract_mind(human_occupant.mind)
var/obj/structure/closet/supplypod/pod = new
new /obj/effect/pod_landingzone(landingzone, pod, new_key)

notify_ghosts("GoldenEye key launched!",
source = new_key,
header = "Something's Interesting!",
)

/obj/machinery/interrogator/proc/find_drop_turf()
var/list/possible_turfs = list()

var/obj/structure/test_structure = new() // This is apparently the most intuative way to check if a turf is able to support entering.

for(var/area/station/maintenance/maint_area in GLOB.areas)
for(var/turf/area_turf in maint_area)
if(!is_station_level(area_turf.z))
continue
if(area_turf.Enter(test_structure))
possible_turfs += area_turf
qdel(test_structure)

//Pick a turf to spawn at if we can
if(length(possible_turfs))
return pick(possible_turfs)

///This proc attempts to return the head of staff back to the station after the interrogator finishes
/obj/machinery/interrogator/proc/return_victim()
var/turf/open/floor/safe_turf = get_safe_random_station_turf_equal_weight()
Expand Down
Loading
Loading