From 8e5ef0267aa4afa981cec2b7fe36a5e2968cbb5a Mon Sep 17 00:00:00 2001 From: Morrow Date: Sun, 22 Oct 2023 19:35:31 -0400 Subject: [PATCH] actual stuff --- code/modules/admin/game_master/game_master.dm | 20 ++++---- code/modules/mob/hear_say.dm | 3 ++ tgui/packages/tgui/interfaces/GameMaster.js | 49 +++++++++---------- 3 files changed, 38 insertions(+), 34 deletions(-) diff --git a/code/modules/admin/game_master/game_master.dm b/code/modules/admin/game_master/game_master.dm index 170fdc12ea..45f3750ff3 100644 --- a/code/modules/admin/game_master/game_master.dm +++ b/code/modules/admin/game_master/game_master.dm @@ -2,6 +2,9 @@ /// Assoc list that holds our custom game master objectives, formatted as atom = objective_string GLOBAL_LIST_EMPTY(game_master_objectives) +/// Percentage of characters end up clear when sent via radio message +GLOBAL_VAR_INIT(radio_communication_clarity, 100) + /proc/open_game_master_panel(client/using_client) set name = "Game Master Panel" set category = "Game Master" @@ -72,12 +75,6 @@ GLOBAL_LIST_EMPTY(game_master_objectives) /// End Objective Stuff - - /// Communication stuff - - - /// End Communication stuff - /// Holds what type of click intercept we are using var/current_click_intercept_action @@ -96,9 +93,6 @@ GLOBAL_LIST_EMPTY(game_master_objectives) submenu_types = null current_submenus = null - if(user_client?.click_intercept == src) - user_client.click_intercept = null - /datum/game_master/ui_data(mob/user) . = ..() @@ -113,6 +107,9 @@ GLOBAL_LIST_EMPTY(game_master_objectives) // Objective stuff data["objective_click_intercept"] = objective_click_intercept + // Communication stuff + data["communication_clarity"] = GLOB.radio_communication_clarity + return data /datum/game_master/ui_static_data(mob/user) @@ -170,6 +167,11 @@ GLOBAL_LIST_EMPTY(game_master_objectives) //Communication Section if("set_communication_clarity") + var/new_clarity = text2num(params["clarity"]) + if(!isnum(new_clarity)) + return + + GLOB.radio_communication_clarity = clamp(new_clarity, 0, 100) /datum/game_master/ui_close(mob/user) . = ..() diff --git a/code/modules/mob/hear_say.dm b/code/modules/mob/hear_say.dm index 19f461be75..8a13617fa7 100644 --- a/code/modules/mob/hear_say.dm +++ b/code/modules/mob/hear_say.dm @@ -90,6 +90,9 @@ else message = stars(message) + if(GLOB.radio_communication_clarity < 100) + message = stars(message, GLOB.radio_communication_clarity) + if(language) style = language.color diff --git a/tgui/packages/tgui/interfaces/GameMaster.js b/tgui/packages/tgui/interfaces/GameMaster.js index 1e8a0bf3e4..815e37dd05 100644 --- a/tgui/packages/tgui/interfaces/GameMaster.js +++ b/tgui/packages/tgui/interfaces/GameMaster.js @@ -77,31 +77,30 @@ export const GameMaster = (props, context) => { - -
- - -
-
+
+ + +