mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-27 07:08:00 +01:00
Dunking handle_atom_del() in the trash bin. (#77339)
Whatever you do, if it warrants the use of something like `handle_atom_del`, chances are `Exited` can do it better, as most of these cases involve movables that shouldn't be moved out of their loc (`Destroy` forcefully moves movables to nullspace) without calling specific procs, and for the remaining few, `handle_atom_del` doesn't even cover the eventuality of a movable being deleted outside the source atom, so it's quite garbage. Beside, I feel confident in saying `handle_atom_del()` is older than the DCS, an echo on the workarounds done at the time.
This commit is contained in:
@@ -47,13 +47,13 @@
|
||||
if(vname in list(NAMEOF(src, open), NAMEOF(src, showpiece), NAMEOF(src, custom_glass_overlay)))
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/displaycase/handle_atom_del(atom/A)
|
||||
if(A == electronics)
|
||||
/obj/structure/displaycase/Exited(atom/movable/gone, direction)
|
||||
. = ..()
|
||||
if(gone == electronics)
|
||||
electronics = null
|
||||
if(A == showpiece)
|
||||
if(gone == showpiece)
|
||||
showpiece = null
|
||||
update_appearance()
|
||||
return ..()
|
||||
|
||||
/obj/structure/displaycase/Destroy()
|
||||
QDEL_NULL(electronics)
|
||||
@@ -73,8 +73,6 @@
|
||||
if(QDELETED(showpiece))
|
||||
return
|
||||
showpiece.forceMove(drop_location())
|
||||
showpiece = null
|
||||
update_appearance()
|
||||
|
||||
/obj/structure/displaycase/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0)
|
||||
switch(damage_type)
|
||||
|
||||
Reference in New Issue
Block a user