From c9e17ce014f487541db6c3a8194d84168fa64380 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Thu, 13 Jul 2023 12:33:00 -0400 Subject: [PATCH 01/11] Nuclear Spawn Bugfix and use of defines (grammar edit for timers) --- code/game/machinery/nuclearbomb.dm | 3 ++- tgui/packages/tgui/interfaces/NuclearBomb.js | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/code/game/machinery/nuclearbomb.dm b/code/game/machinery/nuclearbomb.dm index 6c0ec4cc0389..743f53e4f03b 100644 --- a/code/game/machinery/nuclearbomb.dm +++ b/code/game/machinery/nuclearbomb.dm @@ -12,7 +12,7 @@ var/bomb_set = FALSE var/timing = FALSE var/deployable = FALSE var/explosion_time = null - var/timeleft = 4800 + var/timeleft = 8 MINUTES var/safety = TRUE var/being_used = FALSE var/end_round = TRUE @@ -152,6 +152,7 @@ var/bomb_set = FALSE data["command_lockout"] = command_lockout data["allowed"] = allowed data["being_used"] = being_used + data["decryption_complete"] = TRUE //this is overriden by techweb nuke UI_data later, this just makes it default to true return data diff --git a/tgui/packages/tgui/interfaces/NuclearBomb.js b/tgui/packages/tgui/interfaces/NuclearBomb.js index b29bc17e0779..e49b958f7857 100644 --- a/tgui/packages/tgui/interfaces/NuclearBomb.js +++ b/tgui/packages/tgui/interfaces/NuclearBomb.js @@ -18,7 +18,7 @@ export const NuclearBomb = (_props, context) => { {data.decryption_complete ? 'Decryption complete.' : `Decryption time left : - ${data.decryption_time} seconds`} + ${data.decryption_time} minutes`} From ea836345ace284b45fe4b673c7cfbdfa9c16d18a Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Thu, 13 Jul 2023 13:05:18 -0400 Subject: [PATCH 02/11] Nuke Event Spawn --- code/modules/admin/tabs/event_tab.dm | 24 ++++++++++++++++++++++++ code/modules/admin/topic/topic_events.dm | 2 ++ 2 files changed, 26 insertions(+) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index febc1550fca0..485607022f07 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -402,6 +402,29 @@ give_jelly_award(last_hive_checked, as_admin=TRUE) +/client/proc/give_nuke() + if(!check_rights(R_ADMIN)) + return + var/nuketype = "Encrypted Operational Nuke" + var/encrypt = tgui_alert(src, "Do you want the nuke to be already decrypted?", "Nuke Type.", list("Encrypted", "Decrypted"), 20 SECONDS) + if(encrypt == "Encrypted") + nuketype = "Decrypted Operational Nuke" + var/prompt = tgui_alert(src, "THIS CAN BE USED TO END THE ROUND. Are you sure you want to spawn a nuke? The nuke will be put onto the ASRS Lift.", "DEFCON 1", list("No", "Yes"), 30 SECONDS) + if(prompt == "No") + return + + var/datum/supply_order/new_order = new /datum/supply_order() + new_order.ordernum = supply_controller.ordernum + supply_controller.ordernum++ + new_order.object = supply_controller.supply_packs[nuketype] + new_order.orderedby = MAIN_AI_SYSTEM + new_order.approvedby = MAIN_AI_SYSTEM + supply_controller.shoppinglist += new_order + + marine_announcement("A nuclear device has been supplied and will be delivered to requisitions via ASRS.", "NUCLEAR ARSENAL ACQUIRED", 'sound/misc/notice2.ogg') + message_admins("[key_name_admin(usr)] admin-spawned a [encrypt] nuke.") + log_game("[key_name_admin(usr)] admin-spawned a [encrypt] nuke.") + /client/proc/turn_everyone_into_primitives() var/random_names = FALSE if (alert(src, "Do you want to give everyone random numbered names?", "Confirmation", "Yes", "No") == "Yes") @@ -685,6 +708,7 @@ Misc
Award a medal
Award a royal jelly
+ Spawn a nuke
Toggle PMC gun restrictions
Turn everyone into monkies

