world
Del()
var/list/tiles = list()
for(var/tile/t in world)
tiles += t
for(var/i=1,i<20000,i++)
if(length(tiles))
var/savefile/f = new("world/tile[i].sav")
var/tile/t = pick(tiles)
f["x"] << t.x
f["y"] << t.y
f["z"] << t.z
t.Write(f)
tiles -= t
..()
New()
..()
for(var/i=1,i<20000,i++)
if(fexists("world/tiles[i].sav"))
var/savefile/f = new("world/tiles[i].sav")
var/tile/t = new/tile
t.Read(f)
f["x"] >> t.x
f["y"] >> t.y
f["z"] >> t.z
Problem description:
Umm, this is probably a noobie, or elementary mistake. I've gotten pretty good at coding, but world object saving isn't something i've made before.
For some reason, it saves them all, but it wont load them. Any ideas?