Open GermanHydrogen opened 1 year ago
Perhaps we should add some logic that guarantees that all power producing devices are turned on before power consuming devices are turned on.
Also we should check that the devices are turned on after all Eden Editor power connections are established.
At this point an init diagram could be useful, to keep track of what happens when on startup (Init Devices, Add Connections, Turn on Generators, Turn on Consumers)
My simple setup was a generator, a quad lamp and a power connection defined in Eden Editor. The sound played, but the generator was off. If the connection was not present on start, the generator was on. The lamp was always off.
The previously described bug appeared in singleplayer. In hosted multiplayer it worked and also the lamp was on.
Despite that we should be able to guarantee the order of execution.
If the lamp is created in Editor before the generator, the lamp will be turned on before the generator is turned on. At this moment there is no power source and the lamp stays off.
Added an eden attribute to power devices to power them on, on mission start.