- afegides opcions persistents al editor

- afegida rejilla
This commit is contained in:
2026-04-02 17:38:03 +02:00
parent 44b6f6830d
commit 3c3e012386
7 changed files with 144 additions and 5 deletions

View File

@@ -702,7 +702,14 @@ static auto cmd_edit(const std::vector<std::string>& args) -> std::string {
}
return "Editor not active";
}
return "usage: edit [on|off|revert]";
// EDIT SHOW/HIDE INFO/GRID
if ((args[0] == "SHOW" || args[0] == "HIDE") && args.size() >= 2) {
if (!MapEditor::get() || !MapEditor::get()->isActive()) { return "Editor not active"; }
bool show = (args[0] == "SHOW");
if (args[1] == "INFO") { return MapEditor::get()->showInfo(show); }
if (args[1] == "GRID") { return MapEditor::get()->showGrid(show); }
}
return "usage: edit [on|off|revert|show|hide] [info|grid]";
}
// SET <property> <value> — modifica propiedad del enemigo seleccionado o de la habitación