mirror of
https://github.com/ParadiseSS13/Paradise.git
synced 2026-08-29 23:17:02 +01:00
Fix atom Initializations not inheriting /New arguments
This commit is contained in:
+2
-5
@@ -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
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user