guardat dels canvis en la habitacio

This commit is contained in:
2026-04-02 11:10:03 +02:00
parent b31346830f
commit a6fae7b001
10 changed files with 796 additions and 65 deletions

View File

@@ -630,7 +630,7 @@ static auto cmd_scene(const std::vector<std::string>& args) -> std::string {
return "Unknown scene: " + args[0];
}
// EDIT [ON|OFF|SAVE]
// EDIT [ON|OFF|REVERT]
static auto cmd_edit(const std::vector<std::string>& args) -> std::string {
if (args.empty() || args[0] == "ON") {
if (GameControl::enter_editor) {
@@ -646,13 +646,13 @@ static auto cmd_edit(const std::vector<std::string>& args) -> std::string {
}
return "Not in game";
}
if (args[0] == "SAVE") {
if (GameControl::save_editor) {
return GameControl::save_editor();
if (args[0] == "REVERT") {
if (GameControl::revert_editor) {
return GameControl::revert_editor();
}
return "Editor not active";
}
return "usage: edit [on|off|save]";
return "usage: edit [on|off|revert]";
}
#endif