- afegides les habitacions de tot el joc (buides)

- minimapa mostra els numeros d'habitacio
- tecla per a fer captures de pantalla
This commit is contained in:
2026-04-12 10:25:12 +02:00
parent c1764ba0d8
commit 234ae82f56
124 changed files with 7744 additions and 35 deletions

View File

@@ -583,7 +583,7 @@ static auto changeRoomWithEditor(const std::string& room_file) -> std::string {
static auto cmdRoom(const std::vector<std::string>& args) -> std::string { // NOLINT(readability-function-cognitive-complexity)
if (SceneManager::current != SceneManager::Scene::GAME) { return "Only available in GAME scene"; }
if (args.empty()) { return "usage: room <1-60>|next|prev|left|right|up|down"; }
if (args.empty()) { return "usage: room <num>|next|prev|left|right|up|down"; }
// DELETE: borrar la habitación actual
if (args[0] == "DELETE") {
@@ -619,11 +619,11 @@ static auto cmdRoom(const std::vector<std::string>& args) -> std::string { // N
} else {
try {
num = std::stoi(args[0]);
} catch (...) { return "usage: room <1-60>|next|prev|left|right|up|down"; }
} catch (...) { return "usage: room <num>|next|prev|left|right|up|down"; }
}
if (num < 1 || num > 60) { return "Room must be between 1 and 60"; }
if (num < 0) { return "Room number must be >= 0"; }
char buf[16];
std::snprintf(buf, sizeof(buf), "%02d.yaml", num);
std::snprintf(buf, sizeof(buf), "%03d.yaml", num);
return changeRoomWithEditor(buf);
}