mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-14 09:35:30 +01:00
[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:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user