ddnet/src/engine
Robert Müller 1810d972f4 Autosave copy of current editor map periodically to auto folder
A copy of the map currently open in the editor is saved every 10 minutes to the `maps/auto` folder (interval configurable, see below). The automatically saved map uses the filename of the original map with an additional timestamp. Per map name 10 autosaves are kept in the `auto` folder before old autosaves will be deleted (number configurable, see below).

Add config variable `ed_autosave_interval` (0 - 240, default 10) to configure the interval in minutes at which a copy of the current editor map is automatically saved to the 'auto' folder.

Add config variable `ed_autosave_max` (0 - 1000, default 10) to configure the maximum number of autosaves that are kept per map name (0 = no limit).

Autosaving will not take place in the 5 seconds immediately after the map was last modified by the user, to avoid interrupting the user with the autosave.
This will only delay autosaving for up to 1 minute though, so autosaves are not prevented entirely, should the user continuously edit the map.

When the editor is reopened after being closed for more than 10 seconds, the autosave timer will be adjusted to compensate for the time that was not spent on editing in the editor.

When the map is saved manually by the user the autosave file is also updated, if it's outdated by at least half of the configured autosave interval. This ensures that autosaves are always available as a periodic backup of the map.

When a copy of the current map is saved, this does not update the autosave and will also no longer reset the modified state. The modified state should reflect whether changes have been made that are not saved to the current map file. As saving a copy does not update the current file, the modified state should not be reset in this case.

Closes #6693.
2023-06-26 21:58:04 +02:00
..
client Add storage parameter to sound loading functions 2023-06-25 21:25:34 +02:00
docs Merge #5918 2022-10-09 13:53:05 +00:00
external Update zlib to version 1.2.13 2022-10-14 14:53:24 +02:00
gfx Replace usages of C math functions 2023-03-01 19:26:53 +01:00
server Merge #6742 2023-06-14 11:35:21 +00:00
shared Autosave copy of current editor map periodically to auto folder 2023-06-26 21:58:04 +02:00
antibot.h Forgot to add target here 2021-07-22 00:22:12 +02:00
Cargo.toml Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
client.h Show GPU info (if available) in assert 2023-05-27 09:51:22 +02:00
config.h Implement "reset" command 2021-12-27 01:13:11 +01:00
console.h Quit client when existing config file cannot be loaded 2023-05-10 21:04:02 +02:00
console.rs Support 4 and 8 digit RGBA color values in console 2023-02-24 20:32:44 +01:00
demo.h Use sizeof(int32_t) instead of 4 2023-02-11 13:59:08 +01:00
discord.h Only announce servers using Steam/Discord integration which are registered 2022-10-09 16:16:54 +02:00
editor.h Use bool for Load, Save, Append result, true on success 2022-11-03 20:17:06 +01:00
engine.h Clean up CServerLogger (fixes #6598) 2023-05-17 01:04:06 +02:00
favorites.h Allow multiple addresses per server in the serverbrowser 2022-07-10 16:52:07 +02:00
friends.h Bump friends limit from 1024 to 4096 (fixes #6096) 2022-12-06 10:31:43 +01:00
ghost.h Organize engine-shared includes 2022-05-29 20:02:22 +02:00
graphics.h Add IGraphics::GetScreenName 2023-06-08 12:52:34 +02:00
input.h Use dropdown menu to select game controller 2023-06-09 14:04:35 +02:00
kernel.h Fix misspellings 2022-10-25 13:51:56 -03:00
keys.h Regenerate key lists with latest SDL version 2023-05-30 23:39:47 +02:00
lib.rs Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
map.h Add missing CMap::NumData delegate function 2023-05-15 20:47:59 +02:00
message.h Add a simpler IServer::SnapNewItem() API based on some more generated data 2023-02-10 23:12:24 +03:00
rust.h Add support for Rust code in DDNet 2022-10-19 23:46:06 +02:00
server.h clean time score handling, with positive time values 2023-05-22 16:36:46 +02:00
serverbrowser.h Ensure proper buffer size is used with DDNet server filter 2023-06-14 00:04:01 +02:00
sound.h Add storage parameter to sound loading functions 2023-06-25 21:25:34 +02:00
sqlite.h Remove useless typedef in c++ 2022-06-25 21:05:54 +02:00
steam.h Only announce servers using Steam/Discord integration which are registered 2022-10-09 16:16:54 +02:00
storage.h Add IStorage::RemoveFolder 2023-03-25 16:58:51 +01:00
textrender.h Show circle icon next to editor filename when unsaved changes 2023-06-22 19:34:17 +02:00
updater.h Overhauled job system 2017-11-23 15:47:38 +01:00
uuid.h Make sure headers compile standalone 2020-09-26 21:50:27 +02:00
warning.h Add block list for drivers 2020-11-05 21:07:14 +01:00