/client/verb/welp()
set category = "Welp"
set name = "Export"
set desc = "This is a horrible idea and will break everything"
var/savefile/F = new()
var/txtfile = file("savefile.txt")
world << "Starting..."
for (var/D in world)
world << " Adding [D] ...")
F[D] << world[D]
F.ExportText("/", txtfile)
world << "Done (if it got this far)"
This particular attempt fails with "bad index" immediately after the "for". I can get it to print repeatedly if I switch to "Adding \ref[D]" and remove the F[D] << world[D], but that doesn't quite do what I want.
I do not really have concern for how long it takes (as long as it is not on the span of hours). Disk space is also mostly a non-issue.
The goal I have is getting a text-based dump of the current state of the world and everything in it, ideally with only unique instances (so no recursion loops, etc).</<>
Also, world has no valid indexing operation.
Change this line to:
Good luck.