ID:165805
 
I need an efficient Map saver that will save all the objects that have been placed on my map, aswell as the ones that are no longer present on the map.
You wrote:
aswell as the ones that are no longer present on the map.

What do you mean? If you delete an item, it's gone. You can record this action, but I don't see why you might want to. If you mean deleted as in the atom was already on the map (when you made it in Dream Maker), then that's possible. Just don't save those items. When you load up the map, don't delete anything, just simply follow the usual loading procedure.

As for the map saver, their are a number of libraries and demos on the hub. Possible keywords for the search are dmp and map.
In response to CaptFalcon33035
atom/var/lastx
atom/var/lasty
atom/var/lastz
mob/verb/Save_World()
var/list/objlist=new/list()
for(var/obj/O in world)
O.lastx=O.x
O.lasty=O.y
O.lastz=O.z
objlist+=O
var/savefile/F=new("objlist.sav")
F["objlist"]<<null//saving a list without nulling it first can sometimes cause problems <.<
F["objlist"]<<objlist

mob/verb/Load_World()
for(var/obj/O in world)
del O
var/list/objlist=new/list()
var/savefile/F=new("objlist.sav")
F["objlist"]>>objlist
for(var/obj/O in objlist)
O.x=O.lastx
O.y=O.lasty
O.z=O.lastz
In response to Falacy
I would suggest, that you turn those into rocs and place them in the shutdown procs and new world etc.

thats a noce little code though Falacy :D
In response to Lyndonarmitage1
if you do that make sure you add a if(fexists("file")) check to make sure theres an actual file before u go deleting all the objects in the world and replacing them with nothing, unless you have nothing to start with... then it doesnt really matter
Well, I recently released a pif_MapLoader. It's currently in beta because of a few minor things (one being an unfinished readme file), but it functions fine.
</shameless plug>

I'm not sure what you mean by saving objects that are no longer on the map. Do you mean things that were initially on the map (as in the original map file) but aren't anymore? If that is what you meant, you could write a procedure to add that to the map as well as the current version of the map, as well as with this.