Fix atom Initializations not inheriting /New arguments

This commit is contained in:
tigercat2000
2018-06-05 22:35:23 -07:00
parent a90a2176e7
commit 141d8487ca
2 changed files with 13 additions and 11 deletions
+2 -5
View File
@@ -47,12 +47,9 @@
/atom/New(loc, ...)
if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
_preloader.load(src)
. = ..()
attempt_init(...)
// This is distinct from /tg/ because of our space management system
// This is overriden in /atom/movable and the parent isn't called if the SMS wants to deal with it's init
/atom/proc/attempt_init(loc, ...)
. = ..()
var/do_initialize = SSatoms.initialized
if(do_initialize != INITIALIZATION_INSSATOMS)
args[1] = do_initialize == INITIALIZATION_INNEW_MAPLOAD
+11 -6
View File
@@ -24,19 +24,24 @@
var/area/areaMaster
/atom/movable/New()
. = ..()
areaMaster = get_area_master(src)
// This needs to not call parent until the space_manager is either dead or integrated properly with SSmapping
/atom/movable/New(loc, ...)
if(use_preloader && (src.type == _preloader.target_path))//in case the instanciated atom is creating other atoms in New()
_preloader.load(src)
/atom/movable/attempt_init()
areaMaster = get_area_master(src)
if(ticker && ticker.current_state >= GAME_STATE_SETTING_UP)
var/turf/T = get_turf(src)
if(T && space_manager.is_zlevel_dirty(T.z))
space_manager.postpone_init(T.z, src)
return
. = ..()
var/do_initialize = SSatoms.initialized
if(do_initialize != INITIALIZATION_INSSATOMS)
args[1] = do_initialize == INITIALIZATION_INNEW_MAPLOAD
if(SSatoms.InitAtom(src, args))
// we were deleted
return
/atom/movable/Destroy()
if(loc)