Files
Bubberstation/code/game/objects
SkyratBot cc1d3acc95 [MIRROR] Fix runtime with RPD unwrenching. (#1606)
* Fix runtime with RPD unwrenching. (#54773)

[01:44:12] Runtime in RPD.dm, line 392: Cannot read 1.type

/obj/machinery/atmospherics/wrench_act can return a boolean instead of an object under the following scenarios:
You cannot unwrench the machine.
You can unwrench the machine, but use_tool later returns FALSE instead of TRUE.

use_tool can fail when you stack wrench_acts ontop of eachother. The first wrench_act will work as expected and return the deconstructed version of the pipe, all other stacked wrench_acts will have use_tool fail and will instead just return TRUE.

This PR prevents stacking of wrench_act-based do_afters and guards against unexpected runtimes by CRASHing when wrench_act returns something unexpected.

* Fix runtime with RPD unwrenching.

Co-authored-by: Timberpoes <silent_insomnia_pp@hotmail.co.uk>
2020-11-07 15:42:27 +00:00
..