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
|
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()
|
for(var/mob/dead/observer/O in observers) // This is usually always called instead of Grant() or Remove()
|
||||||
O.temporaryactions = actions.Copy()
|
O.actions = actions + O.originalactions
|
||||||
O.actions = O.temporaryactions + O.originalactions
|
|
||||||
O.update_action_buttons()
|
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.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
|
button.moved = button.id ? M.client.prefs.action_buttons_screen_locs["[name]_[button.id]"] : FALSE
|
||||||
for(var/mob/dead/observer/O in M.observers)
|
for(var/mob/dead/observer/O in M.observers)
|
||||||
O.temporaryactions += src
|
|
||||||
O?.client.screen += button
|
O?.client.screen += button
|
||||||
M.update_action_buttons() // Now push the owners buttons back
|
M.update_action_buttons() // Now push the owners buttons back
|
||||||
else
|
else
|
||||||
@@ -86,7 +85,6 @@
|
|||||||
if(M.client)
|
if(M.client)
|
||||||
M.client.screen -= button
|
M.client.screen -= button
|
||||||
for(var/mob/dead/observer/O in M.observers)
|
for(var/mob/dead/observer/O in M.observers)
|
||||||
O.temporaryactions -= src
|
|
||||||
O?.client.screen -= button
|
O?.client.screen -= button
|
||||||
M.originalactions -= src
|
M.originalactions -= src
|
||||||
M.actions -= src
|
M.actions -= src
|
||||||
|
|||||||
@@ -57,7 +57,6 @@ GLOBAL_VAR_INIT(observer_default_invisibility, INVISIBILITY_OBSERVER)
|
|||||||
var/datum/orbit_menu/orbit_menu
|
var/datum/orbit_menu/orbit_menu
|
||||||
var/datum/spawners_menu/spawners_menu
|
var/datum/spawners_menu/spawners_menu
|
||||||
var/datum/action/unobserve/UO
|
var/datum/action/unobserve/UO
|
||||||
var/list/temporaryactions = list() // For observers need to keep this referenced
|
|
||||||
|
|
||||||
// Current Viewrange
|
// Current Viewrange
|
||||||
var/view = 0
|
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
|
target.observers -= src
|
||||||
UNSETEMPTY(target.observers)
|
UNSETEMPTY(target.observers)
|
||||||
observetarget = null
|
observetarget = null
|
||||||
actions = temporaryactions
|
actions = originalactions
|
||||||
actions -= UO
|
actions -= UO
|
||||||
update_action_buttons()
|
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)
|
if(!UO)
|
||||||
UO = new // Convinent way to unobserve
|
UO = new // Convinent way to unobserve
|
||||||
UO.Grant(src)
|
UO.Grant(src)
|
||||||
originalactions = actions.Copy()
|
|
||||||
if(mob_eye.hud_used)
|
if(mob_eye.hud_used)
|
||||||
temporaryactions = mob_eye.actions.Copy() // Copy to prevent self referencing
|
|
||||||
actions += temporaryactions
|
|
||||||
LAZYINITLIST(mob_eye.observers)
|
LAZYINITLIST(mob_eye.observers)
|
||||||
mob_eye.observers |= src
|
mob_eye.observers |= src
|
||||||
mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src)
|
mob_eye.hud_used.show_hud(mob_eye.hud_used.hud_version, src)
|
||||||
|
|||||||
Reference in New Issue
Block a user