NTStation/NTstation13 — pull request #970 by ACCount12 (2014-08-22 02:52:51+00:00)
Title: Save/Load

You are a badmin, delaying the round, spawning a ton of items with custom names, armor vars, icons and contents for an event. And then some random bombgriefer ruins everything! And you need to restart a server, delay the round again and then spawn ton of items with custom names, icons, contents...

Not anymore! With our brand new ShitSpawner 9000 you can spawn custom clothing, items, even mobs on your local server, save them, then load save file everywhere!

1. Set up local server.
2. Spawn!
3. Debug -> Debug Verbs
4. Click on item and select Save To File. (you can use lockers to save a ton of items at once)
5. Connect to server you want to fill with your ~~shi~~ spawn.
5. Debug -> Load Save File
6. RMB on target turf -> Spawn Save File Contents

Save files can store everything you can spawn, including custom icons and custom onmob icons from my last badminpowers update.

Known troubles:
* Save To File is in Debug Verbs for a reason. It can crash server if you are trying to save item that has external referrences. Making external ref vars /tmp/ works, but i fixed only most common vars for mobs and items.
* Saving humans and items is mostly safe, saving structures can be dangerous, saving atmos, telecomm and powernet machines will crash the server.
* Saving too many items at once (5 machine gun mags with boolets inside) triggers server's infinite loop check.
* Wires are being reset on spawned items.
* color, alpha, blend_mode vars are not saved. BYOND's bug, reported, will be fixed in v507.
* Contents of boxes, lockers, beakers can duplicate because one set of items is stored in savefile and second set is spawned in New() on load. Use base type items to avoid this.