replaces atom.initialized with ATOM_INITIALIZED

refactors atom/var/flags to atom_flags and area_flags
moves NOBLOODY, NOBLUDGEON, and PHORONGUARD to item_flags instead of atom_flags
corrects various misapplied flags
This commit is contained in:
spookerton
2022-10-18 09:36:36 +01:00
parent 650ee09942
commit 3abdbbaa1c
150 changed files with 414 additions and 431 deletions
+3 -3
View File
@@ -45,14 +45,14 @@ SUBSYSTEM_DEF(atoms)
var/list/arguments
for (var/i = 1 to length(created_atoms))
created = created_atoms[i]
if (!created.initialized)
if (!(created.atom_flags & ATOM_INITIALIZED))
arguments = created_atoms[created] ? mapload_arg + created_atoms[created] : mapload_arg
InitAtom(created, arguments)
CHECK_TICK
created_atoms.Cut()
if (!subsystem_initialized)
for (var/atom/atom in world)
if (!atom.initialized)
if (!(atom.atom_flags & ATOM_INITIALIZED))
InitAtom(atom, mapload_arg)
++count
CHECK_TICK
@@ -90,7 +90,7 @@ SUBSYSTEM_DEF(atoms)
bad_init_calls[atom_type] |= DID_NOT_RETURN_HINT
if (!atom)
qdeleted = TRUE
else if (!atom.initialized)
else if (!(atom.atom_flags & ATOM_INITIALIZED))
bad_init_calls[atom_type] |= DID_NOT_SET_INITIALIZED
return qdeleted || QDELING(atom)
+5 -5
View File
@@ -24,7 +24,7 @@ SUBSYSTEM_DEF(overlays)
icon_cache.Cut()
cache_size = 0
for (var/atom/atom)
atom.flags &= ~OVERLAY_QUEUED
atom.atom_flags &= ~OVERLAY_QUEUED
CHECK_TICK
@@ -85,7 +85,7 @@ SUBSYSTEM_DEF(overlays)
result += GetIconAppearance(entry)
else
if (isloc(entry))
if (entry.flags & OVERLAY_QUEUED)
if (entry.atom_flags & OVERLAY_QUEUED)
entry.ImmediateOverlayUpdate()
if (!ispath(entry))
result += entry.appearance
@@ -97,10 +97,10 @@ SUBSYSTEM_DEF(overlays)
/// Enqueues the atom for an overlay update if not already queued
/atom/proc/QueueOverlayUpdate()
if (flags & OVERLAY_QUEUED)
if (atom_flags & OVERLAY_QUEUED)
return
SSoverlays.queue += src
flags |= OVERLAY_QUEUED
atom_flags |= OVERLAY_QUEUED
/// Builds the atom's overlay state from caches
@@ -109,7 +109,7 @@ SUBSYSTEM_DEF(overlays)
if (length(overlays))
overlays.Cut()
return
flags &= ~OVERLAY_QUEUED
atom_flags &= ~OVERLAY_QUEUED
if (length(priority_overlays))
if (length(our_overlays))
overlays = priority_overlays + our_overlays
+1 -1
View File
@@ -28,7 +28,7 @@ SUBSYSTEM_DEF(persistence)
return
var/area/A = get_area(T)
if(!A || (A.flags & AREA_FLAG_IS_NOT_PERSISTENT))
if(!A || (A.atom_flags & AREA_FLAG_IS_NOT_PERSISTENT))
return
// if((!T.z in GLOB.using_map.station_levels) || !initialized)
+2 -2
View File
@@ -73,7 +73,7 @@ SUBSYSTEM_DEF(radiation)
if(source.respect_maint)
var/area/A = T.loc
if(A.flags & RAD_SHIELDED)
if(A.atom_flags & RAD_SHIELDED)
continue // In shielded area
var/dist = get_dist(source.source_turf, T)
@@ -145,4 +145,4 @@ SUBSYSTEM_DEF(radiation)
if(!(power && source))
return
var/turf/epicentre = locate(round(world.maxx / 2), round(world.maxy / 2), source.z)
flat_radiate(epicentre, power, world.maxx, respect_maint)
flat_radiate(epicentre, power, world.maxx, respect_maint)