diff --git a/code/_onclick/hud/action_group.dm b/code/_onclick/hud/action_group.dm index 480e4ba02ca..f4bdc06c8cb 100644 --- a/code/_onclick/hud/action_group.dm +++ b/code/_onclick/hud/action_group.dm @@ -57,7 +57,7 @@ row_offset = clamp(row_offset, 0, total_rows) // You're not allowed to offset so far that we have a row of blank space var/button_number = 0 - for(var/atom/movable/screen/button as anything in actions) + for(var/atom/movable/screen/button in actions) var/postion = ButtonNumberToScreenCoords(button_number) button.screen_loc = postion button_number++ diff --git a/code/datums/action.dm b/code/datums/action.dm index cace288d1b8..9d896b52b21 100644 --- a/code/datums/action.dm +++ b/code/datums/action.dm @@ -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 diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index 40acf701db2..b7e2b584730 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -179,12 +179,7 @@ GLOBAL_DATUM_INIT(welding_sparks, /mutable_appearance, mutable_appearance('icons if(ismob(loc)) var/mob/m = loc m.unEquip(src, 1) - // actions clear themselves from the list on cut - if(islist(actions)) - for(var/datum/action/A as anything in actions) - qdel(A) - if(!isnull(actions)) - actions.Cut() + QDEL_LIST_CONTENTS(actions) master = null return ..()