From 45d9631a2de483f55cc64ce79172334af3308f46 Mon Sep 17 00:00:00 2001 From: Drulikar Date: Thu, 20 Jul 2023 17:05:45 -0700 Subject: [PATCH 1/3] Add ui_status check that is actually relevant to xenos --- code/controllers/subsystem/minimap.dm | 10 ++++++++++ .../mob/living/carbon/xenomorph/xeno_defines.dm | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/code/controllers/subsystem/minimap.dm b/code/controllers/subsystem/minimap.dm index c3b2d36b8177..b154c7673855 100644 --- a/code/controllers/subsystem/minimap.dm +++ b/code/controllers/subsystem/minimap.dm @@ -493,6 +493,16 @@ SUBSYSTEM_DEF(minimaps) else return UI_CLOSE +/datum/tacmap/xeno/ui_status(mob/user) + if(!isxeno(user)) + return UI_CLOSE + + var/mob/living/carbon/xenomorph/xeno = user + if(!xeno.hive?.living_xeno_queen?.ovipositor) + return UI_CLOSE + + return UI_INTERACTIVE + /datum/tacmap_holder var/map_ref var/atom/movable/screen/minimap/map diff --git a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm index 8b25cf07d14b..060c3aea2814 100644 --- a/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm +++ b/code/modules/mob/living/carbon/xenomorph/xeno_defines.dm @@ -352,7 +352,7 @@ /// How many huggers can the hive support var/playable_hugger_limit = 0 - var/datum/tacmap/tacmap + var/datum/tacmap/xeno/tacmap var/minimap_type = MINIMAP_FLAG_XENO /datum/hive_status/New() From beeedb45c234eb2ce3d6ac4b6df84f94950d95f0 Mon Sep 17 00:00:00 2001 From: Drulikar Date: Thu, 20 Jul 2023 17:05:59 -0700 Subject: [PATCH 2/3] Fix queen deletion handling --- .../carbon/xenomorph/abilities/general_abilities.dm | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm index d95fbc304397..bcedf7038c5e 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm @@ -514,12 +514,11 @@ tracked_queen = new_queen - if(!tracked_queen.ovipositor) + if(!tracked_queen?.ovipositor) hide_from(owner) RegisterSignal(tracked_queen, COMSIG_QUEEN_MOUNT_OVIPOSITOR, PROC_REF(handle_mount_ovipositor)) RegisterSignal(tracked_queen, COMSIG_QUEEN_DISMOUNT_OVIPOSITOR, PROC_REF(handle_dismount_ovipositor)) - RegisterSignal(tracked_queen, COMSIG_PARENT_QDELETING, PROC_REF(handle_queen_qdel)) /// deals with the queen mounting the ovipositor, unhiding the action from the user /datum/action/xeno_action/onclick/tacmap/proc/handle_mount_ovipositor() @@ -533,13 +532,6 @@ hide_from(owner) -/// cleans up references to the queen when the queen is being qdel'd, hides the action from the user -/datum/action/xeno_action/onclick/tacmap/proc/handle_queen_qdel() - SIGNAL_HANDLER - - tracked_queen = null - hide_from(owner) - /datum/action/xeno_action/onclick/tacmap/use_ability(atom/target) var/mob/living/carbon/xenomorph/xeno = owner xeno.xeno_tacmap() From 0927b6d8bba43baecde27987f7e09b2810e6da9f Mon Sep 17 00:00:00 2001 From: Drulikar Date: Thu, 20 Jul 2023 21:58:21 -0700 Subject: [PATCH 3/3] Remove extra signal unregister --- .../mob/living/carbon/xenomorph/abilities/general_abilities.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm index bcedf7038c5e..b681179e7ce8 100644 --- a/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm +++ b/code/modules/mob/living/carbon/xenomorph/abilities/general_abilities.dm @@ -510,7 +510,7 @@ SIGNAL_HANDLER if(tracked_queen) - UnregisterSignal(tracked_queen, list(COMSIG_QUEEN_MOUNT_OVIPOSITOR, COMSIG_QUEEN_DISMOUNT_OVIPOSITOR, COMSIG_PARENT_QDELETING)) + UnregisterSignal(tracked_queen, list(COMSIG_QUEEN_MOUNT_OVIPOSITOR, COMSIG_QUEEN_DISMOUNT_OVIPOSITOR)) tracked_queen = new_queen