mirror of
https://github.com/yogstation13/Yogstation.git
synced 2025-02-26 09:04:50 +00:00
can I read? (#15396)
This commit is contained in:
@@ -214,8 +214,7 @@
|
||||
client.screen += hud_used.hide_actions_toggle
|
||||
|
||||
for(var/mob/dead/observer/O in observers) // This is usually always called instead of Grant() or Remove()
|
||||
O.temporaryactions = actions.Copy()
|
||||
O.actions = O.temporaryactions + O.originalactions
|
||||
O.actions = actions + O.originalactions
|
||||
O.update_action_buttons()
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,6 @@
|
||||
button.locked = M.client.prefs.buttons_locked || button.id ? M.client.prefs.action_buttons_screen_locs["[name]_[button.id]"] : FALSE //even if it's not defaultly locked we should remember we locked it before
|
||||
button.moved = button.id ? M.client.prefs.action_buttons_screen_locs["[name]_[button.id]"] : FALSE
|
||||
for(var/mob/dead/observer/O in M.observers)
|
||||
O.temporaryactions += src
|
||||
O?.client.screen += button
|
||||
M.update_action_buttons() // Now push the owners buttons back
|
||||
else
|
||||
@@ -86,7 +85,6 @@
|
||||
if(M.client)
|
||||
M.client.screen -= button
|
||||
for(var/mob/dead/observer/O in M.observers)
|
||||
O.temporaryactions -= src
|
||||
O?.client.screen -= button
|
||||
M.originalactions -= src
|
||||
M.actions -= src
|
||||
|
||||
@@ -57,7 +57,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
||||
var/datum/orbit_menu/orbit_menu
|
||||
var/datum/spawners_menu/spawners_menu
|
||||
var/datum/action/unobserve/UO
|
||||
var/list/temporaryactions = list() // For observers need to keep this referenced
|
||||
|
||||
// Current Viewrange
|
||||
var/view = 0
|
||||
@@ -827,7 +826,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
target.observers -= src
|
||||
UNSETEMPTY(target.observers)
|
||||
observetarget = null
|
||||
actions = temporaryactions
|
||||
actions = originalactions
|
||||
actions -= UO
|
||||
update_action_buttons()
|
||||
|
||||
@@ -859,10 +858,7 @@ This is the proc mobs get to turn into a ghost. Forked from ghostize due to comp
|
||||
if(!UO)
|
||||
UO = new // Convinent way to unobserve
|
||||
UO.Grant(src)
|
||||
originalactions = actions.Copy()
|
||||
if(mob_eye.hud_used)
|
||||
temporaryactions = mob_eye.actions.Copy() // Copy to prevent self referencing
|
||||
actions += temporaryactions
|
||||
LAZYINITLIST(mob_eye.observers)
|
||||
mob_eye.observers |= src
|
||||
mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src)
|
||||
|
||||
Reference in New Issue
Block a user