From 4d7e14fc1f4948688ca853d9954e330d06162594 Mon Sep 17 00:00:00 2001 From: Drsmail <60036448+Drsmail@users.noreply.github.com> Date: Sat, 18 Jan 2025 20:54:59 +0300 Subject: [PATCH] [FIX] Fix for a runtime error in deathsquad.dm (#28012) * Admins can change AI laws in Death Squad spawn event * Refactored some text * Adds ERT coms to an ai and cyborgs * Spelling Thanks Christasmurf Co-authored-by: Christasmurf <25437893+Christasmurf@users.noreply.github.com> Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com> * high-importance style text on laws update Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com> * Laws uppdate + sound * Update sound to much much bette one, made by dj-34 * Removed old comment Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com> * Fix cyborg radio and refactor how ai gets his * Fix cyborg radio and refactor how ai gets his * Removed empty lines * spelling Co-authored-by: Mira <42539014+MiraHell@users.noreply.github.com> Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com> --------- Signed-off-by: Drsmail <60036448+Drsmail@users.noreply.github.com> Co-authored-by: Christasmurf <25437893+Christasmurf@users.noreply.github.com> Co-authored-by: Luc <89928798+lewcc@users.noreply.github.com> Co-authored-by: Burzah <116982774+Burzah@users.noreply.github.com> Co-authored-by: Mira <42539014+MiraHell@users.noreply.github.com> --- code/game/objects/items/devices/radio/headset.dm | 5 ----- code/modules/admin/verbs/deathsquad.dm | 8 +++++--- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/code/game/objects/items/devices/radio/headset.dm b/code/game/objects/items/devices/radio/headset.dm index af74b6cb5eb..b446bd2b712 100644 --- a/code/game/objects/items/devices/radio/headset.dm +++ b/code/game/objects/items/devices/radio/headset.dm @@ -519,8 +519,3 @@ keyslot1 = new /obj/item/encryptionkey/syndicate syndiekey = keyslot1 recalculateChannels() - -/obj/item/radio/headset/proc/make_epsilon() // Turns AI's and cyborgs radio to Epsilon radio! - qdel(keyslot1) - keyslot1 = new /obj/item/encryptionkey/centcom - recalculateChannels() diff --git a/code/modules/admin/verbs/deathsquad.dm b/code/modules/admin/verbs/deathsquad.dm index b65274f5f3b..dd526796c25 100644 --- a/code/modules/admin/verbs/deathsquad.dm +++ b/code/modules/admin/verbs/deathsquad.dm @@ -40,15 +40,17 @@ GLOBAL_VAR_INIT(deathsquad_sent, FALSE) SEND_SOUND(AI, notice_sound) AI.show_laws() var/obj/item/radio/headset/heads/ai_integrated/ai_radio = AI.get_radio() - ai_radio.make_epsilon() + ai_radio.channels |= list("Response Team" = 1, "Special Ops" = 1) + ai_radio.config(ai_radio.channels) for(var/mob/living/silicon/robot/R in AI.connected_robots) R.sync() to_chat(R, "Central command has uploaded a new set of laws you must follow. Make sure you follow them.") SEND_SOUND(R, notice_sound) R.show_laws() - var/obj/item/radio/headset/heads/ai_integrated/cyberg_radio = R.get_radio() - cyberg_radio.make_epsilon() + var/obj/item/radio/borg/cyborg_radio = R.get_radio() + cyborg_radio.channels |= list("Response Team" = 1, "Special Ops" = 1) + cyborg_radio.config(cyborg_radio.channels) // Locates commandos spawns var/list/commando_spawn_locations = list()