buildmode mapgen tool save

This commit is contained in:
Artur
2021-10-26 16:31:36 +03:00
parent ce97595abe
commit bfcdf83e55
8 changed files with 335 additions and 0 deletions
@@ -672,3 +672,15 @@
if(allowed(user))
return TRUE
to_chat(user, "<span class='notice'>Access denied.</span>")
/obj/structure/closet/on_object_saved(depth)
if(depth >= 10)
return ""
var/dat = ""
for(var/obj/item in contents)
var/metadata = generate_tgm_metadata(item)
dat += "[dat ? ",\n" : ""][item.type][metadata]"
//Save the contents of things inside the things inside us, EG saving the contents of bags inside lockers
var/custom_data = item.on_object_saved(depth++)
dat += "[custom_data ? ",\n[custom_data]" : ""]"
return dat