mirror of
https://github.com/Kapendev/parin.git
synced 2025-04-26 13:09:56 +03:00
Added error messages when loading maps and dialogues.
This commit is contained in:
parent
cdf4bf6107
commit
5deea003c1
2 changed files with 6 additions and 0 deletions
|
@ -57,6 +57,10 @@ struct Dialogue {
|
|||
load(path);
|
||||
}
|
||||
|
||||
bool isEmpty() {
|
||||
return units.length == 0;
|
||||
}
|
||||
|
||||
bool hasChoices() {
|
||||
return menu.length != 0;
|
||||
}
|
||||
|
@ -296,6 +300,7 @@ struct Dialogue {
|
|||
if (path.length != 0) {
|
||||
parse(loadTempText(path));
|
||||
}
|
||||
if (isEmpty) printfln("Error: The file `{}` does not exist.", path);
|
||||
}
|
||||
|
||||
void free() {
|
||||
|
|
|
@ -468,6 +468,7 @@ struct TileMap {
|
|||
if (path.length != 0) {
|
||||
parse(loadTempText(path));
|
||||
}
|
||||
if (isEmpty) printfln("Error: The file `{}` does not exist.", path);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue