mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-28 22:48:38 +01:00
Implement SSatoms
* Moves proc/initialize() from being on /atom/movable, /are and /turf/simulated to being on /atom - Now turfs can initialize too * Added the SSatoms subsystem which controls initialization of atoms at roundstart and during normal conditions. * Disabled the old auto_init = 0 behavior, ALL atoms should get initialized() called on them now. * Refactored the way initialize() is called during /New() to utilize SSatoms instead of SScreation * Removed SScreation, as it was only a stop-gap until SSatoms could be ported. * Updated the maploader to inform SSatoms when it is loading maps instead of SScreation. * Updated the template map loader to use SSatoms to perform initTemplateBounds * Renamed 'initialized' var in seed_storage to deconflict. * Removed usage of auto_init = 0, replaced with a no-op initialize() proc for atoms that don't need initialization.
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
use_power = 1
|
||||
idle_power_usage = 100
|
||||
|
||||
var/initialized = 0 // Map-placed ones break if seeds are loaded right at the start of the round, so we do it on the first interaction
|
||||
var/seeds_initialized = 0 // Map-placed ones break if seeds are loaded right at the start of the round, so we do it on the first interaction
|
||||
var/list/datum/seed_pile/piles = list()
|
||||
var/list/starting_seeds = list()
|
||||
var/list/scanner = list() // What properties we can view
|
||||
@@ -135,7 +135,7 @@
|
||||
if (..())
|
||||
return
|
||||
|
||||
if (!initialized)
|
||||
if (!seeds_initialized)
|
||||
for(var/typepath in starting_seeds)
|
||||
var/amount = starting_seeds[typepath]
|
||||
if(isnull(amount)) amount = 1
|
||||
@@ -143,7 +143,7 @@
|
||||
for (var/i = 1 to amount)
|
||||
var/O = new typepath
|
||||
add(O)
|
||||
initialized = 1
|
||||
seeds_initialized = 1
|
||||
|
||||
var/dat = "<center><h1>Seed storage contents</h1></center>"
|
||||
if (piles.len == 0)
|
||||
|
||||
Reference in New Issue
Block a user