More initialize tweaks (#2971)

changes:

Organs now use Initialize().
The observe message now shows the configured respawn delay instead of always 30 minutes.
Seed datums no longer have a timer in New().
External organs no longer have a timer in New()/Initialize()
Converted some spawns in organs to timers.
Floor init no longer breaks to plating first for mapped in tiles.
Added the INITIALIZE_IMMEDIATE macro to make Initialize() not wait for SSatoms init.
Mannequins now use INITIALIZE_IMMEDIATE instead of a custom-defined New().
Mannequins (from get_mannequin) now delete themselves if unused for 5 minutes or longer.
This commit is contained in:
Lohikar
2017-07-28 04:00:36 -05:00
committed by Erki
parent 92d4ccec5a
commit f8cdcd013c
14 changed files with 254 additions and 222 deletions

View File

@@ -28,6 +28,18 @@
#define TIMER_ID_NULL -1
// -- SSatoms stuff --
// Technically this check will fail if someone loads a map mid-round, but that's not enabled right now.
#define SSATOMS_IS_PROBABLY_DONE (SSatoms.initialized == INITIALIZATION_INNEW_REGULAR)
//type and all subtypes should always call Initialize in New()
#define INITIALIZE_IMMEDIATE(X) ##X/New(loc, ...){\
..();\
if(!initialized) {\
args[1] = TRUE;\
SSatoms.InitAtom(src, args);\
}\
}
// SSatoms Initialization state.
#define INITIALIZATION_INSSATOMS 0 //New should not call Initialize
#define INITIALIZATION_INNEW_MAPLOAD 1 //New should call Initialize(TRUE)