mirror of
https://github.com/Aurorastation/Aurora.3.git
synced 2026-08-24 21:40:55 +01:00
BAPI - mapmanip insert/extract failsafe (#19466)
  !fixes https://github.com/Aurorastation/Aurora.3/issues/19456 --------- Co-authored-by: DreamySkrell <>
This commit is contained in:
co-authored by
DreamySkrell <>
parent
c4c2f1f3a2
commit
8255935704
@@ -50,8 +50,16 @@ GLOBAL_DATUM_INIT(_preloader, /dmm_suite/preloader, new)
|
||||
/dmm_suite/proc/load_map_impl(dmm_file, x_offset, y_offset, z_offset, cropMap, measureOnly, no_changeturf, x_lower = -INFINITY, x_upper = INFINITY, y_lower = -INFINITY, y_upper = INFINITY)
|
||||
var/tfile = dmm_file//the map file we're creating
|
||||
if(isfile(tfile))
|
||||
// tfile = file2text(tfile)
|
||||
tfile = bapi_read_dmm_file("[tfile]") // `tfile` is of type `File`, this makes it into just a string of its path
|
||||
// name/path of dmm file, new var so as to not rename the `tfile` var
|
||||
// to maybe maintain compatibility with other codebases
|
||||
var/tfilepath = "[tfile]"
|
||||
// use bapi to read, parse, process, mapmanip etc
|
||||
// this will "crash"/stacktrace on fail
|
||||
tfile = bapi_read_dmm_file(tfilepath)
|
||||
// if bapi for whatever reason fails and returns null
|
||||
// try to load it the old dm way instead
|
||||
if(!tfile)
|
||||
tfile = file2text(tfilepath)
|
||||
|
||||
if(!x_offset)
|
||||
x_offset = 1
|
||||
|
||||
@@ -0,0 +1,7 @@
|
||||
|
||||
author: DreamySkrell
|
||||
|
||||
delete-after: True
|
||||
|
||||
changes:
|
||||
- rscadd: "BAPI - mapmanip insert/extract failsafe."
|
||||
@@ -21038,7 +21038,7 @@
|
||||
/area/hangar/auxiliary)
|
||||
"owJ" = (
|
||||
/obj/effect/map_effect/marker/mapmanip/submap/insert/sccv_horizon/ops_warehouse_small_storage,
|
||||
/turf/template_noop,
|
||||
/turf/simulated/floor/plating,
|
||||
/area/operations/storage)
|
||||
"owM" = (
|
||||
/obj/structure/shuttle_part/scc/research{
|
||||
@@ -30346,7 +30346,7 @@
|
||||
/turf/simulated/floor/plating,
|
||||
/area/shuttle/intrepid/cockpit)
|
||||
"uTy" = (
|
||||
/turf/template_noop,
|
||||
/turf/simulated/floor/plating,
|
||||
/area/operations/storage)
|
||||
"uTz" = (
|
||||
/obj/machinery/atmospherics/pipe/simple/hidden/supply,
|
||||
|
||||
Reference in New Issue
Block a user