Skip to content
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

Ares Nuke Request #3988

Merged
merged 57 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
02b9ae8
Code quality
realforest2001 Jun 28, 2023
14276e8
Started work on reports
realforest2001 Jun 28, 2023
455ec58
ID and ARES size
realforest2001 Jul 1, 2023
271d2c5
12.8.3
realforest2001 Jul 2, 2023
263e889
Merge branch 'master' into project/apollo_controller
realforest2001 Jul 2, 2023
506254e
ARES punctuation & Fixes
realforest2001 Jul 2, 2023
0713611
ui icons
realforest2001 Jul 3, 2023
708a9df
Apollo Follow
realforest2001 Jul 4, 2023
c4269d6
red
realforest2001 Jul 4, 2023
689faea
Proc creation
Ben10083 Jul 11, 2023
9812da5
Implement proc to various admin functions
Ben10083 Jul 11, 2023
23dadb8
Add ares log proc
Ben10083 Jul 11, 2023
21a1f4e
Implement proc
Ben10083 Jul 11, 2023
4e533a9
Log bioscan only if ares can log
Ben10083 Jul 11, 2023
9d35a04
Beagle Request: Allow messages to send even without working processor…
Ben10083 Jul 11, 2023
185c8a6
Nit Picks
Ben10083 Jul 11, 2023
9e9ef12
Bioscan Failure Announcement
Ben10083 Jul 12, 2023
495c132
Rename of bioscan proc
Ben10083 Jul 12, 2023
e6823fa
Log failure into Bioscan Logs
Ben10083 Jul 12, 2023
d5e7054
oops need to move variable
Ben10083 Jul 12, 2023
01a2f5d
forced exception
Ben10083 Jul 12, 2023
eaa1e7f
istype link checks for procs
Ben10083 Jul 12, 2023
65328b6
Edit to Bioscan logging proc
Ben10083 Jul 12, 2023
643a85f
Adjustment: bioscan will log if interface down
Ben10083 Jul 12, 2023
9bb1e38
Change of format for failure message
Ben10083 Jul 12, 2023
2bce20f
forgot to check if interface subsystem also goes down for bioscan fai…
Ben10083 Jul 12, 2023
895867e
Proper procs used
Ben10083 Jul 12, 2023
c2f8cbd
Inform admins if bioscan occurred but not announced/logged
Ben10083 Jul 12, 2023
a67c63d
Remove admin msgs (made a mistake, fixing)
Ben10083 Jul 12, 2023
a2769a2
Restore old msg
Ben10083 Jul 12, 2023
032bfdf
Admin message for no announcement (for real this time)
Ben10083 Jul 12, 2023
b66be49
indents
Ben10083 Jul 12, 2023
37f84ae
Update code/game/machinery/ARES/ARES_procs.dm
Ben10083 Jul 13, 2023
ed926c2
Update code/game/machinery/ARES/ARES_procs.dm
Ben10083 Jul 13, 2023
a4ff6b0
beginning on access
realforest2001 Jul 15, 2023
0133fb2
Vent Gas
realforest2001 Jul 15, 2023
e1acb04
Merge pull request #8 from Ben10083/project/apollo_controller
realforest2001 Jul 15, 2023
6c57a38
Merge remote-tracking branch 'cmss13-devs/master' into project/apollo…
realforest2001 Jul 15, 2023
0c6722c
Gas Mask
realforest2001 Jul 15, 2023
6c3ddda
First pass
Ben10083 Jul 20, 2023
aa548bc
bug fix
Ben10083 Jul 20, 2023
f03fd0c
Just give me some space
Ben10083 Jul 20, 2023
86869f4
Cannot get two nukes
Ben10083 Jul 20, 2023
725f198
Merge branch 'master' into ARES_Nuke
Ben10083 Jul 25, 2023
f63d793
Attempting to fix merge fuckery
Ben10083 Jul 25, 2023
22ccb1b
mispells
Ben10083 Jul 25, 2023
eae1e9c
Finishing Touches
Ben10083 Jul 25, 2023
c4e0a1d
Merge branch 'master' into ARES_Nuke
Ben10083 Jul 25, 2023
b73931c
Forgot a comment
Ben10083 Jul 25, 2023
34a1e2f
Merge branch 'master' into ARES_Nuke
Ben10083 Jul 25, 2023
aadb065
Suggested Changes
Ben10083 Jul 25, 2023
ffe7259
Merge branch 'master' into ARES_Nuke
Ben10083 Jul 25, 2023
a5174f6
:)
Ben10083 Jul 25, 2023
62d6b65
Better Announcement
Ben10083 Jul 25, 2023
c49639b
me when no comma
Ben10083 Jul 25, 2023
b7b4b1f
small change to announcement
Ben10083 Jul 25, 2023
92960cf
Logging and shit
Ben10083 Jul 25, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions code/game/machinery/ARES/ARES.dm
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@
var/list/records_asrs = list()
/// Holds all (/datum/ares_record/security)s and (/datum/ares_record/antiair)s
var/list/records_security = list()
/// Is nuke request usable or not? (Nuke request is not currently coded to work.)
var/nuke_available = FALSE
/// Is nuke request usable or not?
var/nuke_available = TRUE


