Allow empty dialogue

master
John 2022-06-20 11:15:28 -04:00
parent ed37999f02
commit af47165a4a
2 changed files with 12 additions and 13 deletions

View File

@ -1,2 +1 @@
Have you heard of the tragedy of $Empty
Darth Charlie the Wise?

View File

@ -43,6 +43,7 @@ public class LevelManager implements Serializable {
try { try {
MapReader.inputMap(filePath); MapReader.inputMap(filePath);
if (!hasDied) { if (!hasDied) {
if (!(MapReader.inputDialogue(filePath)[0].equals("$Empty"))) {
GameFrame.game.dialogueArray = new ArrayList<String>(Arrays.asList(MapReader.inputDialogue(filePath))); GameFrame.game.dialogueArray = new ArrayList<String>(Arrays.asList(MapReader.inputDialogue(filePath)));
if (GameFrame.game.dialogueArray.get(0).contains("$Villain")) { if (GameFrame.game.dialogueArray.get(0).contains("$Villain")) {
GameFrame.game.dialogueArray.remove(0); GameFrame.game.dialogueArray.remove(0);
@ -54,9 +55,8 @@ public class LevelManager implements Serializable {
GameFrame.game.dialogueMenu.frameCounter = 0; GameFrame.game.dialogueMenu.frameCounter = 0;
GameFrame.game.isDialogue = true; GameFrame.game.isDialogue = true;
} }
}
// reset signs // reset signs
GameFrame.game.tutorialSign = new ArrayList<WallSign>();
GameFrame.game.loreSign = new ArrayList<WallSign>();
GameFrame.game.tutorialSign.clear(); GameFrame.game.tutorialSign.clear();
GameFrame.game.loreSign.clear(); GameFrame.game.loreSign.clear();
// temporary boolean, so only declared here // temporary boolean, so only declared here