set g_sandbox 0 "allow players to spawn and edit objects around the map"
set g_sandbox_info 1 "print object information to the server. 1 prints info about spawned / removed objects, 2 also prints info about edited objects"
+set g_sandbox_storage_name default "name of the selected storage to use"
set g_sandbox_storage_autosave 10 "storage is automatically saved every specified number of seconds"
set g_sandbox_storage_autoload 1 "if a storage file exists for the given map, automatically load it at startup"
set g_sandbox_editor_maxobjects 1000 "maximum number of objects that may exist at a time"
float autocvar_g_debug_defaultsounds;
float autocvar_g_loituma;
float autocvar_g_sandbox_info;
+string autocvar_g_sandbox_storage_name;
float autocvar_g_sandbox_storage_autosave;
float autocvar_g_sandbox_storage_autoload;
float autocvar_g_sandbox_editor_maxobjects;
string file_name;
float file_get;
- file_name = strcat("sandbox/storage_", GetMapname(), ".txt");
+ file_name = strcat("sandbox/storage_", autocvar_g_sandbox_storage_name, "_", GetMapname(), ".txt");
file_get = fopen(file_name, FILE_WRITE);
fputs(file_get, strcat("// sandbox storage for map ", GetMapname(), ", containing a total of ", ftos(object_count), " objects\n"));
for(head = world; (head = find(head, classname, "object")); )
string file_read, file_name;
float file_get;
- file_name = strcat("sandbox/storage_", GetMapname(), ".txt");
+ file_name = strcat("sandbox/storage_", autocvar_g_sandbox_storage_name, "_", GetMapname(), ".txt");
file_get = fopen(file_name, FILE_READ);
if(file_get < 0)
{