Refactors how machines are deconstructed (#81291)

## About The Pull Request
This refactors how machines are deconstructed in the following ways

- You can no longer override `obj/machinery/deconstruct()`. If you want
customized behaviour then override `on_deconstruction()` instead.

This comes with the added benifit of no longer needing to check for the
`NO_DECONSTRUCTION` flag because the machine base proc does that for us
& if it finds that flag it won't proceed to call `on_deconstruction()`
meaning no machine will have a chance to spawn anything which is the
current behaviour.

This is required to make #81290 work for all machines at least so that
machine can send the `COMSIG_OBJ_DECONSTRUCT` signal without subtypes
overriding & forgetting to call the parent proc

- `dump_contents()` only gets called when the machine is deconstructed
not destroyed thus not leaving behind any of its contents inside. Fixes
https://github.com/tgstation/tgstation/pull/81290#issuecomment-1925752583

## Changelog
🆑
fix: machines that should not drop contents when deleted no longer do.
refactor: refactors how machines are deconstructed. report bugs on
github.
/🆑

---------

Co-authored-by: MrMelbert <51863163+MrMelbert@users.noreply.github.com>
This commit is contained in:
SyncIt21
2024-02-11 19:22:19 +05:30
committed by GitHub
parent 83c4412340
commit 4495ea2e4d
77 changed files with 255 additions and 350 deletions
+1 -2
View File
@@ -315,11 +315,10 @@ MAPPING_DIRECTIONAL_HELPERS(/obj/machinery/shower, (-16))
reagents.remove_any(SHOWER_SPRAY_VOLUME)
/obj/machinery/shower/deconstruct(disassembled = TRUE)
/obj/machinery/shower/on_deconstruction(disassembled = TRUE)
new /obj/item/stack/sheet/iron(drop_location(), 2)
if(has_water_reclaimer)
new /obj/item/stock_parts/water_recycler(drop_location())
qdel(src)
/obj/machinery/shower/proc/check_heat(mob/living/L)
var/mob/living/carbon/C = L