From 8566e2396d616d8a87985ed2883018e838f48f79 Mon Sep 17 00:00:00 2001 From: Ghommie <42542238+Ghommie@users.noreply.github.com> Date: Thu, 19 Dec 2019 00:44:14 +0100 Subject: [PATCH 1/3] Brings in some mapping code updates. --- _maps/RandomZLevels/Cabin.dmm | 6 +-- _maps/RandomZLevels/VR/snowdin_VR.dmm | 26 +++++------- _maps/RandomZLevels/caves.dmm | 6 +-- _maps/RandomZLevels/moonoutpost19.dmm | 6 +-- _maps/RandomZLevels/snowdin.dmm | 26 +++++------- _maps/RandomZLevels/spacebattle.dmm | 30 ++++++------- _maps/RandomZLevels/undergroundoutpost45.dmm | 9 ++-- _maps/map_files/Mining/Lavaland.dmm | 42 ++++--------------- code/__DEFINES/maps.dm | 8 ++-- code/__HELPERS/_logging.dm | 2 + code/__HELPERS/level_traits.dm | 3 -- code/_globalvars/logging.dm | 2 + code/controllers/subsystem/air.dm | 2 +- code/game/atoms.dm | 2 +- code/game/machinery/doors/airlock.dm | 2 +- code/game/objects/items/stunbaton.dm | 2 +- .../turfs/simulated/floor/plating/asteroid.dm | 6 +-- code/game/world.dm | 1 + code/modules/admin/verbs/mapping.dm | 19 +++++++++ .../atmospherics/machinery/datum_pipeline.dm | 4 +- code/modules/holodeck/computer.dm | 4 +- code/modules/mapping/map_template.dm | 4 +- code/modules/mapping/mapping_helpers.dm | 28 ++++--------- code/modules/mapping/preloader.dm | 20 ++++++--- code/modules/mapping/reader.dm | 8 ++-- code/modules/recycling/conveyor2.dm | 2 +- 26 files changed, 115 insertions(+), 155 deletions(-) diff --git a/_maps/RandomZLevels/Cabin.dmm b/_maps/RandomZLevels/Cabin.dmm index f4a18fd87c..4d07c02565 100644 --- a/_maps/RandomZLevels/Cabin.dmm +++ b/_maps/RandomZLevels/Cabin.dmm @@ -967,10 +967,6 @@ }, /turf/open/floor/plating, /area/awaymission/cabin) -"dw" = ( -/obj/effect/mapping_helpers/planet_z, -/turf/closed/indestructible/rock/snow, -/area/space) (1,1,1) = {" aa @@ -1227,7 +1223,7 @@ aa aa aa aa -dw +aa "} (2,1,1) = {" aa diff --git a/_maps/RandomZLevels/VR/snowdin_VR.dmm b/_maps/RandomZLevels/VR/snowdin_VR.dmm index 8f6eda450c..bae0b05e3d 100644 --- a/_maps/RandomZLevels/VR/snowdin_VR.dmm +++ b/_maps/RandomZLevels/VR/snowdin_VR.dmm @@ -4,9 +4,15 @@ /turf/closed/indestructible/rock/snow, /area/awaymission/snowdin/cave/mountain) "ab" = ( -/obj/effect/mapping_helpers/planet_z, -/turf/closed/indestructible/rock/snow, -/area/awaymission/snowdin/cave/mountain) +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/mob/living/simple_animal/hostile/netherworld/migo, +/turf/open/floor/plasteel, +/area/awaymission/snowdin/post/mining_dock) "ac" = ( /turf/closed/indestructible/rock/snow, /area/awaymission/snowdin/cave/mountain) @@ -10267,16 +10273,6 @@ /obj/item/shard, /turf/open/floor/plating, /area/awaymission/snowdin/post/mining_dock) -"xA" = ( -/mob/living/simple_animal/hostile/netherworld/migo, -/obj/effect/turf_decal/tile/neutral{ - dir = 1 - }, -/obj/effect/turf_decal/tile/neutral{ - dir = 8 - }, -/turf/open/floor/plasteel, -/area/awaymission/snowdin/post/mining_dock) "xB" = ( /obj/effect/turf_decal/stripes/line{ dir = 4 @@ -16013,7 +16009,7 @@ ac ac "} (2,1,1) = {" -ab +ac ac ac ac @@ -66518,7 +66514,7 @@ wD wT xe xs -xA +ab xI xN wL diff --git a/_maps/RandomZLevels/caves.dmm b/_maps/RandomZLevels/caves.dmm index d50480c381..96c1a08b1f 100644 --- a/_maps/RandomZLevels/caves.dmm +++ b/_maps/RandomZLevels/caves.dmm @@ -2251,10 +2251,6 @@ initial_gas_mix = "n2=23;o2=14" }, /area/awaymission/caves/BMP_asteroid) -"gW" = ( -/obj/effect/mapping_helpers/planet_z, -/turf/closed/indestructible/rock, -/area/space/nearstation) "gX" = ( /obj/effect/baseturf_helper/lava, /turf/closed/mineral/volcanic, @@ -2536,7 +2532,7 @@ aa aa aa aa -gW +aa "} (2,1,1) = {" aa diff --git a/_maps/RandomZLevels/moonoutpost19.dmm b/_maps/RandomZLevels/moonoutpost19.dmm index ddc8778ac1..8c33326703 100644 --- a/_maps/RandomZLevels/moonoutpost19.dmm +++ b/_maps/RandomZLevels/moonoutpost19.dmm @@ -7215,10 +7215,6 @@ heat_capacity = 1e+006 }, /area/awaymission/moonoutpost19/research) -"oV" = ( -/obj/effect/mapping_helpers/planet_z, -/turf/open/space, -/area/space) "vV" = ( /obj/machinery/door/airlock/external, /obj/effect/mapping_helpers/airlock/cyclelink_helper{ @@ -7512,7 +7508,7 @@ aa aa aa aa -oV +aa "} (2,1,1) = {" aa diff --git a/_maps/RandomZLevels/snowdin.dmm b/_maps/RandomZLevels/snowdin.dmm index 525c8fcf7b..57e03061dd 100644 --- a/_maps/RandomZLevels/snowdin.dmm +++ b/_maps/RandomZLevels/snowdin.dmm @@ -4,9 +4,15 @@ /turf/closed/indestructible/rock/snow, /area/awaymission/snowdin/cave/mountain) "ab" = ( -/obj/effect/mapping_helpers/planet_z, -/turf/closed/indestructible/rock/snow, -/area/awaymission/snowdin/cave/mountain) +/obj/effect/turf_decal/tile/neutral{ + dir = 1 + }, +/obj/effect/turf_decal/tile/neutral{ + dir = 8 + }, +/mob/living/simple_animal/hostile/netherworld/migo, +/turf/open/floor/plasteel, +/area/awaymission/snowdin/post/mining_dock) "ac" = ( /turf/closed/indestructible/rock/snow, /area/awaymission/snowdin/cave/mountain) @@ -10331,16 +10337,6 @@ /obj/item/shard, /turf/open/floor/plating, /area/awaymission/snowdin/post/mining_dock) -"xA" = ( -/mob/living/simple_animal/hostile/netherworld/migo, -/obj/effect/turf_decal/tile/neutral{ - dir = 1 - }, -/obj/effect/turf_decal/tile/neutral{ - dir = 8 - }, -/turf/open/floor/plasteel, -/area/awaymission/snowdin/post/mining_dock) "xB" = ( /obj/effect/turf_decal/stripes/line{ dir = 4 @@ -16108,7 +16104,7 @@ ac ac "} (2,1,1) = {" -ab +ac ac ac ac @@ -66613,7 +66609,7 @@ wD wT xe xs -xA +ab xI xN wL diff --git a/_maps/RandomZLevels/spacebattle.dmm b/_maps/RandomZLevels/spacebattle.dmm index 21cd37f78f..66d7f556b4 100644 --- a/_maps/RandomZLevels/spacebattle.dmm +++ b/_maps/RandomZLevels/spacebattle.dmm @@ -5,6 +5,16 @@ "ab" = ( /turf/open/space, /area/space) +"ac" = ( +/obj/effect/turf_decal/tile/blue{ + dir = 1 + }, +/obj/effect/turf_decal/tile/blue{ + dir = 8 + }, +/mob/living/simple_animal/hostile/syndicate/melee/sword, +/turf/open/floor/plasteel, +/area/awaymission/spacebattle/cruiser) "ad" = ( /obj/structure/shuttle/engine/propulsion/right{ dir = 1 @@ -2597,16 +2607,6 @@ /obj/effect/spawner/lootdrop/armory_contraband, /turf/open/floor/plating, /area/awaymission/spacebattle/cruiser) -"jK" = ( -/mob/living/simple_animal/hostile/syndicate/melee/sword, -/obj/effect/turf_decal/tile/blue{ - dir = 1 - }, -/obj/effect/turf_decal/tile/blue{ - dir = 8 - }, -/turf/open/floor/plasteel, -/area/awaymission/spacebattle/cruiser) "jL" = ( /obj/machinery/door/poddoor{ id = "spacebattlearmory"; @@ -2894,10 +2894,6 @@ /obj/item/mecha_parts/mecha_equipment/weapon/energy/ion, /turf/open/floor/plating, /area/awaymission/spacebattle/cruiser) -"kM" = ( -/obj/effect/mapping_helpers/planet_z, -/turf/closed/mineral/random, -/area/space/nearstation) "vw" = ( /turf/closed/wall/mineral/plastitanium/nodiagonal, /area/awaymission/spacebattle/syndicate5) @@ -3175,7 +3171,7 @@ aa aa aa aa -kM +aa "} (2,1,1) = {" aa @@ -35686,10 +35682,10 @@ eC cn fL cp -jK +ac fs fO -jK +ac eM eM eM diff --git a/_maps/RandomZLevels/undergroundoutpost45.dmm b/_maps/RandomZLevels/undergroundoutpost45.dmm index f6d46ef97d..56018b943a 100644 --- a/_maps/RandomZLevels/undergroundoutpost45.dmm +++ b/_maps/RandomZLevels/undergroundoutpost45.dmm @@ -25,6 +25,9 @@ "ag" = ( /turf/closed/wall/mineral/titanium, /area/awaymission/undergroundoutpost45/central) +"ah" = ( +/turf/open/space, +/area/space/nearstation) "aj" = ( /obj/effect/decal/cleanable/dirt, /turf/open/floor/plasteel{ @@ -13945,10 +13948,6 @@ temperature = 363.9 }, /area/awaymission/undergroundoutpost45/caves) -"zi" = ( -/obj/effect/mapping_helpers/planet_z, -/turf/open/space, -/area/space/nearstation) "KE" = ( /obj/machinery/atmospherics/components/unary/vent_pump/on{ dir = 4 @@ -14211,7 +14210,7 @@ aa aa aa aa -zi +ah "} (2,1,1) = {" aa diff --git a/_maps/map_files/Mining/Lavaland.dmm b/_maps/map_files/Mining/Lavaland.dmm index de42e1ac63..99c536bd3c 100644 --- a/_maps/map_files/Mining/Lavaland.dmm +++ b/_maps/map_files/Mining/Lavaland.dmm @@ -3571,14 +3571,6 @@ }, /turf/open/floor/plating/asteroid/basalt/lava_land_surface, /area/lavaland/surface/outdoors) -"Wt" = ( -/obj/effect/baseturf_helper/lava_land/surface, -/turf/closed/wall, -/area/mine/laborcamp/security) -"Wz" = ( -/obj/effect/mapping_helpers/planet_z, -/turf/open/lava/smooth/lava_land_surface, -/area/lavaland/surface/outdoors) "WA" = ( /obj/effect/mapping_helpers/airlock/cyclelink_helper{ dir = 8 @@ -3630,26 +3622,6 @@ }, /turf/open/floor/plasteel, /area/mine/production) -"WF" = ( -/obj/effect/baseturf_helper/lava_land/surface, -/turf/closed/wall, -/area/mine/laborcamp) -"WH" = ( -/obj/effect/baseturf_helper/lava_land/surface, -/turf/closed/wall, -/area/mine/eva) -"WI" = ( -/obj/effect/baseturf_helper/lava_land/surface, -/turf/closed/wall, -/area/mine/production) -"WJ" = ( -/obj/effect/baseturf_helper/lava_land/surface, -/turf/closed/wall/r_wall, -/area/mine/maintenance) -"WK" = ( -/obj/effect/baseturf_helper/lava_land/surface, -/turf/closed/wall, -/area/mine/living_quarters) (1,1,1) = {" aa @@ -3906,7 +3878,7 @@ aj aj aj aj -Wz +aj "} (2,1,1) = {" aa @@ -8751,7 +8723,7 @@ aq WB aq bi -WF +aq WC aq bZ @@ -9012,7 +8984,7 @@ az az aq ca -Wt +ca ca aj aj @@ -12102,7 +12074,7 @@ ai cQ dk dA -WJ +cQ ed er eM @@ -13134,7 +13106,7 @@ dR ef es dZ -WK +cM fg cM cM @@ -20320,9 +20292,9 @@ bt bH bV cq -WH +bf +bq bq -WI db bP bP diff --git a/code/__DEFINES/maps.dm b/code/__DEFINES/maps.dm index 1b42217fe1..1472db69ff 100644 --- a/code/__DEFINES/maps.dm +++ b/code/__DEFINES/maps.dm @@ -38,8 +38,6 @@ require only minor tweaks. #define ZTRAIT_SPACE_RUINS "Space Ruins" #define ZTRAIT_LAVA_RUINS "Lava Ruins" #define ZTRAIT_ISOLATED_RUINS "Isolated Ruins" //Placing ruins on z levels with this trait will use turf reservation instead of usual placement. -// prevents certain turfs from being stripped by a singularity -#define ZTRAIT_PLANET "Planet" // number - bombcap is multiplied by this before being applied to bombs #define ZTRAIT_BOMBCAP_MULTIPLIER "Bombcap Multiplier" @@ -64,7 +62,11 @@ require only minor tweaks. #define ZTRAITS_CENTCOM list(ZTRAIT_CENTCOM = TRUE) #define ZTRAITS_STATION list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_STATION = TRUE) #define ZTRAITS_SPACE list(ZTRAIT_LINKAGE = CROSSLINKED, ZTRAIT_SPACE_RUINS = TRUE) -#define ZTRAITS_LAVALAND list(ZTRAIT_MINING = TRUE, ZTRAIT_LAVA_RUINS = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 5) +#define ZTRAITS_LAVALAND list(\ + ZTRAIT_MINING = TRUE, \ + ZTRAIT_LAVA_RUINS = TRUE, \ + ZTRAIT_BOMBCAP_MULTIPLIER = 5, \ + ZTRAIT_BASETURF = /turf/open/lava/smooth/lava_land_surface) #define ZTRAITS_REEBE list(ZTRAIT_REEBE = TRUE, ZTRAIT_BOMBCAP_MULTIPLIER = 0.5) #define DL_NAME "name" diff --git a/code/__HELPERS/_logging.dm b/code/__HELPERS/_logging.dm index c259831f94..3ee77d3edc 100644 --- a/code/__HELPERS/_logging.dm +++ b/code/__HELPERS/_logging.dm @@ -157,6 +157,8 @@ WRITE_LOG(GLOB.config_error_log, text) SEND_TEXT(world.log, text) +/proc/log_mapping(text) + WRITE_LOG(GLOB.world_map_error_log, text) /* For logging round startup. */ /proc/start_log(log) diff --git a/code/__HELPERS/level_traits.dm b/code/__HELPERS/level_traits.dm index 55ee069321..3e6e88c8fa 100644 --- a/code/__HELPERS/level_traits.dm +++ b/code/__HELPERS/level_traits.dm @@ -12,6 +12,3 @@ #define is_reserved_level(z) SSmapping.level_trait(z, ZTRAIT_RESERVED) #define is_away_level(z) SSmapping.level_trait(z, ZTRAIT_AWAY) - -// If true, the singularity cannot strip away asteroid turf on this Z -#define is_planet_level(z) SSmapping.level_trait(z, ZTRAIT_PLANET) diff --git a/code/_globalvars/logging.dm b/code/_globalvars/logging.dm index 8e5da083e3..5ca3513e66 100644 --- a/code/_globalvars/logging.dm +++ b/code/_globalvars/logging.dm @@ -28,6 +28,8 @@ GLOBAL_VAR(world_job_debug_log) GLOBAL_PROTECT(world_job_debug_log) GLOBAL_VAR(world_virus_log) GLOBAL_PROTECT(world_virus_log) +GLOBAL_VAR(world_map_error_log) +GLOBAL_PROTECT(world_map_error_log) GLOBAL_LIST_EMPTY(bombers) GLOBAL_PROTECT(bombers) diff --git a/code/controllers/subsystem/air.dm b/code/controllers/subsystem/air.dm index 5bcc911005..885d50fbaf 100644 --- a/code/controllers/subsystem/air.dm +++ b/code/controllers/subsystem/air.dm @@ -315,7 +315,7 @@ SUBSYSTEM_DEF(air) var/starting_ats = active_turfs.len sleep(world.tick_lag) var/timer = world.timeofday - warning("There are [starting_ats] active turfs at roundstart, this is a mapping error caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required)") + log_mapping("There are [starting_ats] active turfs at roundstart caused by a difference of the air between the adjacent turfs. You can see its coordinates using \"Mapping -> Show roundstart AT list\" verb (debug verbs required).") for(var/turf/T in active_turfs) GLOB.active_turfs_startlist += T diff --git a/code/game/atoms.dm b/code/game/atoms.dm index 7de5707032..d53d017ebb 100644 --- a/code/game/atoms.dm +++ b/code/game/atoms.dm @@ -45,7 +45,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() diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index 52b52eb288..03c1bb3bc8 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -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 diff --git a/code/game/objects/items/stunbaton.dm b/code/game/objects/items/stunbaton.dm index 484b9862ff..9f2a9d3567 100644 --- a/code/game/objects/items/stunbaton.dm +++ b/code/game/objects/items/stunbaton.dm @@ -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() diff --git a/code/game/turfs/simulated/floor/plating/asteroid.dm b/code/game/turfs/simulated/floor/plating/asteroid.dm index 9f2da57312..ecc8ee5e8d 100644 --- a/code/game/turfs/simulated/floor/plating/asteroid.dm +++ b/code/game/turfs/simulated/floor/plating/asteroid.dm @@ -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 diff --git a/code/game/world.dm b/code/game/world.dm index 25b8c4d9f3..4043f15f6f 100644 --- a/code/game/world.dm +++ b/code/game/world.dm @@ -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" diff --git a/code/modules/admin/verbs/mapping.dm b/code/modules/admin/verbs/mapping.dm index 2b8d365e15..acd320856a 100644 --- a/code/modules/admin/verbs/mapping.dm +++ b/code/modules/admin/verbs/mapping.dm @@ -35,6 +35,9 @@ GLOBAL_LIST_INIT(admin_verbs_debug_mapping, list( /client/proc/cmd_admin_grantfullaccess, /client/proc/cmd_admin_areatest_all, /client/proc/cmd_admin_areatest_station, + #ifdef TESTING + /client/proc/see_dirty_varedits, + #endif /client/proc/cmd_admin_test_atmos_controllers, /client/proc/cmd_admin_rejuvenate, /datum/admins/proc/show_traitor_panel, @@ -84,8 +87,24 @@ GLOBAL_PROTECT(admin_verbs_debug_mapping) SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Range") //If you are copy-pasting this, ensure the 2nd parameter is unique to the new proc! SSblackbox.record_feedback("tally", "admin_verb", 1, "Show Camera Range") +#ifdef TESTING +GLOBAL_LIST_EMPTY(dirty_vars) +/client/proc/see_dirty_varedits() + set category = "Mapping" + set name = "Dirty Varedits" + + var/list/dat = list() + dat += "