Skip to content

Commit

Permalink
[MIRROR] Removes machine deconstruct overrides that overrides their d…
Browse files Browse the repository at this point in the history
…eletion [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 <[email protected]>
  • Loading branch information
2 people authored and FFMirrorBot committed Nov 13, 2023
1 parent e10ce03 commit 584cb6c
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 11 deletions.
4 changes: 1 addition & 3 deletions code/game/machinery/PDApainter.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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.
*
Expand Down
6 changes: 1 addition & 5 deletions code/game/machinery/shieldgen.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(.)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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 ..()

0 comments on commit 584cb6c

Please sign in to comment.