diff --git a/.gitignore b/.gitignore index 5374441056573..5b9ebc9f76f3c 100644 --- a/.gitignore +++ b/.gitignore @@ -74,6 +74,7 @@ $RECYCLE.BIN # Rust output. /rust/target/* +rustlibs_panic.txt # mkdocs output. site diff --git a/code/game/objects/effects/map_effects/mapmanip.dm b/code/game/objects/effects/map_effects/mapmanip.dm index d0be4103dd90b..4e73fa92f384b 100644 --- a/code/game/objects/effects/map_effects/mapmanip.dm +++ b/code/game/objects/effects/map_effects/mapmanip.dm @@ -4,7 +4,7 @@ /obj/effect/map_effect/marker/mapmanip/Initialize(mapload) . = ..() - qdel(src) + return INITIALIZE_HINT_QDEL /obj/effect/map_effect/marker/mapmanip/submap/extract name = "mapmanip marker, extract submap" @@ -20,7 +20,15 @@ pixel_x = -32 pixel_y = -32 +/obj/effect/map_effect/marker_helper + name = "marker helper" + layer = POINT_LAYER + +/obj/effect/map_effect/marker_helper/Initialize(mapload) + . = ..() + return INITIALIZE_HINT_QDEL + /obj/effect/map_effect/marker_helper/mapmanip/submap/edge - name = "mapmanip helper marker, edge of submap" + name = "mapmanip marker helper, submap edge" icon = 'icons/effects/mapping_helpers.dmi' icon_state = "mapmanip_submap_edge" diff --git a/code/modules/awaymissions/maploader/reader.dm b/code/modules/awaymissions/maploader/reader.dm index 198621034bf46..5442fb3a0aca3 100644 --- a/code/modules/awaymissions/maploader/reader.dm +++ b/code/modules/awaymissions/maploader/reader.dm @@ -26,25 +26,26 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new()) * allowed to romp unchecked. */ /datum/dmm_suite/proc/load_map(dmm_file, x_offset = 0, y_offset = 0, z_offset = 0, shouldCropMap = FALSE, measureOnly = FALSE) - var/tfile = dmm_file// the map file we're creating + var/map_data var/fname = "Lambda" - if(isfile(tfile)) - fname = "[tfile]" + if(isfile(dmm_file)) + fname = "[dmm_file]" // Make sure we dont load a dir up var/lastchar = copytext(fname, -1) if(lastchar == "/" || lastchar == "\\") - log_debug("Attempted to load map template without filename (Attempted [tfile])") + log_debug("Attempted to load map template without filename (Attempted [dmm_file])") return // use rustlib to read, parse, process, mapmanip etc // this will "crash"/stacktrace on fail - tfile = mapmanip_read_dmm(fname) + // is not passed `dmm_file` because byondapi-rs doesn't support resource types yet + map_data = mapmanip_read_dmm(fname) // if rustlib for whatever reason fails and returns null // try to load it the old dm way instead - if(!tfile) - tfile = wrap_file2text(fname) + if(!map_data) + map_data = wrap_file2text(dmm_file) - if(!length(tfile)) + if(!length(map_data)) throw EXCEPTION("Map path '[fname]' does not exist!") if(!x_offset) @@ -65,7 +66,7 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new()) log_debug("[measureOnly ? "Measuring" : "Loading"] map: [fname]") try LM.index = 1 - while(dmmRegex.Find(tfile, LM.index)) + while(dmmRegex.Find(map_data, LM.index)) LM.index = dmmRegex.next // "aa" = (/type{vars=blah})