Skip to content

Commit

Permalink
Transfer on evolve/devolve
Browse files Browse the repository at this point in the history
  • Loading branch information
SabreML committed Feb 22, 2024
1 parent 883d371 commit 0771d64
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions code/modules/mob/living/carbon/xenomorph/Xenomorph.dm
Original file line number Diff line number Diff line change
Expand Up @@ -766,6 +766,11 @@
var/datum/mob_hud/MH = GLOB.huds[MOB_HUD_XENO_INFECTION]
MH.add_hud_to(src, src)

// Transfer any observing players over to the xeno's new body (`target`) on evolve/de-evolve.
/mob/living/carbon/xenomorph/transfer_observers_to(atom/target)
for(var/mob/dead/observer/observer as anything in observers)
observer.clean_observe_target()
observer.do_observe(target)

/mob/living/carbon/xenomorph/check_improved_pointing()
//xeno leaders get a big arrow and less cooldown
Expand Down
4 changes: 2 additions & 2 deletions code/modules/mob/mob_defines.dm
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
I'll make some notes on where certain variable defines should probably go.
Changing this around would probably require a good look-over the pre-existing code.
*/
var/list/observers //The list of people observing this mob.
/// The list of people observing this mob.
var/list/mob/dead/observer/observers
var/zone_selected = "chest"

var/use_me = 1 //Allows all mobs to use the me verb by default, will have to manually specify they cannot
Expand Down Expand Up @@ -429,4 +430,3 @@
return

src.regenerate_icons()

0 comments on commit 0771d64

Please sign in to comment.