Save logging + Fixes#473
Conversation
Added admin verb to the server tab to allow changing at runtime the error tolerance for saving the world. Allow skipping over recoverable and unrecoverable error if wanted. Meant to be a sort of last-resort tool to force a save if something on the map breaks the save in a limited way.
Renamed and moved the code for saving in SSpersistence over to it's own file since it was pretty massive and hard to navigate.
* Also renamed "DeserializeOneOff" to "LoadFromLimbo" to match the other limbo proc names.
0511188 to
c9bfaf2
Compare
* Renamed and duplicated exception filters, one for saving, and one for loading. Since loading doesn't need to unblock entering or restart subsystems on an exception. * Cut up loading code after applying some of the fixes upstream.
This reverts commit cee6ea4.
c9bfaf2 to
1d476d8
Compare
|
|
||
| var/datum/V | ||
| try | ||
| V = _list[key] //#FIXME: We really need to get rid of this awful way to check list types. |
| //!! - HOT CODE BELOW - !! | ||
| //!!!!!!!!!!!!!!!!!!!!!!!! | ||
| for(var/z in saved_levels) | ||
| var/datum/persistence/load_cache/z_level/z_level = z_transform["[z]"] //#FIXME: String concatenation are extremely slow!!! |
There was a problem hiding this comment.
True, but this is only in the saved_levels loop. Creating the string as a key here isn't going to cause an issue.
| if(last_area_type != TA.type || last_area_name != TA.name) | ||
| if(area_turf_count > 0) | ||
| z_level.areas += list(list("[last_area_type]", sanitize_sql(last_area_name), area_turf_count)) | ||
| last_area_type = TA.type //#FIXME: If last_area_type is only ever used as a string, might as well concat it here, instead of doing it thousands of time above? |
There was a problem hiding this comment.
The string concatenation should only occur at the boundaries of two areas, when last_area_type changes. Changing last_area_type to a string would be slower, as you'd need to convert TA.type to a string for comparison, which would occur thousands of times.
| var/atom/old_loc // Where the ship was prior to saving. Used to relocate the ship following saving, not on load. | ||
|
|
||
| //#FIXME: Don't store this here. | ||
| //#FIXME: Don't store this here. Those are meant to be strictly just temporary objects just to show a position on the overmap! |
There was a problem hiding this comment.
I don't think these should be regarded as temporary, since ship velocity etc. are stored on this object.
There was a problem hiding this comment.
The thing is, that's what neb has been going for last time I asked. That's part of why most of the planet code was decoupled from the markers.
There was a problem hiding this comment.
Not blocking, but it's not like Nebula has saving either. There's nothing in game that creates and destroys these objects, so I'm not sure how they could be regarded as temporary.
| . = ..() | ||
| CRASH("obj/debug/error_on_save: Crashing save!") | ||
|
|
||
| // |
level_data.setup_level_data() is not called after loading level data from a save. But that's where it was adding itself to the list of saved levels. (which really should have stayed inside ssmapping for this very reason)
Silently catching it means we don't get a call stack and nice things like that. So, I'm rethrowing it for the runtime log to pick it up.
* Added the persistence config options to the example config file. * Renamed an ambiguous config options for persistence.
|
Added some more things while waiting. Now persistence config options are actually parsed from the config files via hooks to the modpack. |
Removes dependency on the persistence modpack.
Description of changes
Fixes:
Changes: