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
Darth Charlie the Wise?
$Empty

View File

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