@@ -26,25 +26,26 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new())
26
26
* allowed to romp unchecked.
27
27
*/
28
28
/ datum / dmm_suite/ proc / load_map(dmm_file, x_offset = 0 , y_offset = 0 , z_offset = 0 , shouldCropMap = FALSE , measureOnly = FALSE )
29
- var /tfile = dmm_file // the map file we're creating
29
+ var /map_data
30
30
var /fname = " Lambda"
31
- if (isfile(tfile ))
32
- fname = " [ tfile ] "
31
+ if (isfile(dmm_file ))
32
+ fname = " [ dmm_file ] "
33
33
// Make sure we dont load a dir up
34
34
var /lastchar = copytext(fname, - 1 )
35
35
if (lastchar == " /" || lastchar == " \\ " )
36
- log_debug (" Attempted to load map template without filename (Attempted [ tfile ] )" )
36
+ log_debug (" Attempted to load map template without filename (Attempted [ dmm_file ] )" )
37
37
return
38
38
39
39
// use rustlib to read, parse, process, mapmanip etc
40
40
// this will "crash"/stacktrace on fail
41
- tfile = mapmanip_read_dmm(fname)
41
+ // is not passed `dmm_file` because byondapi-rs doesn't support resource types yet
42
+ map_data = mapmanip_read_dmm(fname)
42
43
// if rustlib for whatever reason fails and returns null
43
44
// try to load it the old dm way instead
44
- if (! tfile )
45
- tfile = wrap_file2text(fname )
45
+ if (! map_data )
46
+ map_data = wrap_file2text(dmm_file )
46
47
47
- if (! length(tfile ))
48
+ if (! length(map_data ))
48
49
throw EXCEPTION (" Map path '[ fname] ' does not exist!" )
49
50
50
51
if (! x_offset)
@@ -65,7 +66,7 @@ GLOBAL_DATUM_INIT(_preloader, /datum/dmm_suite/preloader, new())
65
66
log_debug (" [ measureOnly ? " Measuring" : " Loading" ] map: [ fname] " )
66
67
try
67
68
LM . index = 1
68
- while (dmmRegex. Find(tfile , LM . index))
69
+ while (dmmRegex. Find(map_data , LM . index))
69
70
LM . index = dmmRegex. next
70
71
71
72
// "aa" = (/type{vars=blah})
0 commit comments