wsave()
var/savefile/F = new/savefile("SavedMap.sav")
F << world.maxx
F << world.maxy
for(var/turf/T in world)
F["type"] << T.type
F["underlays"] << T.underlays
wload()
var/savefile/F = new/savefile("SavedMap.sav")
F >> world.maxx
F >> world.maxy
for(var/turf/T in world)
var/turftype
var/underl[]
F["type"] >> turftype
F["underlays"] >> underl
T = new turftype(T)
T.underlays = underl
ID:148732
![]() Oct 22 2002, 10:16 am
|
|
The following is my map code (originally designed by Foomer). I need it to save underlays, however. Whenever I use this, it locks my game (Not Responding). The only data I need saved from the turfs are type and underlays.
|
![]() Oct 22 2002, 10:44 am
|
|
same here even though mine only has turfs
|
Polatrite wrote:
The following is my map code (originally designed by Foomer). I need it to save underlays, however. Whenever I use this, it locks my game (Not Responding). The only data I need saved from the turfs are type and underlays. wsave() This may all be moot, since the library I'm working on for digitalBYOND is going to handle map saving. Lummox JR |
After toying around a bit, I've decided this is how I want my saving to work. I created another /atom, /atom/structure, with a parent_type of /turf. Now, I need to have all these saved, with their type, x, y, and z. I also need them to load properly, be newly created at their designated locations. Currently, this is what I have for code. As you can tell, I've been toying with it quite a bit, I think using lists will help out quite a bit, but I am very poor with savefiles AND lists, and since I'm trying to use both.....
wsave() Also, as you can see, there are a few mobs that need saving in here too. I may change these to structures at a later time, or now, if it is causing interference. ~Polatrite~ |