The map writer now works on small chunks of the station

This commit is contained in:
Crazylemon64
2016-08-03 15:38:08 -07:00
parent f0a7d19240
commit 87cde9f61c
3 changed files with 23 additions and 8 deletions
+14 -3
View File
@@ -26,11 +26,13 @@
var/turf/T = loc
hide(T.intact)
if(codes["patrol"])
if(!codes || !codes.len)
log_debug("Empty codes datum at ([x],[y],[z])")
if("patrol" in codes)
if(!navbeacons["[z]"])
navbeacons["[z]"] = list()
navbeacons["[z]"] += src //Register with the patrol list!
if(codes["delivery"])
if("delivery" in codes)
deliverybeacons += src
deliverybeacontags += location
@@ -39,6 +41,15 @@
deliverybeacons -= src
return ..()
/obj/machinery/navbeacon/serialize()
var/list/data = ..()
data["codes"] = codes
return data
/obj/machinery/navbeacon/deserialize(list/data)
codes = data["codes"]
..()
// set the transponder codes assoc list from codes_txt
/obj/machinery/navbeacon/proc/set_codes()
if(!codes_txt)
@@ -201,4 +212,4 @@ Transponder Codes:<UL>"}
codes[newkey] = newval
updateDialog()
updateDialog()
@@ -379,8 +379,13 @@ var/global/dmm_suite/preloader/_preloader = new
var/trim_right = trim_text(copytext(text,equal_position+1,position))//the content of the variable
//Check for string
// Make it read to the next delimiter, instead of the quote
if(findtext(trim_right,quote,1,2))
trim_right = copytext(trim_right,2,findtext(trim_right,quote,3,0))
log_debug(trim_right)
var/endquote = findtext(trim_right,quote,-1)
if(!endquote)
log_debug("Terminating quote not found!")
trim_right = copytext(trim_right,2,endquote)
//Check for number
else if(isnum(text2num(trim_right)))
@@ -402,7 +407,6 @@ var/global/dmm_suite/preloader/_preloader = new
else if(ispath(text2path(trim_right)))
trim_right = text2path(trim_right)
log_debug(trim_right)
to_return[trim_left] = trim_right
else//simple var
+3 -3
View File
@@ -22,10 +22,10 @@
return
/atom/movable
/atom
// This is so specific atoms can override these, and ignore certain ones
var/list/vars_to_save = list("dir","name","color","icon","icon_state")
/atom/movable/serialize()
/atom/serialize()
var/list/data = ..()
for(var/thing in vars_to_save)
if(vars[thing] != initial(vars[thing]))
@@ -33,7 +33,7 @@
return data
/atom/movable/deserialize(var/list/data)
/atom/deserialize(var/list/data)
for(var/thing in vars_to_save)
if(thing in data)
vars[thing] = data[thing]