mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-07-13 08:03:43 +01:00
Removes code treating actions as a lazy list (#24971)
* this doesn't need to be lazy * fix some small things
This commit is contained in:
@@ -54,7 +54,7 @@
|
||||
continue
|
||||
HideFrom(hud.mymob)
|
||||
|
||||
LAZYREMOVE(remove_from?.actions, src) // We aren't always properly inserted into the viewers list, gotta make sure that action's cleared
|
||||
remove_from?.actions -= src // We aren't always properly inserted into the viewers list, gotta make sure that action's cleared
|
||||
viewers = list()
|
||||
// owner = null
|
||||
|
||||
@@ -142,7 +142,7 @@
|
||||
var/datum/hud/our_hud = viewer.hud_used
|
||||
if(viewers[our_hud]) // Already have a copy of us? go away
|
||||
return
|
||||
LAZYOR(viewer.actions, src) // Move this in
|
||||
viewer.actions |= src // Move this in
|
||||
ShowTo(viewer)
|
||||
|
||||
//Adds our action button to the screen of a player
|
||||
@@ -168,7 +168,7 @@
|
||||
/datum/action/proc/HideFrom(mob/viewer)
|
||||
var/datum/hud/our_hud = viewer.hud_used
|
||||
var/atom/movable/screen/movable/action_button/button = viewers[our_hud]
|
||||
LAZYREMOVE(viewer.actions, src)
|
||||
viewer.actions -= src
|
||||
if(button)
|
||||
button.clean_up_keybinds(viewer)
|
||||
qdel(button)
|
||||
@@ -193,7 +193,7 @@
|
||||
if(action == src) // This could be us, which is dumb
|
||||
continue
|
||||
var/atom/movable/screen/movable/action_button/button = action.viewers[owner.hud_used]
|
||||
if(action.name == name && button.id)
|
||||
if(action.name == name && button?.id)
|
||||
bitfield |= button.id
|
||||
|
||||
bitfield = ~bitfield // Flip our possible ids, so we can check if we've found a unique one
|
||||
|
||||
Reference in New Issue
Block a user