[MIRROR] Dunking handle_atom_del() in the trash bin. [MDB IGNORE] (#23183)

* Dunking handle_atom_del() in the trash bin.

* Update _box_magazine.dm

* Modular paths

---------

Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
Co-authored-by: Giz <13398309+vinylspiders@users.noreply.github.com>
This commit is contained in:
SkyratBot
2023-08-18 18:17:04 +02:00
committed by GitHub
parent da34f6839a
commit d21e06104f
70 changed files with 356 additions and 468 deletions
+5 -9
View File
@@ -46,16 +46,16 @@
if(AI_READY_CORE)
. += span_notice("The monitor's connection can be <b>cut</b>[core_mmi?.brainmob?.mind && !suicide_check() ? " the neural interface can be <b>screwed</b> in." : "."]")
/obj/structure/ai_core/handle_atom_del(atom/A)
if(A == circuit)
/obj/structure/ai_core/Exited(atom/movable/gone, direction)
. = ..()
if(gone == circuit)
circuit = null
if((state != GLASS_CORE) && (state != AI_READY_CORE))
state = EMPTY_CORE
update_appearance()
if(A == core_mmi)
if(gone == core_mmi)
core_mmi = null
return ..()
update_appearance()
/obj/structure/ai_core/Destroy()
QDEL_NULL(circuit)
@@ -200,9 +200,7 @@
P.play_tool_sound(src)
balloon_alert(user, "circuit board removed")
state = EMPTY_CORE
update_appearance()
circuit.forceMove(loc)
circuit = null
return
if(SCREWED_CORE)
if(P.tool_behaviour == TOOL_SCREWDRIVER && circuit)
@@ -298,8 +296,6 @@
P.play_tool_sound(src)
balloon_alert(user, "removed [AI_CORE_BRAIN(core_mmi)]")
core_mmi.forceMove(loc)
core_mmi = null
update_appearance()
return
if(GLASS_CORE)
+4 -6
View File
@@ -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)
+3 -6
View File
@@ -46,8 +46,7 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
/obj/structure/extinguisher_cabinet/Destroy()
if(stored_extinguisher)
qdel(stored_extinguisher)
stored_extinguisher = null
QDEL_NULL(stored_extinguisher)
return ..()
/obj/structure/extinguisher_cabinet/contents_explosion(severity, target)
@@ -62,8 +61,8 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
if(EXPLODE_LIGHT)
SSexplosions.low_mov_atom += stored_extinguisher
/obj/structure/extinguisher_cabinet/handle_atom_del(atom/A)
if(A == stored_extinguisher)
/obj/structure/extinguisher_cabinet/Exited(atom/movable/gone, direction)
if(gone == stored_extinguisher)
stored_extinguisher = null
update_appearance(UPDATE_ICON)
@@ -104,11 +103,9 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/structure/extinguisher_cabinet, 29)
if(stored_extinguisher)
user.put_in_hands(stored_extinguisher)
user.balloon_alert(user, "extinguisher removed")
stored_extinguisher = null
if(!opened)
opened = 1
playsound(loc, 'sound/machines/click.ogg', 15, TRUE, -3)
update_appearance(UPDATE_ICON)
else
toggle_cabinet(user)
+2 -2
View File
@@ -92,7 +92,6 @@
return
if(!user.put_in_hands(weapon))
weapon.forceMove(get_turf(src))
update_appearance()
/**
* check_menu: Checks if we are allowed to interact with a radial menu
@@ -109,7 +108,8 @@
return FALSE
return TRUE
/obj/structure/guncase/handle_atom_del(atom/A)
/obj/structure/guncase/Exited(atom/movable/gone, direction)
. = ..()
update_appearance()
/obj/structure/guncase/contents_explosion(severity, target)
+12 -10
View File
@@ -53,24 +53,26 @@
MA.pixel_x = pixel_x
. += victim
/obj/structure/headpike/handle_atom_del(atom/A)
if(A == victim)
/obj/structure/headpike/Exited(atom/movable/gone, direction)
. = ..()
if(gone != victim && gone != spear)
return
if(gone == victim)
victim = null
if(A == spear)
if(gone == spear)
spear = null
if(!QDELETED(src))
deconstruct(TRUE)
return ..()
/obj/structure/headpike/deconstruct(disassembled)
if(victim) //Make sure the head always comes off
victim.forceMove(drop_location())
victim = null
var/obj/item/bodypart/head/our_head = victim
var/obj/item/spear/our_spear = spear
victim = null
spear = null
our_head?.forceMove(drop_location()) //Make sure the head always comes off
if(!disassembled)
return ..()
if(spear)
spear.forceMove(drop_location())
spear = null
our_spear?.forceMove(drop_location())
return ..()
/obj/structure/headpike/attack_hand(mob/user, list/modifiers)
@@ -44,8 +44,9 @@
/obj/structure/statue/petrified/contents_explosion(severity, target)
return
/obj/structure/statue/petrified/handle_atom_del(atom/A)
if(A == petrified_mob)
/obj/structure/statue/petrified/Exited(atom/movable/gone, direction)
. = ..()
if(gone == petrified_mob)
petrified_mob = null
/obj/structure/statue/petrified/Destroy()
@@ -65,12 +66,11 @@
if(petrified_mob)
petrified_mob.status_flags &= ~GODMODE
petrified_mob.forceMove(loc)
REMOVE_TRAIT(petrified_mob, TRAIT_MUTE, STATUE_MUTE)
REMOVE_TRAIT(petrified_mob, TRAIT_NOBLOOD, MAGIC_TRAIT)
petrified_mob.take_overall_damage((petrified_mob.health - atom_integrity + 100)) //any new damage the statue incurred is transfered to the mob
petrified_mob.faction -= FACTION_MIMIC
petrified_mob = null
petrified_mob.forceMove(loc)
return ..()
/obj/structure/statue/petrified/deconstruct(disassembled = TRUE)
+3 -5
View File
@@ -68,7 +68,6 @@
new /obj/item/stack/rods(Tsec, 2)
if(tank)
tank.forceMove(Tsec)
after_detach_tank()
qdel(src)
/obj/structure/tank_holder/attack_paw(mob/user, list/modifiers)
@@ -83,12 +82,11 @@
add_fingerprint(user)
tank.add_fingerprint(user)
user.put_in_hands(tank)
after_detach_tank()
/obj/structure/tank_holder/handle_atom_del(atom/A)
if(A == tank)
/obj/structure/tank_holder/Exited(atom/movable/gone, direction)
. = ..()
if(gone == tank)
after_detach_tank()
return ..()
/obj/structure/tank_holder/contents_explosion(severity, target)
if(!tank)