From 1866926d4c75f7c436a76e38819d3ef36cbb7e44 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 1 Sep 2023 12:30:52 +0300 Subject: [PATCH 1/5] init --- code/game/jobs/job/marine/squads.dm | 14 ++++++++------ .../mob/living/carbon/xenomorph/XenoProcs.dm | 9 +++++---- 2 files changed, 13 insertions(+), 10 deletions(-) diff --git a/code/game/jobs/job/marine/squads.dm b/code/game/jobs/job/marine/squads.dm index fb85be012d30..444a5f923146 100644 --- a/code/game/jobs/job/marine/squads.dm +++ b/code/game/jobs/job/marine/squads.dm @@ -370,13 +370,15 @@ var/message_colour = chat_color if(only_leader) if(squad_leader) - var/mob/living/carbon/human/SL = squad_leader - if(!SL.stat && SL.client) - SL.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, message_colour) + var/mob/living/carbon/human/squad_leader = squad_leader + if(!squad_leader.stat && squad_leader.client) + playsound_client(squad_leader.client, 'sound/effects/radiostatic.ogg', squad_leader.loc, 25, FALSE) + squad_leader.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, message_colour) else - for(var/mob/living/carbon/human/M in marines_list) - if(!M.stat && M.client) //Only living and connected people in our squad - M.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, message_colour) + for(var/mob/living/carbon/human/marine in marines_list) + if(!marine.stat && marine.client) //Only living and connected people in our squad + playsound_client(marine.client, 'sound/effects/radiostatic.ogg', marine.loc, 25, FALSE) + marine.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, message_colour) /// Displays a message to the squad members in chat /datum/squad/proc/send_message(text = "", plus_name = 0, only_leader = 0) diff --git a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm index 37b0aa037cd1..f18587d08dc5 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm @@ -21,16 +21,17 @@ if(M && istype(M) && !M.stat && M.client && (!hivenumber || M.hivenumber == hivenumber)) //Only living and connected xenos to_chat(M, SPAN_XENODANGER(" [message]")) -//Sends a maptext alert to our currently selected squad. Does not make sound. +//Sends a maptext alert to our currently selected squad. /proc/xeno_maptext(text = "", title_text = "", hivenumber = XENO_HIVE_NORMAL) if(text == "" || !hivenumber) return //Logic if(SSticker.mode && SSticker.mode.xenomorphs.len) //Send to only xenos in our gamemode list. This is faster than scanning all mobs for(var/datum/mind/L in SSticker.mode.xenomorphs) - var/mob/living/carbon/M = L.current - if(M && istype(M) && !M.stat && M.client && M.ally_of_hivenumber(hivenumber)) //Only living and connected xenos - M.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, "#b491c8") + var/mob/living/carbon/mob = L.current + if(mob && istype(mob) && !mob.stat && mob.client && mob.hivenumber == hivenumber) //Only living and connected xenos + playsound_client(mob.client, 'sound/voice/alien_distantroar_3.ogg', mob.loc, 25, FALSE) + mob.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, "#b491c8") /proc/xeno_message_all(message = null, size = 3) xeno_message(message, size) From 3c6c88943d73ce7dcd0ba4a46cbbbcbef21f079b Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 1 Sep 2023 12:34:47 +0300 Subject: [PATCH 2/5] meh --- code/game/jobs/job/marine/squads.dm | 1 - 1 file changed, 1 deletion(-) diff --git a/code/game/jobs/job/marine/squads.dm b/code/game/jobs/job/marine/squads.dm index 444a5f923146..116de402104d 100644 --- a/code/game/jobs/job/marine/squads.dm +++ b/code/game/jobs/job/marine/squads.dm @@ -370,7 +370,6 @@ var/message_colour = chat_color if(only_leader) if(squad_leader) - var/mob/living/carbon/human/squad_leader = squad_leader if(!squad_leader.stat && squad_leader.client) playsound_client(squad_leader.client, 'sound/effects/radiostatic.ogg', squad_leader.loc, 25, FALSE) squad_leader.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, message_colour) From e6aa8d36263388eab474c9642fb12873a2a24858 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 1 Sep 2023 12:42:11 +0300 Subject: [PATCH 3/5] oof --- .../modules/mob/living/carbon/xenomorph/XenoProcs.dm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm index f18587d08dc5..7164721c1f85 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm @@ -21,17 +21,17 @@ if(M && istype(M) && !M.stat && M.client && (!hivenumber || M.hivenumber == hivenumber)) //Only living and connected xenos to_chat(M, SPAN_XENODANGER(" [message]")) -//Sends a maptext alert to our currently selected squad. +//Sends a maptext alert to xenos. /proc/xeno_maptext(text = "", title_text = "", hivenumber = XENO_HIVE_NORMAL) if(text == "" || !hivenumber) return //Logic if(SSticker.mode && SSticker.mode.xenomorphs.len) //Send to only xenos in our gamemode list. This is faster than scanning all mobs - for(var/datum/mind/L in SSticker.mode.xenomorphs) - var/mob/living/carbon/mob = L.current - if(mob && istype(mob) && !mob.stat && mob.client && mob.hivenumber == hivenumber) //Only living and connected xenos - playsound_client(mob.client, 'sound/voice/alien_distantroar_3.ogg', mob.loc, 25, FALSE) - mob.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, "#b491c8") + for(var/datum/mind/living in SSticker.mode.xenomorphs) + var/mob/living/carbon/xeno = living.current + if(xeno && istype(xeno) && !xeno.stat && xeno.client && xeno.hivenumber == hivenumber) //Only living and connected xenos + playsound_client(xeno.client, 'sound/voice/alien_distantroar_3.ogg', xeno.loc, 25, FALSE) + xeno.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, "#b491c8") /proc/xeno_message_all(message = null, size = 3) xeno_message(message, size) From 9cbb03b724edb55f1e9ac0c9c0bd8bea9284d140 Mon Sep 17 00:00:00 2001 From: ihatethisengine Date: Fri, 1 Sep 2023 18:15:01 +0300 Subject: [PATCH 4/5] make sure it's xeno? --- code/modules/mob/living/carbon/xenomorph/XenoProcs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm index 7164721c1f85..e5f2a6baa3ef 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm @@ -28,7 +28,7 @@ if(SSticker.mode && SSticker.mode.xenomorphs.len) //Send to only xenos in our gamemode list. This is faster than scanning all mobs for(var/datum/mind/living in SSticker.mode.xenomorphs) - var/mob/living/carbon/xeno = living.current + var/mob/living/carbon/xenomorph/xeno = living.current if(xeno && istype(xeno) && !xeno.stat && xeno.client && xeno.hivenumber == hivenumber) //Only living and connected xenos playsound_client(xeno.client, 'sound/voice/alien_distantroar_3.ogg', xeno.loc, 25, FALSE) xeno.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, "#b491c8") From eb04aba5c8bf77b2b01d24769cb4d074d64e46b8 Mon Sep 17 00:00:00 2001 From: ihatethisengine <115417687+ihatethisengine@users.noreply.github.com> Date: Sat, 2 Sep 2023 11:26:06 +0300 Subject: [PATCH 5/5] Update code/modules/mob/living/carbon/xenomorph/XenoProcs.dm Co-authored-by: Drathek <76988376+Drulikar@users.noreply.github.com> --- code/modules/mob/living/carbon/xenomorph/XenoProcs.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm index e5f2a6baa3ef..fa9036bd8305 100644 --- a/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm +++ b/code/modules/mob/living/carbon/xenomorph/XenoProcs.dm @@ -29,7 +29,7 @@ if(SSticker.mode && SSticker.mode.xenomorphs.len) //Send to only xenos in our gamemode list. This is faster than scanning all mobs for(var/datum/mind/living in SSticker.mode.xenomorphs) var/mob/living/carbon/xenomorph/xeno = living.current - if(xeno && istype(xeno) && !xeno.stat && xeno.client && xeno.hivenumber == hivenumber) //Only living and connected xenos + if(istype(xeno) && !xeno.stat && xeno.client && xeno.hivenumber == hivenumber) //Only living and connected xenos playsound_client(xeno.client, 'sound/voice/alien_distantroar_3.ogg', xeno.loc, 25, FALSE) xeno.play_screen_text("[title_text]
" + text, /atom/movable/screen/text/screen_text/command_order, "#b491c8")