mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-10 18:22:39 +00:00
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.
This commit is contained in:
@@ -86,6 +86,11 @@ datum/controller/game_controller/proc/setup_objects()
|
||||
CHECK_SLEEP_MASTER
|
||||
sleep(1)
|
||||
|
||||
admin_notice("<span class='danger'>Initializing atmos machinery connections.</span>", R_DEBUG)
|
||||
for(var/obj/machinery/atmospherics/machine in machines)
|
||||
machine.atmos_init()
|
||||
CHECK_SLEEP_MASTER
|
||||
|
||||
admin_notice("<span class='danger'>Initializing pipe networks</span>", R_DEBUG)
|
||||
for(var/obj/machinery/atmospherics/machine in machines)
|
||||
machine.build_network()
|
||||
|
||||
Reference in New Issue
Block a user