From 584cb6c4d06d54b4c7ac42c3e4affc108c212650 Mon Sep 17 00:00:00 2001 From: SkyratBot <59378654+SkyratBot@users.noreply.github.com> Date: Mon, 13 Nov 2023 12:27:31 +0100 Subject: [PATCH] [MIRROR] Removes machine deconstruct overrides that overrides their deletion [MDB IGNORE] (#24965) * Removes machine deconstruct overrides that overrides their deletion (#79662) ## About The Pull Request Both the PDA painter and the emergency shield generator override the behaviour of deleting themselves when they are supposed to be destroyed, instead redirecting to `atom_break` for some reason. This seems to be very old behaviour and it does not fit with what `take_damage` expects (it does not allow for damage to be taken past 0 integrity, aka it should not *exist* past 0 integrity) ## Why It's Good For The Game Fixes #68263 Annoying runtimes and annoying behaviour, especially during a delamination. ## Changelog :cl: fix: The PDA painter and the emergency shield generator can now be destroyed. /:cl: * Removes machine deconstruct overrides that overrides their deletion --------- Co-authored-by: distributivgesetz --- code/game/machinery/PDApainter.dm | 4 +--- code/game/machinery/shieldgen.dm | 6 +----- .../lewd_items/code/lewd_structures/shibari_stand.dm | 4 +++- .../modules/primitive_structures/code/storage_structures.dm | 4 ++-- 4 files changed, 7 insertions(+), 11 deletions(-) diff --git a/code/game/machinery/PDApainter.dm b/code/game/machinery/PDApainter.dm index c9680744fcb..90cafd9180a 100644 --- a/code/game/machinery/PDApainter.dm +++ b/code/game/machinery/PDApainter.dm @@ -7,6 +7,7 @@ base_icon_state = "pdapainter" density = TRUE max_integrity = 200 + integrity_failure = 0.5 /// Current ID card inserted into the machine. var/obj/item/card/id/stored_id_card = null /// Current PDA inserted into the machine. @@ -160,9 +161,6 @@ eject_id_card(user) return SECONDARY_ATTACK_CANCEL_ATTACK_CHAIN -/obj/machinery/pdapainter/deconstruct(disassembled = TRUE) - atom_break() - /** * Insert a PDA into the machine. * diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm index ad6adae767c..458faba35f4 100644 --- a/code/game/machinery/shieldgen.dm +++ b/code/game/machinery/shieldgen.dm @@ -3,6 +3,7 @@ desc = "An energy shield used to contain hull breaches." icon = 'icons/effects/effects.dmi' icon_state = "shield-old" + integrity_failure = 0.5 density = TRUE move_resist = INFINITY opacity = FALSE @@ -183,11 +184,6 @@ if(deployed_shields.len && SPT_PROB(2.5, seconds_per_tick)) qdel(pick(deployed_shields)) - -/obj/machinery/shieldgen/deconstruct(disassembled = TRUE) - atom_break() - locked = pick(0,1) - /obj/machinery/shieldgen/interact(mob/user) . = ..() if(.) diff --git a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/shibari_stand.dm b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/shibari_stand.dm index 7e3225ca55f..de489207305 100644 --- a/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/shibari_stand.dm +++ b/modular_skyrat/modules/modular_items/lewd_items/code/lewd_structures/shibari_stand.dm @@ -124,8 +124,10 @@ return FALSE /obj/structure/chair/shibari_stand/deconstruct(disassembled) + if(flags_1 & NODECONSTRUCT_1) + return + qdel(src) - return TRUE /obj/structure/chair/shibari_stand/proc/add_rope_overlays(color, taur) cut_overlay(shibari_rope_overlay) diff --git a/modular_skyrat/modules/primitive_structures/code/storage_structures.dm b/modular_skyrat/modules/primitive_structures/code/storage_structures.dm index aed8175c94b..7422ea25e8c 100644 --- a/modular_skyrat/modules/primitive_structures/code/storage_structures.dm +++ b/modular_skyrat/modules/primitive_structures/code/storage_structures.dm @@ -26,7 +26,7 @@ /obj/structure/rack/wooden/deconstruct(disassembled = TRUE) new /obj/item/stack/sheet/mineral/wood(drop_location(), 2) - . = ..() + return ..() // Barrel but it works like a crate @@ -49,4 +49,4 @@ /obj/structure/closet/crate/wooden/storage_barrel/deconstruct(disassembled = TRUE) new /obj/item/stack/sheet/mineral/wood(drop_location(), 4) - . = ..() + return ..()