From c8954c72f7008c6e751acb9393686564750b9498 Mon Sep 17 00:00:00 2001 From: AloeNeverDie Date: Mon, 20 Jan 2025 02:11:23 +0300 Subject: [PATCH] deathsquad nuke test passed --- modular_bandastation/objects/_objects.dme | 1 - .../objects/code/machinery/nuclearbomb.dm | 4 ---- modular_bandastation/outfits/code/centcom.dm | 18 ++++++++++++++++-- 3 files changed, 16 insertions(+), 7 deletions(-) delete mode 100644 modular_bandastation/objects/code/machinery/nuclearbomb.dm diff --git a/modular_bandastation/objects/_objects.dme b/modular_bandastation/objects/_objects.dme index d0a8b3a11c776..18878b6106faa 100644 --- a/modular_bandastation/objects/_objects.dme +++ b/modular_bandastation/objects/_objects.dme @@ -51,7 +51,6 @@ #include "code/items/weapons/ranged/energy/awaymission_gun.dm" #include "code/items/weapons/ranged/energy/eg_14.dm" -#include "code/machinery/nuclearbomb.dm" #include "code/machinery/papershredder.dm" #include "code/machinery/photocopier.dm" #include "code/machinery/suit_storage_unit.dm" diff --git a/modular_bandastation/objects/code/machinery/nuclearbomb.dm b/modular_bandastation/objects/code/machinery/nuclearbomb.dm deleted file mode 100644 index 4126890811621..0000000000000 --- a/modular_bandastation/objects/code/machinery/nuclearbomb.dm +++ /dev/null @@ -1,4 +0,0 @@ -// MARK: Nuclear bombs now randomize their code -/obj/machinery/nuclearbomb/Initialize(mapload) - .= ..() - r_code = rand(0, 99999) diff --git a/modular_bandastation/outfits/code/centcom.dm b/modular_bandastation/outfits/code/centcom.dm index 10307951f14b1..dbceb4cb62926 100644 --- a/modular_bandastation/outfits/code/centcom.dm +++ b/modular_bandastation/outfits/code/centcom.dm @@ -149,13 +149,27 @@ // Death Squad +/datum/antagonist/ert/deathsquad/on_gain() // Give deathsquad nuke code when ERT is summoned + . = ..() + var/datum/objective/missionobj = new () + var/nuke_code + var/obj/machinery/nuclearbomb/selfdestruct/nuke = locate() in SSmachines.get_machines_by_type(/obj/machinery/nuclearbomb/selfdestruct) + nuke_code = random_nukecode() + if(nuke.r_code == NUKE_CODE_UNSET) + nuke.r_code = nuke_code + else //Already set by admins/something else? + nuke_code = nuke.r_code + missionobj.owner = owner + missionobj.explanation_text = "Запустите механизм самоуничтожения на [station_name()], коды активации: [nuke.r_code]" + missionobj.completed = TRUE + objectives |= missionobj + /datum/outfit/centcom/death_commando/officer - name = "Death Commando Officer" backpack_contents = list( /obj/item/ammo_box/a357 = 1, /obj/item/flashlight = 1, /obj/item/grenade/c4/x4 = 1, /obj/item/storage/box/flashbangs = 1, /obj/item/storage/medkit/regular = 1, - /obj/item/obj/item/disk/nuclear + /obj/item/disk/nuclear )