diff --git a/code/modules/admin/topic/topic_events.dm b/code/modules/admin/topic/topic_events.dm index 1055d5e47879..3240bf947938 100644 --- a/code/modules/admin/topic/topic_events.dm +++ b/code/modules/admin/topic/topic_events.dm @@ -22,6 +22,8 @@ owner.award_medal() if("jelly") owner.award_jelly() + if("nuke") + owner.give_nuke() if("pmcguns") owner.toggle_gun_restrictions() if("monkify") From a989803913e4bec246661242aafc460be98c600f Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Thu, 13 Jul 2023 13:05:36 -0400 Subject: [PATCH 03/11] Nuke renamed --- code/datums/supply_packs/operations.dm | 4 ++-- code/modules/cm_tech/techs/marine/tier4/nuke.dm | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/datums/supply_packs/operations.dm b/code/datums/supply_packs/operations.dm index 610503d6c25d..6d5e5d14756c 100644 --- a/code/datums/supply_packs/operations.dm +++ b/code/datums/supply_packs/operations.dm @@ -94,7 +94,7 @@ group = "Operations" /datum/supply_packs/nuclearbomb - name = "Operational Nuke" + name = "Decrypted Operational Nuke" cost = 0 containertype = /obj/structure/machinery/nuclearbomb buyable = 0 @@ -102,7 +102,7 @@ iteration_needed = null /datum/supply_packs/technuclearbomb - name = "Intel Operational Nuke" + name = "Encrypted Operational Nuke" cost = 0 containertype = /obj/structure/machinery/nuclearbomb/tech buyable = 0 diff --git a/code/modules/cm_tech/techs/marine/tier4/nuke.dm b/code/modules/cm_tech/techs/marine/tier4/nuke.dm index eb4e64b59951..c8ecaed145b2 100644 --- a/code/modules/cm_tech/techs/marine/tier4/nuke.dm +++ b/code/modules/cm_tech/techs/marine/tier4/nuke.dm @@ -23,8 +23,9 @@ var/datum/supply_order/new_order = new /datum/supply_order() new_order.ordernum = supply_controller.ordernum supply_controller.ordernum++ - new_order.object = supply_controller.supply_packs["Intel Operational Nuke"] + new_order.object = supply_controller.supply_packs["Encrypted Operational Nuke"] new_order.orderedby = MAIN_AI_SYSTEM + new_order.approvedby = MAIN_AI_SYSTEM supply_controller.shoppinglist += new_order From d27ea0e33ddfa336fc0616bf0b001c50e5f34e53 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Thu, 13 Jul 2023 13:15:15 -0400 Subject: [PATCH 04/11] typo --- code/modules/admin/tabs/event_tab.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index 485607022f07..51b610ed0af9 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -405,10 +405,10 @@ /client/proc/give_nuke() if(!check_rights(R_ADMIN)) return - var/nuketype = "Encrypted Operational Nuke" + var/nuketype = "Decrypted Operational Nuke" var/encrypt = tgui_alert(src, "Do you want the nuke to be already decrypted?", "Nuke Type.", list("Encrypted", "Decrypted"), 20 SECONDS) if(encrypt == "Encrypted") - nuketype = "Decrypted Operational Nuke" + nuketype = "Encrypted Operational Nuke" var/prompt = tgui_alert(src, "THIS CAN BE USED TO END THE ROUND. Are you sure you want to spawn a nuke? The nuke will be put onto the ASRS Lift.", "DEFCON 1", list("No", "Yes"), 30 SECONDS) if(prompt == "No") return From fca1fa92988c827009bd388960f12c352e097c66 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Thu, 13 Jul 2023 13:22:06 -0400 Subject: [PATCH 05/11] Need to finish decryption before nuke safety can be disabled --- code/game/machinery/nuclearbomb.dm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/code/game/machinery/nuclearbomb.dm b/code/game/machinery/nuclearbomb.dm index 743f53e4f03b..1e0c59088153 100644 --- a/code/game/machinery/nuclearbomb.dm +++ b/code/game/machinery/nuclearbomb.dm @@ -221,6 +221,9 @@ var/bomb_set = FALSE if(!A.can_build_special) to_chat(ui.user, SPAN_INFO("You cannot deploy [src] here!")) return + if(!decryption_complete) + to_chat(ui.user, SPAN_INFO("Decyption of nuke must be complete before you can disengage safety!")) + return if(ui.user.action_busy) return ui.user.visible_message(SPAN_WARNING("[ui.user] begins to [safety ? "disable" : "enable"] the safety on [src]!"), SPAN_WARNING("You begin to [safety ? "disable" : "enable"] the safety on [src].")) From d5e924a159411e890d2df0a4305abad05206bfdf Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Thu, 13 Jul 2023 13:25:53 -0400 Subject: [PATCH 06/11] nevermind --- code/game/machinery/nuclearbomb.dm | 3 --- 1 file changed, 3 deletions(-) diff --git a/code/game/machinery/nuclearbomb.dm b/code/game/machinery/nuclearbomb.dm index 1e0c59088153..743f53e4f03b 100644 --- a/code/game/machinery/nuclearbomb.dm +++ b/code/game/machinery/nuclearbomb.dm @@ -221,9 +221,6 @@ var/bomb_set = FALSE if(!A.can_build_special) to_chat(ui.user, SPAN_INFO("You cannot deploy [src] here!")) return - if(!decryption_complete) - to_chat(ui.user, SPAN_INFO("Decyption of nuke must be complete before you can disengage safety!")) - return if(ui.user.action_busy) return ui.user.visible_message(SPAN_WARNING("[ui.user] begins to [safety ? "disable" : "enable"] the safety on [src]!"), SPAN_WARNING("You begin to [safety ? "disable" : "enable"] the safety on [src].")) From 85f2af0c3d95e144445eaa6d10b26e6e070c7e14 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Thu, 13 Jul 2023 13:30:52 -0400 Subject: [PATCH 07/11] Remove period --- code/modules/admin/tabs/event_tab.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index 51b610ed0af9..6623982a6c25 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -406,7 +406,7 @@ if(!check_rights(R_ADMIN)) return var/nuketype = "Decrypted Operational Nuke" - var/encrypt = tgui_alert(src, "Do you want the nuke to be already decrypted?", "Nuke Type.", list("Encrypted", "Decrypted"), 20 SECONDS) + var/encrypt = tgui_alert(src, "Do you want the nuke to be already decrypted?", "Nuke Type", list("Encrypted", "Decrypted"), 20 SECONDS) if(encrypt == "Encrypted") nuketype = "Encrypted Operational Nuke" var/prompt = tgui_alert(src, "THIS CAN BE USED TO END THE ROUND. Are you sure you want to spawn a nuke? The nuke will be put onto the ASRS Lift.", "DEFCON 1", list("No", "Yes"), 30 SECONDS) From d4e96b851b30547b5be31288ecd4862662c32b9e Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:03:02 -0400 Subject: [PATCH 08/11] Update code/modules/admin/tabs/event_tab.dm Co-authored-by: harryob --- code/modules/admin/tabs/event_tab.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index 6623982a6c25..ac93296724f3 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -410,7 +410,7 @@ if(encrypt == "Encrypted") nuketype = "Encrypted Operational Nuke" var/prompt = tgui_alert(src, "THIS CAN BE USED TO END THE ROUND. Are you sure you want to spawn a nuke? The nuke will be put onto the ASRS Lift.", "DEFCON 1", list("No", "Yes"), 30 SECONDS) - if(prompt == "No") + if(prompt != "Yes") return var/datum/supply_order/new_order = new /datum/supply_order() From d17a7183e820ace0c68ea9e23f0f0c0136519ed6 Mon Sep 17 00:00:00 2001 From: Ben <91219575+Ben10083@users.noreply.github.com> Date: Fri, 14 Jul 2023 10:03:24 -0400 Subject: [PATCH 09/11] Update code/modules/admin/tabs/event_tab.dm Co-authored-by: harryob --- code/modules/admin/tabs/event_tab.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/admin/tabs/event_tab.dm b/code/modules/admin/tabs/event_tab.dm index ac93296724f3..e72813e2ac7c 100644 --- a/code/modules/admin/tabs/event_tab.dm +++ b/code/modules/admin/tabs/event_tab.dm @@ -413,7 +413,7 @@ if(prompt != "Yes") return - var/datum/supply_order/new_order = new /datum/supply_order() + var/datum/supply_order/new_order = new() new_order.ordernum = supply_controller.ordernum supply_controller.ordernum++ new_order.object = supply_controller.supply_packs[nuketype] From c82f0091175000a5b70cc150083fdf24f5087450 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Fri, 14 Jul 2023 10:04:40 -0400 Subject: [PATCH 10/11] Followup to suggested change --- code/modules/cm_tech/techs/marine/tier4/nuke.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/cm_tech/techs/marine/tier4/nuke.dm b/code/modules/cm_tech/techs/marine/tier4/nuke.dm index c8ecaed145b2..c54cfff7b2f2 100644 --- a/code/modules/cm_tech/techs/marine/tier4/nuke.dm +++ b/code/modules/cm_tech/techs/marine/tier4/nuke.dm @@ -20,7 +20,7 @@ /datum/tech/nuke/on_unlock() . = ..() - var/datum/supply_order/new_order = new /datum/supply_order() + var/datum/supply_order/new_order = new() new_order.ordernum = supply_controller.ordernum supply_controller.ordernum++ new_order.object = supply_controller.supply_packs["Encrypted Operational Nuke"] From 57546b026aeb1c51038cc50f104e173f5a044a19 Mon Sep 17 00:00:00 2001 From: Ben10083 Date: Sat, 15 Jul 2023 09:05:24 -0400 Subject: [PATCH 11/11] Modification to announcement --- code/modules/cm_tech/techs/marine/tier4/nuke.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/cm_tech/techs/marine/tier4/nuke.dm b/code/modules/cm_tech/techs/marine/tier4/nuke.dm index c54cfff7b2f2..441c9aba69fc 100644 --- a/code/modules/cm_tech/techs/marine/tier4/nuke.dm +++ b/code/modules/cm_tech/techs/marine/tier4/nuke.dm @@ -10,7 +10,7 @@ tier = /datum/tier/four announce_name = "NUCLEAR ARSENAL ACQUIRED" - announce_message = "A nuclear device has been purchased and will be delivered to requisitions via ASRS." + announce_message = "A nuclear device has been authorized and will be delivered to requisitions via ASRS." flags = TREE_FLAG_MARINE