Skip to content

Commit

Permalink
Fix queen deletion handling
Browse files Browse the repository at this point in the history
  • Loading branch information
Drulikar committed Jul 21, 2023
1 parent 45d9631 commit beeedb4
Showing 1 changed file with 1 addition and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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()
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

0 comments on commit beeedb4

Please sign in to comment.