From 80388c960e04cbf9e62c8d3cf0b72d04ed759e74 Mon Sep 17 00:00:00 2001 From: Morrow Date: Wed, 25 Oct 2023 21:43:40 -0400 Subject: [PATCH] time to fix conflicts --- code/datums/components/phone.dm | 7 +++-- code/modules/admin/game_master/game_master.dm | 26 ++++--------------- 2 files changed, 10 insertions(+), 23 deletions(-) diff --git a/code/datums/components/phone.dm b/code/datums/components/phone.dm index dbf753b770..f9375e27ae 100644 --- a/code/datums/components/phone.dm +++ b/code/datums/components/phone.dm @@ -475,7 +475,7 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone) /// Virtual phone used for situations where you want to be able to use a phone without a handset /datum/component/phone/virtual /// If it is a virtual phone we need a virtual user - var/mob/virtual_user + var/client/virtual_user /datum/component/phone/virtual/Destroy() virtual_user = null @@ -554,7 +554,10 @@ GLOBAL_LIST_EMPTY_TYPED(phones, /datum/component/phone) if(virtual_user == speaker) name_override = phone_id - virtual_user.hear_radio(message, "says", message_language, part_a = "", part_b = " ", vname = name_override, speaker = speaker, command = 3, no_paygrade = TRUE) + if(!virtual_user.mob) + return + + virtual_user.mob.hear_radio(message, "says", message_language, part_a = "", part_b = " ", vname = name_override, speaker = speaker, command = 3, no_paygrade = TRUE) // TGUI section diff --git a/code/modules/admin/game_master/game_master.dm b/code/modules/admin/game_master/game_master.dm index dbdf2b9ae1..c944f9ee5c 100644 --- a/code/modules/admin/game_master/game_master.dm +++ b/code/modules/admin/game_master/game_master.dm @@ -75,7 +75,7 @@ GLOBAL_LIST_EMPTY(game_master_objectives) /// Communication stuff - //var/datum/component/phone/game_master/game_master_phone + var/atom/game_master_phone /// End Communication stuff @@ -85,12 +85,12 @@ GLOBAL_LIST_EMPTY(game_master_objectives) /datum/game_master/New(client/using_client) . = ..() - if(using_client.mob) - tgui_interact(using_client.mob) + tgui_interact(using_client.mob) current_submenus = list() - //game_master_phone = new() + game_master_phone = new() + game_master_phone.AddComponent(/datum/component/phone/virtual, "Game Master", "white", "Company Command", null, PHONE_DO_NOT_DISTURB_FORCED, list(), list(FACTION_MARINE, FACTION_COLONIST, FACTION_WY), null, using_client) using_client.click_intercept = src @@ -98,7 +98,7 @@ GLOBAL_LIST_EMPTY(game_master_objectives) . = ..() submenu_types = null current_submenus = null - //QDEL_NULL(game_master_phone) + QDEL_NULL(game_master_phone) /datum/game_master/ui_data(mob/user) . = ..() @@ -170,22 +170,6 @@ GLOBAL_LIST_EMPTY(game_master_objectives) current_click_intercept_action = OBJECTIVE_CLICK_INTERCEPT_ACTION return - //Communication Section - //if("use_game_master_phone") - //if(!game_master_phone) - // game_master_phone = new() - - //var/new_phone_id = tgui_input_text(ui.user, "New phone id?", "Phone ID", game_master_phone.phone_id) - //if(!new_phone_id) - // return - - //game_master_phone.phone_id = new_phone_id - - //game_master_phone.tgui_interact(ui.user) - //return - - //if("set_communication_clarity") - /datum/game_master/ui_close(mob/user) . = ..()