- 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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user