@@ -42,6 +42,7 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
42
42
// /does the ghost have plant scanner mode on? by default it should be off
43
43
var /plant_analyzer = FALSE
44
44
var /datum /orbit_menu/orbit_menu
45
+ var /mob /living/do_observe_target = null
45
46
46
47
/ mob / dead/ observer/ New( mob / body= null , flags= 1 )
47
48
set_invisibility (GLOB . observer_default_invisibility)
@@ -683,42 +684,42 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
683
684
set_sight (mob_eye. sight)
684
685
685
686
client. clear_screen()
686
- LAZYOR (mob_eye. orbiters , src )
687
+ LAZYOR (mob_eye. inventory_observers , src )
687
688
mob_eye. hud_used. show_hud(mob_eye. hud_used. hud_version, src )
688
689
690
+ do_observe_target = mob_eye
691
+
689
692
for (var /datum /action/act in mob_eye. actions)
690
693
if ( istype(act. button, / atom/movable / screen/ movable/ action_button/ hide_toggle) || \
691
- (act in src . actions))
694
+ (act in src . actions)) // maybe last check is useless
692
695
continue
693
- client. screen += act. button
694
-
695
- // An ingenious way to block access to the button. Yes, it's on the screen, but you can't press it.
696
- // for(var/atom/movable/screen/movable/action_button/button in client.screen)
697
- // button.mosue_opacity = 0
696
+ client. screen |= act. button
697
+ for (var /atom/movable /screen/alert/alert in mob_eye. alerts)
698
+ client. screen |= alert
698
699
699
700
/ mob / dead/ observer/ proc / handle_when_autoobserve_move()
700
701
SIGNAL_HANDLER // COMSIG_ORBITER_ORBIT_STOP
701
702
702
703
reset_perspective (null )
704
+ hud_used. reorganize_alerts()
703
705
cleanup_observe ()
706
+ hud_used. plane_master_controllers[PLANE_MASTERS_GAME ]. remove_filter(" eye_blur" )
704
707
lighting_alpha = client?. prefs. ghost_darkness_level // Remembers ghost lighting pref
705
708
update_sight ()
706
- LAZYREMOVE (orbiting?. orbiters, src )
707
-
709
+ LAZYREMOVE (do_observe_target. inventory_observers, src )
708
710
clear_fullscreens ()
709
-
710
711
if (src ) // If player discconnected
711
712
UnregisterSignal (src , COMSIG_ORBITER_ORBIT_STOP )
712
- if (orbiting != null )
713
- UnregisterSignal (orbiting, COMSIG_MOB_UPDATE_SIGHT )
713
+ UnregisterSignal (do_observe_target, COMSIG_MOB_UPDATE_SIGHT )
714
+ do_observe_target = null
714
715
715
716
/ mob / dead/ observer/ proc / handle_when_autoobserve_sight_updated()
716
717
SIGNAL_HANDLER // COMSIG_MOB_UPDATE_SIGHT
717
718
718
- var / mob / mob_eye = orbiting
719
- sight = mob_eye ? . sight
720
- lighting_alpha = mob_eye ? . lighting_alpha
721
- update_sight ()
719
+ if (orbiting && client)
720
+ sight = do_observe_target . sight
721
+ lighting_alpha = do_observe_target . lighting_alpha
722
+ update_sight ()
722
723
723
724
/ mob / dead/ observer/ verb / toggle_ghostsee()
724
725
set name = " Toggle Ghost Vision"
0 commit comments