mirror of
https://github.com/CHOMPStation2/CHOMPStation2.git
synced 2025-12-11 10:43:20 +00:00
[MIRROR] Fixes lateload map template cable loading (#9851)
Co-authored-by: Cameron Lennox <killer65311@gmail.com> Co-authored-by: Kashargul <144968721+Kashargul@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
c1cd7dc3f0
commit
f19a517d0f
@@ -35,7 +35,7 @@ GLOBAL_LIST_INIT(bitflags, list(1, 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 204
|
|||||||
#define NOREACT (1<<6) // Reagents don't react inside this container.
|
#define NOREACT (1<<6) // Reagents don't react inside this container.
|
||||||
#define OVERLAY_QUEUED (1<<7)// Atom queued to SSoverlay for COMPILE_OVERLAYS
|
#define OVERLAY_QUEUED (1<<7)// Atom queued to SSoverlay for COMPILE_OVERLAYS
|
||||||
#define IS_BUSY (1<<8) // Atom has a TASK_TARGET_EXCLUSIVE do_after with it as the target.
|
#define IS_BUSY (1<<8) // Atom has a TASK_TARGET_EXCLUSIVE do_after with it as the target.
|
||||||
#define ATOM_INITIALIZED (1<<14) // Atom has been initialized. Using a flag instead of a variable saves ~25mb total. //CHOMPEdit
|
#define ATOM_INITIALIZED (1<<23) // Atom has been initialized. Using a flag instead of a variable saves ~25mb total.
|
||||||
|
|
||||||
//Flags for items (equipment) - Used in /obj/item/var/item_flags
|
//Flags for items (equipment) - Used in /obj/item/var/item_flags
|
||||||
#define THICKMATERIAL (1<<0) // Prevents syringes, parapens and hyposprays if equipped to slot_suit or slot_head.
|
#define THICKMATERIAL (1<<0) // Prevents syringes, parapens and hyposprays if equipped to slot_suit or slot_head.
|
||||||
|
|||||||
@@ -114,11 +114,12 @@
|
|||||||
#define AREA_BLOCK_SUIT_SENSORS 0x800 // If suit sensors are blocked in the area.
|
#define AREA_BLOCK_SUIT_SENSORS 0x800 // If suit sensors are blocked in the area.
|
||||||
#define AREA_BLOCK_TRACKING 0x1000 // If camera tracking is blocked in the area.
|
#define AREA_BLOCK_TRACKING 0x1000 // If camera tracking is blocked in the area.
|
||||||
#define AREA_BLOCK_GHOST_SIGHT 0x2000 // If an area blocks sight for ghosts
|
#define AREA_BLOCK_GHOST_SIGHT 0x2000 // If an area blocks sight for ghosts
|
||||||
|
// The 0x800000 is blocked by INITIALIZED, do NOT use it!
|
||||||
|
|
||||||
// CHOMPAdd Start/area
|
// CHOMPAdd Start/area
|
||||||
#define PHASE_SHIELDED 0x200000 // A less rough way to prevent phase shifting without blocking access
|
#define PHASE_SHIELDED 0x100000 // A less rough way to prevent phase shifting without blocking access
|
||||||
#define AREA_LIMIT_DARK_RESPITE 0x400000// Shadekin will die normally in those areas
|
#define AREA_LIMIT_DARK_RESPITE 0x200000// Shadekin will die normally in those areas
|
||||||
#define AREA_ALLOW_CLOCKOUT 0x800000 //The PDA timeclock app can only be used in these areas
|
#define AREA_ALLOW_CLOCKOUT 0x400000 //The PDA timeclock app can only be used in these areas
|
||||||
// CHOMPAdd End
|
// CHOMPAdd End
|
||||||
|
|
||||||
// OnTopic return values
|
// OnTopic return values
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
#define TURF_HAS_CORNERS 128
|
#define TURF_HAS_CORNERS 128
|
||||||
#define TURF_IS_FRAGILE 256
|
#define TURF_IS_FRAGILE 256
|
||||||
#define TURF_ACID_IMMUNE 512
|
#define TURF_ACID_IMMUNE 512
|
||||||
|
// The 0x800000 is blocked by INITIALIZED, do NOT use it!
|
||||||
|
|
||||||
//Used for floor/wall smoothing
|
//Used for floor/wall smoothing
|
||||||
#define SMOOTH_NONE 0 //Smooth only with itself
|
#define SMOOTH_NONE 0 //Smooth only with itself
|
||||||
@@ -36,4 +37,4 @@
|
|||||||
block( \
|
block( \
|
||||||
locate(max(CENTER.x-(H_RADIUS),1), max(CENTER.y-(V_RADIUS),1), CENTER.z), \
|
locate(max(CENTER.x-(H_RADIUS),1), max(CENTER.y-(V_RADIUS),1), CENTER.z), \
|
||||||
locate(min(CENTER.x+(H_RADIUS),world.maxx), min(CENTER.y+(V_RADIUS),world.maxy), CENTER.z) \
|
locate(min(CENTER.x+(H_RADIUS),world.maxx), min(CENTER.y+(V_RADIUS),world.maxy), CENTER.z) \
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ SUBSYSTEM_DEF(atoms)
|
|||||||
created_atoms = list()
|
created_atoms = list()
|
||||||
count = atoms.len
|
count = atoms.len
|
||||||
for(var/atom/A as anything in atoms)
|
for(var/atom/A as anything in atoms)
|
||||||
if(!(A.flags & ATOM_INITIALIZED)) //CHOMPEdit
|
if(!(A.flags & ATOM_INITIALIZED))
|
||||||
if(InitAtom(A, mapload_arg))
|
if(InitAtom(A, mapload_arg))
|
||||||
atoms -= A
|
atoms -= A
|
||||||
CHECK_TICK
|
CHECK_TICK
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
//Detective Work, used for the duplicate data points kept in the scanners
|
//Detective Work, used for the duplicate data points kept in the scanners
|
||||||
var/list/original_atom
|
var/list/original_atom
|
||||||
// Track if we are already had initialize() called to prevent double-initialization.
|
// Track if we are already had initialize() called to prevent double-initialization.
|
||||||
//var/initialized = FALSE CHOMPEdit moved to flag
|
//var/initialized = FALSE // using the atom flags
|
||||||
|
|
||||||
/// Last name used to calculate a color for the chatmessage overlays
|
/// Last name used to calculate a color for the chatmessage overlays
|
||||||
var/chat_color_name
|
var/chat_color_name
|
||||||
@@ -91,9 +91,9 @@
|
|||||||
/atom/proc/Initialize(mapload, ...)
|
/atom/proc/Initialize(mapload, ...)
|
||||||
if(QDELETED(src))
|
if(QDELETED(src))
|
||||||
stack_trace("GC: -- [type] had initialize() called after qdel() --")
|
stack_trace("GC: -- [type] had initialize() called after qdel() --")
|
||||||
if(flags & ATOM_INITIALIZED) //CHOMPEdit moved initialized to flag
|
if(flags & ATOM_INITIALIZED)
|
||||||
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
stack_trace("Warning: [src]([type]) initialized multiple times!")
|
||||||
flags |= ATOM_INITIALIZED //CHOMPEdit moved initialized to flag
|
flags |= ATOM_INITIALIZED
|
||||||
return INITIALIZE_HINT_NORMAL
|
return INITIALIZE_HINT_NORMAL
|
||||||
|
|
||||||
/atom/Destroy()
|
/atom/Destroy()
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
var/list/blend_objects = null // Objects which to blend with //CHOMPEdit default null
|
var/list/blend_objects = null // Objects which to blend with //CHOMPEdit default null
|
||||||
var/list/noblend_objects = null //Objects to avoid blending with (such as children of listed blend objects. //CHOMPEdit default null
|
var/list/noblend_objects = null //Objects to avoid blending with (such as children of listed blend objects. //CHOMPEdit default null
|
||||||
|
|
||||||
/obj/structure/Initialize()
|
/obj/structure/Initialize(mapload)
|
||||||
. = ..()
|
. = ..()
|
||||||
if(climbable)
|
if(climbable)
|
||||||
verbs += /obj/structure/proc/climb_on
|
verbs += /obj/structure/proc/climb_on
|
||||||
|
|||||||
@@ -58,7 +58,7 @@
|
|||||||
activated = 1
|
activated = 1
|
||||||
for(var/obj/effect/wingrille_spawn/other in neighbours)
|
for(var/obj/effect/wingrille_spawn/other in neighbours)
|
||||||
if(!other.activated) other.activate()
|
if(!other.activated) other.activate()
|
||||||
if((flags & ATOM_INITIALIZED) && !QDELETED(src)) //CHOMPEdit
|
if((flags & ATOM_INITIALIZED) && !QDELETED(src))
|
||||||
qdel(src)
|
qdel(src)
|
||||||
|
|
||||||
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
|
/obj/effect/wingrille_spawn/proc/handle_window_spawn(var/obj/structure/window/W)
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ var/list/floor_decals = list()
|
|||||||
// abstract handler that explicitly doesn't invoke any obj behavior.
|
// abstract handler that explicitly doesn't invoke any obj behavior.
|
||||||
/obj/effect/floor_decal/Initialize()
|
/obj/effect/floor_decal/Initialize()
|
||||||
add_to_turf_decals()
|
add_to_turf_decals()
|
||||||
flags |= ATOM_INITIALIZED //CHOMPEdit
|
flags |= ATOM_INITIALIZED
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
// This is a separate proc from initialize() to facilitiate its caching and other stuff. Look into it someday.
|
// This is a separate proc from initialize() to facilitiate its caching and other stuff. Look into it someday.
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
/turf/unsimulated/Initialize(mapload)
|
/turf/unsimulated/Initialize(mapload)
|
||||||
if(skip_init)
|
if(skip_init)
|
||||||
flags |= ATOM_INITIALIZED //CHOMPEdit
|
flags |= ATOM_INITIALIZED
|
||||||
return INITIALIZE_HINT_NORMAL
|
return INITIALIZE_HINT_NORMAL
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
@@ -17,7 +17,6 @@
|
|||||||
icon = 'icons/turf/space.dmi'
|
icon = 'icons/turf/space.dmi'
|
||||||
icon_state = "0"
|
icon_state = "0"
|
||||||
dynamic_lighting = FALSE
|
dynamic_lighting = FALSE
|
||||||
//initialized = FALSE CHOMP Removal (what the fuck)
|
|
||||||
|
|
||||||
/turf/unsimulated/fake_space/Initialize(mapload)
|
/turf/unsimulated/fake_space/Initialize(mapload)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|||||||
@@ -8,7 +8,6 @@
|
|||||||
icon = 'icons/turf/floors.dmi'
|
icon = 'icons/turf/floors.dmi'
|
||||||
icon_state = "sky_slow"
|
icon_state = "sky_slow"
|
||||||
dir = SOUTH
|
dir = SOUTH
|
||||||
//initialized = FALSE CHOMPRemoval
|
|
||||||
var/does_skyfall = TRUE
|
var/does_skyfall = TRUE
|
||||||
var/list/skyfall_levels
|
var/list/skyfall_levels
|
||||||
|
|
||||||
|
|||||||
@@ -15,11 +15,12 @@
|
|||||||
var/discard_prob = 0 // If non-zero, there is a chance that the map seeding algorithm will skip this template when selecting potential templates to use.
|
var/discard_prob = 0 // If non-zero, there is a chance that the map seeding algorithm will skip this template when selecting potential templates to use.
|
||||||
|
|
||||||
/datum/map_template/New(path = null, rename = null)
|
/datum/map_template/New(path = null, rename = null)
|
||||||
|
SHOULD_CALL_PARENT(TRUE)
|
||||||
|
. = ..()
|
||||||
if(path)
|
if(path)
|
||||||
mappath = path
|
mappath = path
|
||||||
if(mappath)
|
if(mappath)
|
||||||
spawn(1)
|
preload_size(mappath)
|
||||||
preload_size(mappath)
|
|
||||||
if(rename)
|
if(rename)
|
||||||
name = rename
|
name = rename
|
||||||
|
|
||||||
@@ -46,7 +47,6 @@
|
|||||||
var/list/turf/turfs = block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
|
var/list/turf/turfs = block(locate(bounds[MAP_MINX], bounds[MAP_MINY], bounds[MAP_MINZ]),
|
||||||
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]))
|
locate(bounds[MAP_MAXX], bounds[MAP_MAXY], bounds[MAP_MAXZ]))
|
||||||
for(var/turf/B as anything in turfs)
|
for(var/turf/B as anything in turfs)
|
||||||
atoms += B
|
|
||||||
areas |= B.loc
|
areas |= B.loc
|
||||||
for(var/A in B)
|
for(var/A in B)
|
||||||
atoms += A
|
atoms += A
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
atoms |= areas
|
atoms |= areas
|
||||||
|
|
||||||
admin_notice(span_danger("Initializing newly created atom(s) in submap."), R_DEBUG)
|
admin_notice(span_danger("Initializing newly created atom(s) in submap."), R_DEBUG)
|
||||||
SSatoms.InitializeAtoms(atoms)
|
SSatoms.InitializeAtoms(areas + turfs + atoms)
|
||||||
|
|
||||||
admin_notice(span_danger("Initializing atmos pipenets and machinery in submap."), R_DEBUG)
|
admin_notice(span_danger("Initializing atmos pipenets and machinery in submap."), R_DEBUG)
|
||||||
SSmachines.setup_atmos_machinery(atmos_machines)
|
SSmachines.setup_atmos_machinery(atmos_machines)
|
||||||
|
|||||||
@@ -97,7 +97,7 @@
|
|||||||
var/new_type = pickweight(sk_types)
|
var/new_type = pickweight(sk_types)
|
||||||
|
|
||||||
new new_type(loc)
|
new new_type(loc)
|
||||||
flags |= ATOM_INITIALIZED //CHOMPEdit
|
flags |= ATOM_INITIALIZED
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
if(icon_state == "map_example")
|
if(icon_state == "map_example")
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
else
|
else
|
||||||
forceMove(locate(1,1,1))
|
forceMove(locate(1,1,1))
|
||||||
//CHOMPEdit End
|
//CHOMPEdit End
|
||||||
flags |= ATOM_INITIALIZED // Explicitly don't use Initialize(). New players join super early and use New() //CHOMPEdit
|
flags |= ATOM_INITIALIZED // Explicitly don't use Initialize(). New players join super early and use New()
|
||||||
|
|
||||||
|
|
||||||
/mob/new_player/Destroy()
|
/mob/new_player/Destroy()
|
||||||
|
|||||||
@@ -89,7 +89,7 @@ var/list/possible_cable_coil_colours = list(
|
|||||||
/obj/structure/cable/white
|
/obj/structure/cable/white
|
||||||
color = COLOR_WHITE
|
color = COLOR_WHITE
|
||||||
|
|
||||||
/obj/structure/cable/Initialize()
|
/obj/structure/cable/Initialize(mapload)
|
||||||
. = ..()
|
. = ..()
|
||||||
|
|
||||||
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
|
// ensure d1 & d2 reflect the icon_state for entering and exiting cable
|
||||||
@@ -158,6 +158,9 @@ var/list/possible_cable_coil_colours = list(
|
|||||||
return 1
|
return 1
|
||||||
|
|
||||||
/obj/structure/cable/update_icon()
|
/obj/structure/cable/update_icon()
|
||||||
|
// We rely on the icon state for the wire Initialize(), prevent any updates to the icon before init passed
|
||||||
|
if(!(flags & ATOM_INITIALIZED))
|
||||||
|
return
|
||||||
icon_state = "[d1]-[d2]"
|
icon_state = "[d1]-[d2]"
|
||||||
alpha = invisibility ? 127 : 255
|
alpha = invisibility ? 127 : 255
|
||||||
|
|
||||||
|
|||||||
@@ -70,7 +70,7 @@
|
|||||||
new /datum/random_map/automata/cave_system/no_cracks(null, 1, 1, Z_LEVEL_BEACH_CAVE, world.maxx, world.maxy)
|
new /datum/random_map/automata/cave_system/no_cracks(null, 1, 1, Z_LEVEL_BEACH_CAVE, world.maxx, world.maxy)
|
||||||
new /datum/random_map/noise/ore/beachmine(null, 1, 1, Z_LEVEL_BEACH_CAVE, 64, 64)*/
|
new /datum/random_map/noise/ore/beachmine(null, 1, 1, Z_LEVEL_BEACH_CAVE, 64, 64)*/
|
||||||
|
|
||||||
initialized = TRUE
|
flags |= ATOM_INITIALIZED
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
// Two mob spawners that are placed on the map that spawn some mobs!
|
// Two mob spawners that are placed on the map that spawn some mobs!
|
||||||
|
|||||||
@@ -45,7 +45,7 @@
|
|||||||
name = "away mission initializer - debrisfield"
|
name = "away mission initializer - debrisfield"
|
||||||
|
|
||||||
/obj/away_mission_init/debrisfield/Initialize()
|
/obj/away_mission_init/debrisfield/Initialize()
|
||||||
initialized = TRUE
|
flags |= ATOM_INITIALIZED
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
|
|
||||||
/area/tether_away/debrisfield
|
/area/tether_away/debrisfield
|
||||||
|
|||||||
@@ -488,7 +488,7 @@
|
|||||||
|
|
||||||
if(!LAZYLEN(mobs_to_pick_from))
|
if(!LAZYLEN(mobs_to_pick_from))
|
||||||
error("Mob spawner at [x],[y],[z] ([get_area(src)]) had no mobs_to_pick_from set on it!")
|
error("Mob spawner at [x],[y],[z] ([get_area(src)]) had no mobs_to_pick_from set on it!")
|
||||||
initialized = TRUE
|
flags |= ATOM_INITIALIZED
|
||||||
return INITIALIZE_HINT_QDEL
|
return INITIALIZE_HINT_QDEL
|
||||||
START_PROCESSING(SSobj, src)
|
START_PROCESSING(SSobj, src)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user