From 902931f174865ac90425c084a403928336e2328d Mon Sep 17 00:00:00 2001
From: Beagle <56142455+BeagleGaming1@users.noreply.github.com>
Date: Fri, 13 Oct 2023 22:48:31 -0400
Subject: [PATCH 1/2] hell
---
.../objects/items/handheld_distress_beacon.dm | 75 ++++++++-----------
code/modules/admin/topic/topic.dm | 57 ++++----------
code/modules/gear_presets/cmb.dm | 2 +-
3 files changed, 44 insertions(+), 90 deletions(-)
diff --git a/code/game/objects/items/handheld_distress_beacon.dm b/code/game/objects/items/handheld_distress_beacon.dm
index 699c45c256b2..0f8e5032963c 100644
--- a/code/game/objects/items/handheld_distress_beacon.dm
+++ b/code/game/objects/items/handheld_distress_beacon.dm
@@ -7,6 +7,15 @@
icon_state = "beacon_inactive"
w_class = SIZE_SMALL
+ ///Additional info about the beacon sent to message_admins
+ var/beacon_name = "PMC handheld distress beacon"
+ ///Tells the user who the beacon will be sent to IC
+ var/recipient = "the USCSS Royce"
+ ///The name of the ERT that will be passed to get_specific_call
+ var/list/ert_full_name = list("Weyland-Yutani PMC (Chemical Investigation Squad)")
+ ///The clickable version that will be sent in message_admins
+ var/list/ert_short_name = list("SEND PMCs")
+ ///Whether beacon can be used, or has already been used
var/active = FALSE
/obj/item/handheld_distress_beacon/get_examine_text(mob/user)
@@ -20,8 +29,8 @@
if(active)
icon_state = "beacon_active"
- else
- icon_state = initial(icon_state)
+ return
+ icon_state = initial(icon_state)
/obj/item/handheld_distress_beacon/attack_self(mob/user)
. = ..()
@@ -29,53 +38,29 @@
if(active)
to_chat(user, "[src] is already active!")
return
-
- for(var/client/C in GLOB.admins)
- if((R_ADMIN|R_MOD) & C.admin_holder.rights)
- playsound_client(C,'sound/effects/sos-morse-code.ogg',10)
- message_admins("[key_name(user)] has requested a PMC Distress Beacon! [CC_MARK(user)] (SEND) (DENY) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]")
- to_chat(user, SPAN_NOTICE("A distress beacon request has been sent to the USCSS Royce."))
-
active = TRUE
update_icon()
-/// CMB distress beacon held by CMB Marshal for signalling distress to Anchorpoint Station
-/obj/item/handheld_distress_beacon_CMB
- name = "\improper CMB handheld distress beacon"
- desc = "An emergency beacon. This one is branded with a Colonial Marshal Bureau star and 'ANCHORPOINT STATION' is etched in stencil on the side. This device is issued to CMB Marshals and features an extended relay antenna."
- icon = 'icons/obj/items/handheld_distress_beacon.dmi'
- icon_state = "beacon_inactive"
- w_class = SIZE_SMALL
-
-/// whether or not the beacon is turned on, when activated sends message to admins requesting Anchorpoint ERT and changes sprite
- var/active = FALSE
-
-/obj/item/handheld_distress_beacon_CMB/get_examine_text(mob/user)
- . = ..()
-
- if(active)
- . += "The beacon has been activated!"
-
-/obj/item/handheld_distress_beacon_CMB/update_icon()
- . = ..()
+ if(!ert_full_name || !ert_short_name || (length(ert_full_name) != length(ert_short_name))) //Make sure they are greater than 0, and both are same length
+ to_chat(user, SPAN_BOLDWARNING("[src] is broken!"))
+ CRASH("[src] was improperly set, and has been disabled.") //For the runtime logs
- if(active)
- icon_state = "beacon_active"
- else
- icon_state = initial(icon_state)
+ var/beacon_call_buttons
+ for(var/current_ert_num in 1 to length(ert_full_name))
+ beacon_call_buttons += "([ert_short_name[current_ert_num]]) "
-/obj/item/handheld_distress_beacon_CMB/attack_self(mob/user)
- . = ..()
+ for(var/client/admin_client in GLOB.admins)
+ if((R_ADMIN|R_MOD) & admin_client.admin_holder.rights)
+ playsound_client(admin_client,'sound/effects/sos-morse-code.ogg',10)
+ message_admins("[key_name(user)] has requested a [beacon_name]! [CC_MARK(user)] [beacon_call_buttons](DENY) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]")
+ to_chat(user, SPAN_NOTICE("A distress beacon request has been sent to [recipient]."))
- if(active)
- to_chat(user, "[src] is already active!")
- return
-
- for(var/client/client in GLOB.admins)
- if((R_ADMIN|R_MOD) & client.admin_holder.rights)
- playsound_client(client,'sound/effects/sos-morse-code.ogg',10)
- message_admins("[key_name(user)] has signalled CMB in distress, and requests reinforcements! [CC_MARK(user)] (SEND MARINE QRF) (SEND CMB TEAM) (DENY) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]")
- to_chat(user, SPAN_NOTICE("The CMB distress beacon flashes red, indicating that the device has been activated and is transmitting."))
+/// CMB distress beacon held by CMB Marshal for signalling distress to Anchorpoint Station
+/obj/item/handheld_distress_beacon/cmb
+ name = "\improper CMB handheld distress beacon"
+ desc = "An emergency beacon. This one is branded with a Colonial Marshal Bureau star and 'ANCHORPOINT STATION' is etched in stencil on the side. This device is issued to CMB Marshals and features an extended relay antenna."
- active = TRUE
- update_icon()
+ beacon_name = "CMB handheld distress beacon"
+ recipient = "Anchorpoint Station"
+ ert_full_name = list("CMB - Patrol Team - Marshals in Distress (Friendly)", "CMB - Anchorpoint Station Colonial Marine QRF (Friendly)")
+ ert_short_name = list("SEND CMB", "SEND QRF")
diff --git a/code/modules/admin/topic/topic.dm b/code/modules/admin/topic/topic.dm
index 31f99870fe43..69f58115ce9b 100644
--- a/code/modules/admin/topic/topic.dm
+++ b/code/modules/admin/topic/topic.dm
@@ -1904,32 +1904,18 @@
addtimer(CALLBACK(src, PROC_REF(accept_ert), usr, locate(href_list["distress"])), 10 SECONDS)
//unanswered_distress -= ref_person
- if(href_list["distress_cmb"]) //CMB distress signal, activates Anchorpoint Marine QRF to assist/rescue Colonial Marshals in distress
+ if(href_list["distress_handheld"]) //Prepares to call and logs accepted handheld distress beacons
+ var/mob/ref_person = href_list["distress_handheld"]
+ var/ert_name = href_list["ert_name"]
distress_cancel = FALSE
- message_admins("[key_name_admin(usr)] has opted to SEND the Anchorpoint Station Colonial Marine QRF to assist the CMB! Launching in 10 seconds... (CANCEL)")
- addtimer(CALLBACK(src, PROC_REF(accept_cmb_ert), usr, locate(href_list["distress"])), 10 SECONDS)
+ message_admins("[key_name_admin(usr)] has opted to SEND [ert_name]! Launching in 10 seconds... (CANCEL)")
+ addtimer(CALLBACK(src, PROC_REF(accept_handheld_ert), usr, ref_person, ert_name), 10 SECONDS)
- if(href_list["distress_cmb_alt"]) //CMB distress signal, activates a nearby CMB Patrol Team to assist/rescue Colonial Marshals in distress
- distress_cancel = FALSE
- message_admins("[key_name_admin(usr)] has opted to SEND a nearby CMB Patrol Team to assist the CMB! Launching in 10 seconds... (CANCEL)")
- addtimer(CALLBACK(src, PROC_REF(accept_cmb_alt_ert), usr, locate(href_list["distress"])), 10 SECONDS)
-
- if(href_list["deny_cmb"]) // Anchorpoint-deny. The distress call is denied, citing unavailable forces
- var/mob/ref_person = locate(href_list["deny_cmb"])
- to_chat(ref_person, "A voice barely crackles through the static: CMB Team, this is Anchorpoint Station. No can do, QRF currently dispatched elsewhere, relaying distress. Sorry. Good luck, out.")
- log_game("[key_name_admin(usr)] has denied a distress beacon, requested by [key_name_admin(ref_person)]")
- message_admins("[key_name_admin(usr)] has denied a distress beacon, requested by [key_name_admin(ref_person)]", 1)
-
- if(href_list["distress_pmc"]) //Wey-Yu specific PMC distress signal for chem retrieval ERT
- distress_cancel = FALSE
- message_admins("[key_name_admin(usr)] has opted to SEND the distress beacon! Launching in 10 seconds... (CANCEL)")
- addtimer(CALLBACK(src, PROC_REF(accept_pmc_ert), usr, locate(href_list["distress"])), 10 SECONDS)
-
- if(href_list["ccdeny_pmc"]) // CentComm-deny. The distress call is denied, without any further conditions
- var/mob/ref_person = locate(href_list["ccdeny_pmc"])
+ if(href_list["deny_distress_handheld"]) //Logs denied handheld distress beacons
+ var/mob/ref_person = href_list["deny_distress_handheld"]
to_chat(ref_person, "The distress signal has not received a response.")
log_game("[key_name_admin(usr)] has denied a distress beacon, requested by [key_name_admin(ref_person)]")
- message_admins("[key_name_admin(usr)] has denied a distress beacon, requested by [key_name_admin(ref_person)]", 1)
+ message_admins("[key_name_admin(usr)] has denied a distress beacon, requested by [key_name_admin(ref_person)]")
if(href_list["destroyship"]) //Distress Beacon, sends a random distress beacon when pressed
destroy_cancel = FALSE
@@ -2108,31 +2094,14 @@
log_game("[key_name_admin(approver)] has sent a randomized distress beacon, requested by [key_name_admin(ref_person)]")
message_admins("[key_name_admin(approver)] has sent a randomized distress beacon, requested by [key_name_admin(ref_person)]")
-/// tells admins which admin has sent the Anchorpoint ERT in response to CMB distress
-/datum/admins/proc/accept_cmb_ert(mob/approver, mob/ref_person)
- if(distress_cancel)
- return
- distress_cancel = TRUE
- SSticker.mode.get_specific_call("CMB - Anchorpoint Station Colonial Marine QRF (Friendly)", FALSE, FALSE)
- log_game("[key_name_admin(approver)] has sent an Anchorpoint Station Colonial Marine QRF response, requested by [key_name_admin(ref_person)]")
- message_admins("[key_name_admin(approver)] has sent an Anchorpoint Station Colonial Marine QRF response, requested by [key_name_admin(ref_person)]")
-
-/// tells admins which admin has sent the CMB ERT in response to CMB distress
-/datum/admins/proc/accept_cmb_alt_ert(mob/approver, mob/ref_person)
- if(distress_cancel)
- return
- distress_cancel = TRUE
- SSticker.mode.get_specific_call("CMB - Patrol Team - Marshals in Distress (Friendly)", FALSE, FALSE)
- log_game("[key_name_admin(approver)] has sent a CMB Patrol Team distress response, requested by [key_name_admin(ref_person)]")
- message_admins("[key_name_admin(approver)] has sent a CMB Patrol Team distress response, requested by [key_name_admin(ref_person)]")
-
-/datum/admins/proc/accept_pmc_ert(mob/approver, mob/ref_person)
+///Handles calling the ERT sent by handheld distress beacons
+/datum/admins/proc/accept_handheld_ert(mob/approver, mob/ref_person, ert_called)
if(distress_cancel)
return
distress_cancel = TRUE
- SSticker.mode.get_specific_call("Weyland-Yutani PMC (Chemical Investigation Squad)", TRUE, FALSE, FALSE)
- log_game("[key_name_admin(approver)] has sent a PMC distress beacon, requested by [key_name_admin(ref_person)]")
- message_admins("[key_name_admin(approver)] has sent a PMC distress beacon, requested by [key_name_admin(ref_person)]")
+ SSticker.mode.get_specific_call("[ert_called]", TRUE, FALSE, FALSE)
+ log_game("[key_name_admin(approver)] has sent [ert_called], requested by [key_name_admin(ref_person)]")
+ message_admins("[key_name_admin(approver)] has sent [ert_called], requested by [key_name_admin(ref_person)]")
/datum/admins/proc/generate_job_ban_list(mob/M, datum/entity/player/P, list/roles, department, color = "ccccff")
var/counter = 0
diff --git a/code/modules/gear_presets/cmb.dm b/code/modules/gear_presets/cmb.dm
index 3ce7a6ec281d..756e3f5d9647 100644
--- a/code/modules/gear_presets/cmb.dm
+++ b/code/modules/gear_presets/cmb.dm
@@ -185,7 +185,7 @@
new_human.equip_to_slot_or_del(new /obj/item/storage/backpack/satchel/sec, WEAR_BACK)
new_human.equip_to_slot_or_del(new /obj/item/weapon/gun/pistol/holdout, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/explosive/grenade/high_explosive/m15/rubber, WEAR_IN_BACK)
- new_human.equip_to_slot_or_del(new /obj/item/handheld_distress_beacon_CMB, WEAR_IN_BACK)
+ new_human.equip_to_slot_or_del(new /obj/item/handheld_distress_beacon/cmb, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/radio, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/flashlight, WEAR_IN_BACK)
new_human.equip_to_slot_or_del(new /obj/item/device/camera, WEAR_IN_BACK)
From bc360375048fd89e5713036aa9dcbd54aa32cf9f Mon Sep 17 00:00:00 2001
From: Beagle <56142455+BeagleGaming1@users.noreply.github.com>
Date: Sat, 14 Oct 2023 16:25:27 -0400
Subject: [PATCH 2/2] words
---
code/game/objects/items/handheld_distress_beacon.dm | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/code/game/objects/items/handheld_distress_beacon.dm b/code/game/objects/items/handheld_distress_beacon.dm
index 0f8e5032963c..c11a7a57c350 100644
--- a/code/game/objects/items/handheld_distress_beacon.dm
+++ b/code/game/objects/items/handheld_distress_beacon.dm
@@ -1,14 +1,14 @@
///handheld distress beacons used by goon chem retrieval team to call for PMC back up
/obj/item/handheld_distress_beacon
- name = "handheld distress beacon"
+ name = "\improper PMC handheld distress beacon"
desc = "A standard handheld distress beacon. Generally used by teams who may be out of regular communications range but must signal for assistance. This one is branded with a Weyland Yutani symbol and sold en masse to colonies across the Neroid Sector."
icon = 'icons/obj/items/handheld_distress_beacon.dmi'
icon_state = "beacon_inactive"
w_class = SIZE_SMALL
- ///Additional info about the beacon sent to message_admins
- var/beacon_name = "PMC handheld distress beacon"
+ ///The beacons faction that will be sent in message_admins
+ var/beacon_type = "PMC beacon"
///Tells the user who the beacon will be sent to IC
var/recipient = "the USCSS Royce"
///The name of the ERT that will be passed to get_specific_call
@@ -52,7 +52,7 @@
for(var/client/admin_client in GLOB.admins)
if((R_ADMIN|R_MOD) & admin_client.admin_holder.rights)
playsound_client(admin_client,'sound/effects/sos-morse-code.ogg',10)
- message_admins("[key_name(user)] has requested a [beacon_name]! [CC_MARK(user)] [beacon_call_buttons](DENY) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]")
+ message_admins("[key_name(user)] has used a [beacon_type]! [CC_MARK(user)] [beacon_call_buttons](DENY) [ADMIN_JMP_USER(user)] [CC_REPLY(user)]")
to_chat(user, SPAN_NOTICE("A distress beacon request has been sent to [recipient]."))
/// CMB distress beacon held by CMB Marshal for signalling distress to Anchorpoint Station
@@ -60,7 +60,7 @@
name = "\improper CMB handheld distress beacon"
desc = "An emergency beacon. This one is branded with a Colonial Marshal Bureau star and 'ANCHORPOINT STATION' is etched in stencil on the side. This device is issued to CMB Marshals and features an extended relay antenna."
- beacon_name = "CMB handheld distress beacon"
+ beacon_type = "CMB beacon"
recipient = "Anchorpoint Station"
ert_full_name = list("CMB - Patrol Team - Marshals in Distress (Friendly)", "CMB - Anchorpoint Station Colonial Marine QRF (Friendly)")
ert_short_name = list("SEND CMB", "SEND QRF")