Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Xeno Tacmap Persistence #3957

Merged
merged 3 commits into from
Jul 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions code/controllers/subsystem/minimap.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -510,16 +510,15 @@
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

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()
Expand All @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion code/modules/mob/living/carbon/xenomorph/xeno_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down