Skip to content
This repository has been archived by the owner on Sep 17, 2022. It is now read-only.

Test fix for atoms subsystem #98

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 7 additions & 8 deletions code/controllers/subsystem/atoms.dm
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,14 @@ SUBSYSTEM_DEF(atoms)
var/list/mapload_arg = list(TRUE)
if(atoms)
count = atoms.len
for(var/I in atoms)
var/atom/A = I
if(!(A.flags_1 & INITIALIZED_1))
InitAtom(I, mapload_arg)
for(var/atom/A in atoms)
if(!QDELETED(A) && !(A.flags_1 & INITIALIZED_1))
InitAtom(A, mapload_arg)
CHECK_TICK
else
count = 0
for(var/atom/A in world)
if(!(A.flags_1 & INITIALIZED_1))
if(!QDELETED(A) && !(A.flags_1 & INITIALIZED_1))
InitAtom(A, mapload_arg)
++count
CHECK_TICK
Expand All @@ -50,9 +49,9 @@ SUBSYSTEM_DEF(atoms)
initialized = INITIALIZATION_INNEW_REGULAR

if(late_loaders.len)
for(var/I in late_loaders)
var/atom/A = I
A.LateInitialize()
for(var/atom/A in late_loaders)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for(var/atom/A in late_loaders)
for(var/atom/A as anything in late_loaders)

This is faster and accomplishes the same thing, we already expect atoms to be here

if(!QDELETED(A))
A.LateInitialize()
testing("Late initialized [late_loaders.len] atoms")
late_loaders.Cut()

Expand Down