1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2025-09-05 03:47:58 +00:00

save/load mode data, via CLI

This commit is contained in:
Zeno Rogue
2024-03-14 19:28:33 +01:00
parent 424186b10d
commit c85b4d2f2b
3 changed files with 98 additions and 1 deletions

View File

@@ -335,6 +335,19 @@ int arg::readCommon() {
clearMessages();
}
else if(argis("-save-mode")) {
save_mode_to_file(shift_args());
}
else if(argis("-load-mode")) {
try {
load_mode_from_file(shift_args());
}
catch(hstream_exception& e) {
println(hlog, "exception!");
}
}
// informational
else if(argis("-version") || argis("-v")) {
printf("HyperRogue version " VER "\n");