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,20 +43,20 @@ public class LevelManager implements Serializable {
try { try {
MapReader.inputMap(filePath); MapReader.inputMap(filePath);
if (!hasDied) { if (!hasDied) {
GameFrame.game.dialogueArray = new ArrayList<String>(Arrays.asList(MapReader.inputDialogue(filePath))); if (!(MapReader.inputDialogue(filePath)[0].equals("$Empty"))) {
if (GameFrame.game.dialogueArray.get(0).contains("$Villain")) { GameFrame.game.dialogueArray = new ArrayList<String>(Arrays.asList(MapReader.inputDialogue(filePath)));
GameFrame.game.dialogueArray.remove(0); if (GameFrame.game.dialogueArray.get(0).contains("$Villain")) {
GameFrame.game.dialogueMenu.isNarrator = false; GameFrame.game.dialogueArray.remove(0);
// TODO: move img path to GamePanel GameFrame.game.dialogueMenu.isNarrator = false;
GameFrame.game.dialogueMenu.PORTRAIT = new BufferedImageWrapper("img\\dialogue\\Bouncer.png"); // TODO: move img path to GamePanel
GameFrame.game.dialogueMenu.PORTRAIT = new BufferedImageWrapper("img\\dialogue\\Bouncer.png");
}
GameFrame.game.dialogueMenu.currentFrame = 0;
GameFrame.game.dialogueMenu.frameCounter = 0;
GameFrame.game.isDialogue = true;
} }
GameFrame.game.dialogueMenu.currentFrame = 0;
GameFrame.game.dialogueMenu.frameCounter = 0;
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