Files
VOREStation/code/game/objects/items/weapons/circuitboards/machinery/unary_atmos.dm
T
LeshanaandAnewbe 224fe42e77 Prepare Atmospherics Machinery for SSatoms (#4501)
* to_chat() replacement.

* Revert calling target.init_dir() before connecting.

* This change was added in https://github.com/PolarisSS13/Polaris/pull/3775 to counteract `dir` not being set prior to New() for dynamically loaded maps.  The root cause was /atom/New() not calling _preloader.load().  Undoing the change now that /atom/New() is fixed.
* The addition of the init_dir() proc itself however, is useful, because there ARE other times some atmos machinery will want to re-initialize its dir, specifically whenever it is rotated.
* init_dir() must be called in the constructor of all atmospherics machines capable of connecting to another.   Since it has to happen for ALL machines, lets move that call to /obj/machinery/atmospherics/New()

* Rename /obj/machinery/atmospherics initialize() to atmos_init()

* These days `initialize()` is used to handle general object initialization that is moved outside of New().  The node connection discovery of atmos machinery needs to happen after all that, and so needs to be in a separate proc.
* Make sure to actually call atmos_init during system startup.
2018-01-06 10:52:56 -06:00

34 lines
1.2 KiB
Plaintext

#ifndef T_BOARD
#error T_BOARD macro is not defined but we need it!
#endif
/obj/item/weapon/circuitboard/unary_atmos
board_type = new /datum/frame/frame_types/machine
/obj/item/weapon/circuitboard/unary_atmos/construct(var/obj/machinery/atmospherics/unary/U)
//TODO: Move this stuff into the relevant constructor when pipe/construction.dm is cleaned up.
U.atmos_init()
U.build_network()
if (U.node)
U.node.atmos_init()
U.node.build_network()
/obj/item/weapon/circuitboard/unary_atmos/heater
name = T_BOARD("gas heating system")
build_path = /obj/machinery/atmospherics/unary/heater
origin_tech = list(TECH_POWER = 2, TECH_ENGINEERING = 1)
req_components = list(
/obj/item/stack/cable_coil = 5,
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/capacitor = 2)
/obj/item/weapon/circuitboard/unary_atmos/cooler
name = T_BOARD("gas cooling system")
build_path = /obj/machinery/atmospherics/unary/freezer
origin_tech = list(TECH_MAGNET = 2, TECH_ENGINEERING = 2)
req_components = list(
/obj/item/stack/cable_coil = 2,
/obj/item/weapon/stock_parts/matter_bin = 1,
/obj/item/weapon/stock_parts/capacitor = 2,
/obj/item/weapon/stock_parts/manipulator = 1)