COOLDOWN_DECLARE(ares_distress_cooldown)
Expand Down
15 changes: 11 additions & 4 deletions code/game/machinery/ARES/ARES_procs.dm
Original file line number Diff line number Diff line change
Expand Up @@ -576,15 +576,22 @@ GLOBAL_LIST_INIT(maintenance_categories, list(
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE
if(security_level == SEC_LEVEL_DELTA || SSticker.mode.is_in_endgame)
to_chat(usr, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for!"))
to_chat(usr, SPAN_WARNING("The mission has failed catastrophically, what do you want a nuke for?!"))
playsound(src, 'sound/machines/buzz-two.ogg', 15, 1)
return FALSE

var/reason = tgui_input_text(usr, "Please enter reason nuclear ordnance is required.", "Reason for Nuclear Ordnance")
if(!reason)
return FALSE
for(var/client/admin in GLOB.admins)
if((R_ADMIN|R_MOD) & admin.admin_holder.rights)
playsound_client(admin,'sound/effects/sos-morse-code.ogg',10)
message_admins("[key_name(usr)] has requested use of Nuclear Ordnance (via ARES)! [CC_MARK(usr)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];nukeapprove=\ref[usr]'>APPROVE</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];nukedeny=\ref[usr]'>DENY</A>) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]")
to_chat(usr, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command."))
message_admins("[key_name(usr)] has requested use of Nuclear Ordnance (via ARES)! Reason: <b>[reason]</b> [CC_MARK(usr)] (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];nukeapprove=\ref[usr]'>APPROVE</A>) (<A HREF='?_src_=admin_holder;[HrefToken(forceGlobal = TRUE)];nukedeny=\ref[usr]'>DENY</A>) [ADMIN_JMP_USER(usr)] [CC_REPLY(usr)]")
to_chat(usr, SPAN_NOTICE("A nuclear ordnance request has been sent to USCM High Command for the following reason: [reason]"))
if(ares_can_log())
link.log_ares_security("Nuclear Ordnance Request", "[last_login] has sent a request for nuclear ordnance for the following reason: [reason]")
if(ares_can_interface())
ai_silent_announcement("[last_login] has sent a request for nuclear ordnance to USCM High Command.", ".V")
ai_silent_announcement("Reason given: [reason].", ".V")
COOLDOWN_START(src, ares_nuclear_cooldown, COOLDOWN_COMM_DESTRUCT)
return TRUE
// ------ End ARES Interface UI ------ //
Expand Down
38 changes: 37 additions & 1 deletion code/modules/admin/topic/topic.dm
Original file line number Diff line number Diff line change
Expand Up @@ -982,7 +982,7 @@
message_admins("[key_name_admin(usr)] has sent [key_name_admin(M)] to the thunderdome. (Observer.)", 1)

else if(href_list["revive"])
if(!check_rights(R_MOD))
if(!check_rights(R_MOD))
return

var/mob/living/L = locate(href_list["revive"])
Expand Down Expand Up @@ -1926,6 +1926,42 @@
log_game("[key_name_admin(usr)] has granted self-destruct, requested by [key_name_admin(ref_person)]")
message_admins("[key_name_admin(usr)] has granted self-destruct, requested by [key_name_admin(ref_person)]", 1)

if(href_list["nukeapprove"])
var/mob/ref_person = locate(href_list["nukeapprove"])
Ben10083 marked this conversation as resolved.
Show resolved Hide resolved
if(!istype(ref_person))
return FALSE
var/nuketype = "Encrypted Operational Nuke"
var/prompt = tgui_alert(usr, "Do you want the nuke to be Encrypted?", "Nuke Type", list("Encrypted", "Decrypted"), 20 SECONDS)
if(prompt == "Decrypted")
nuketype = "Decrypted Operational Nuke"
prompt = tgui_alert(usr, "Are you sure you want to authorize a [nuketype] to the marines? This will greatly affect the round!", "DEFCON 1", list("No", "Yes"))
if(prompt != "Yes")
return

//make ASRS order for nuke
var/datum/supply_order/new_order = new()
new_order.ordernum = supply_controller.ordernum
supply_controller.ordernum++
new_order.object = supply_controller.supply_packs[nuketype]
new_order.orderedby = ref_person
new_order.approvedby = "USCM High Command"
supply_controller.shoppinglist += new_order

//Can no longer request a nuke
GLOB.ares_link.interface.nuke_available = FALSE

marine_announcement("A nuclear device has been authorized by High Command and will be delivered to requisitions via ASRS.", "NUCLEAR ORDNANCE AUTHORIZED", 'sound/misc/notice2.ogg', logging = ARES_LOG_MAIN)
log_game("[key_name_admin(usr)] has authorized a [nuketype], requested by [key_name_admin(ref_person)]")
message_admins("[key_name_admin(usr)] has authorized a [nuketype], requested by [key_name_admin(ref_person)]")

if(href_list["nukedeny"])
var/mob/ref_person = locate(href_list["nukedeny"])
Ben10083 marked this conversation as resolved.
Show resolved Hide resolved
if(!istype(ref_person))
return FALSE
marine_announcement("Your request for nuclear ordnance deployment has been reviewed and denied by USCM High Command for operational security and colonial preservation reasons. Have a good day.", "NUCLEAR ORDNANCE DENIED", 'sound/misc/notice2.ogg', logging = ARES_LOG_MAIN)
log_game("[key_name_admin(usr)] has denied nuclear ordnance, requested by [key_name_admin(ref_person)]")
message_admins("[key_name_admin(usr)] has dnied nuclear ordnance, requested by [key_name_admin(ref_person)]")

if(href_list["sddeny"]) // CentComm-deny. The self-destruct is denied, without any further conditions
var/mob/ref_person = locate(href_list["sddeny"])
marine_announcement("The self-destruct request has not received a response, ARES is now recalculating statistics.", "Self-Destruct System", logging = ARES_LOG_SECURITY)
Expand Down
3 changes: 2 additions & 1 deletion tgui/packages/tgui/interfaces/AresInterface.js
Original file line number Diff line number Diff line change
Expand Up @@ -1405,7 +1405,8 @@ const Emergency = (props, context) => {
let nuke_reason =
'Request a nuclear device to be authorized by USCM High Command.';
if (!nuke_available) {
nuke_reason = 'No nuclear ordnance is available during this operation.';
nuke_reason =
'No nuclear ordnance is available during this operation, or one has already been provided.';
} else if (mission_failed) {
nuke_reason =
'You have already lost the objective, you cannot use a nuclear device aboard the ship!';
Expand Down