Merge pull request #10238 from Ghommie/Ghommie-cit478
Brings in some mapping code updates.
This commit is contained in:
+1
-1
@@ -47,7 +47,7 @@
|
||||
/atom/New(loc, ...)
|
||||
//atom creation method that preloads variables at creation
|
||||
if(GLOB.use_preloader && (src.type == GLOB._preloader.target_path))//in case the instanciated atom is creating other atoms in New()
|
||||
GLOB._preloader.load(src)
|
||||
world.preloader_load(src)
|
||||
|
||||
if(datum_flags & DF_USE_TAG)
|
||||
GenerateTag()
|
||||
|
||||
@@ -180,7 +180,7 @@
|
||||
limit--
|
||||
while(!FoundDoor && limit)
|
||||
if (!FoundDoor)
|
||||
log_world("### MAP WARNING, [src] at [AREACOORD(src)] failed to find a valid airlock to cyclelink with!")
|
||||
log_mapping("[src] at [AREACOORD(src)] failed to find a valid airlock to cyclelink with!")
|
||||
return
|
||||
FoundDoor.cyclelinkedairlock = src
|
||||
cyclelinkedairlock = FoundDoor
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
. = ..()
|
||||
if(preload_cell_type)
|
||||
if(!ispath(preload_cell_type,/obj/item/stock_parts/cell))
|
||||
log_world("### MAP WARNING, [src] at [AREACOORD(src)] had an invalid preload_cell_type: [preload_cell_type].")
|
||||
log_mapping("[src] at [AREACOORD(src)] had an invalid preload_cell_type: [preload_cell_type].")
|
||||
else
|
||||
cell = new preload_cell_type(src)
|
||||
update_icon()
|
||||
|
||||
@@ -10,4 +10,9 @@
|
||||
|
||||
/turf/baseturf_skipover/shuttle
|
||||
name = "Shuttle baseturf skipover"
|
||||
desc = "Acts as the bottom of the shuttle, if this isn't here the shuttle floor is broken through."
|
||||
desc = "Acts as the bottom of the shuttle, if this isn't here the shuttle floor is broken through."
|
||||
|
||||
/turf/baseturf_bottom
|
||||
name = "Z-level baseturf placeholder"
|
||||
desc = "Marker for z-level baseturf, usually resolves to space."
|
||||
baseturfs = /turf/baseturf_bottom
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
// This is a list of turf types we dont want to assign to baseturfs unless through initialization or explicitly
|
||||
GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
/turf/open/space,
|
||||
/turf/baseturf_bottom
|
||||
)))
|
||||
|
||||
/turf/proc/empty(turf_type=/turf/open/space, baseturf_type, list/ignore_typecache, flags)
|
||||
@@ -56,12 +57,20 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
// Creates a new turf
|
||||
// new_baseturfs can be either a single type or list of types, formated the same as baseturfs. see turf.dm
|
||||
/turf/proc/ChangeTurf(path, list/new_baseturfs, flags)
|
||||
if(!path)
|
||||
return
|
||||
if(path == /turf/open/space/basic)
|
||||
// basic doesn't initialize and this will cause issues
|
||||
// no warning though because this can happen naturaly as a result of it being built on top of
|
||||
path = /turf/open/space
|
||||
switch(path)
|
||||
if(null)
|
||||
return
|
||||
if(/turf/baseturf_bottom)
|
||||
path = SSmapping.level_trait(z, ZTRAIT_BASETURF) || /turf/open/space
|
||||
if (!ispath(path))
|
||||
path = text2path(path)
|
||||
if (!ispath(path))
|
||||
warning("Z-level [z] has invalid baseturf '[SSmapping.level_trait(z, ZTRAIT_BASETURF)]'")
|
||||
path = /turf/open/space
|
||||
if(/turf/open/space/basic)
|
||||
// basic doesn't initialize and this will cause issues
|
||||
// no warning though because this can happen naturaly as a result of it being built on top of
|
||||
path = /turf/open/space
|
||||
if(!GLOB.use_preloader && path == type && !(flags & CHANGETURF_FORCEOP)) // Don't no-op if the map loader requires it to be reconstructed
|
||||
return src
|
||||
if(flags & CHANGETURF_SKIP)
|
||||
@@ -214,7 +223,7 @@ GLOBAL_LIST_INIT(blacklisted_automated_baseturfs, typecacheof(list(
|
||||
newT.assemble_baseturfs(initial(fake_turf_type.baseturfs)) // The baseturfs list is created like roundstart
|
||||
if(!length(newT.baseturfs))
|
||||
newT.baseturfs = list(baseturfs)
|
||||
newT.baseturfs -= newT.baseturfs & GLOB.blacklisted_automated_baseturfs
|
||||
newT.baseturfs -= GLOB.blacklisted_automated_baseturfs
|
||||
newT.baseturfs.Insert(1, old_baseturfs) // The old baseturfs are put underneath
|
||||
return newT
|
||||
if(!length(baseturfs))
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
name = "plating"
|
||||
icon_state = "plating"
|
||||
intact = FALSE
|
||||
baseturfs = /turf/open/space
|
||||
baseturfs = /turf/baseturf_bottom
|
||||
footstep = FOOTSTEP_PLATING
|
||||
barefootstep = FOOTSTEP_HARD_BAREFOOT
|
||||
clawfootstep = FOOTSTEP_HARD_CLAW
|
||||
|
||||
@@ -76,11 +76,6 @@
|
||||
for(var/obj/item/stack/ore/O in src)
|
||||
SEND_SIGNAL(W, COMSIG_PARENT_ATTACKBY, O)
|
||||
|
||||
/turf/open/floor/plating/asteroid/singularity_act()
|
||||
if(is_planet_level(z))
|
||||
return ..()
|
||||
ScrapeAway()
|
||||
|
||||
/turf/open/floor/plating/asteroid/ex_act(severity, target)
|
||||
. = SEND_SIGNAL(src, COMSIG_ATOM_EX_ACT, severity, target)
|
||||
contents_explosion(severity, target)
|
||||
@@ -132,6 +127,7 @@
|
||||
|
||||
/turf/open/floor/plating/asteroid/airless
|
||||
initial_gas_mix = AIRLESS_ATMOS
|
||||
baseturfs = /turf/open/floor/plating/asteroid/airless
|
||||
turf_type = /turf/open/floor/plating/asteroid/airless
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
// A list will be created in initialization that figures out the baseturf's baseturf etc.
|
||||
// In the case of a list it is sorted from bottom layer to top.
|
||||
// This shouldn't be modified directly, use the helper procs.
|
||||
var/list/baseturfs = /turf/open/space
|
||||
var/list/baseturfs = /turf/baseturf_bottom
|
||||
|
||||
var/temperature = T20C
|
||||
var/to_be_destroyed = 0 //Used for fire, if a melting temperature was reached, it will be destroyed
|
||||
|
||||
@@ -108,6 +108,7 @@ GLOBAL_VAR(restart_counter)
|
||||
GLOB.world_href_log = "[GLOB.log_directory]/hrefs.log"
|
||||
GLOB.sql_error_log = "[GLOB.log_directory]/sql.log"
|
||||
GLOB.world_qdel_log = "[GLOB.log_directory]/qdel.log"
|
||||
GLOB.world_map_error_log = "[GLOB.log_directory]/map_errors.log"
|
||||
GLOB.world_runtime_log = "[GLOB.log_directory]/runtime.log"
|
||||
GLOB.query_debug_log = "[GLOB.log_directory]/query_debug.log"
|
||||
GLOB.world_job_debug_log = "[GLOB.log_directory]/job_debug.log"
|
||||
|
||||
Reference in New Issue
Block a user