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
+12
View File
@@ -732,3 +732,15 @@
*/
/datum/component/storage/proc/get_max_volume()
return max_volume || AUTO_SCALE_STORAGE_VOLUME(max_w_class, max_combined_w_class)
/obj/item/storage/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