From b9923de4e49860b141776386c1772619eaac14c0 Mon Sep 17 00:00:00 2001 From: keronshb Date: Fri, 15 Oct 2021 14:24:00 -0400 Subject: [PATCH] Disables the Antag UI panel for non families --- code/modules/antagonists/_common/antag_datum.dm | 14 +++++++++----- code/modules/antagonists/gang/gang.dm | 1 + 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/code/modules/antagonists/_common/antag_datum.dm b/code/modules/antagonists/_common/antag_datum.dm index dc5ef55248..126c6ab33f 100644 --- a/code/modules/antagonists/_common/antag_datum.dm +++ b/code/modules/antagonists/_common/antag_datum.dm @@ -39,6 +39,8 @@ GLOBAL_LIST_EMPTY(antagonists) var/ui_name = "AntagInfoGeneric" ///button to access antag interface var/datum/action/antag_info/info_button + //temporarily disable it for all antagonists other than families + var/ui_enable /datum/antagonist/New() GLOB.antagonists += src @@ -118,14 +120,16 @@ GLOBAL_LIST_EMPTY(antagonists) if(!(owner?.current)) return if(ui_name)//in the future, this should entirely replace greet. - info_button = new(owner.current, src) - info_button.Grant(owner.current) + if(ui_enable == TRUE) + info_button = new(owner.current, src) + info_button.Grant(owner.current) if(!silent) greet() if(ui_name) - to_chat(owner.current, span_big("You are \a [src].")) - to_chat(owner.current, span_boldnotice("For more info, read the panel. you can always come back to it using the button in the top left.")) - info_button.Trigger() + if(ui_enable == TRUE) + to_chat(owner.current, span_big("You are \a [src].")) + to_chat(owner.current, span_boldnotice("For more info, read the panel. you can always come back to it using the button in the top left.")) + info_button.Trigger() apply_innate_effects() give_antag_moodies() remove_blacklisted_quirks() diff --git a/code/modules/antagonists/gang/gang.dm b/code/modules/antagonists/gang/gang.dm index ea81c8b1af..bac064f980 100644 --- a/code/modules/antagonists/gang/gang.dm +++ b/code/modules/antagonists/gang/gang.dm @@ -1,6 +1,7 @@ /datum/antagonist/gang name = "Family Member" roundend_category = "gangsters" + ui_enable = TRUE ui_name = "AntagInfoGangmember" antag_hud_type = ANTAG_HUD_GANGSTER antag_hud_name = "hud_gangster"