()
| 31 | } |
| 32 | |
| 33 | private update(): void{ |
| 34 | // Erase everything |
| 35 | this.renderArea.resetAllButSize(); |
| 36 | |
| 37 | // Back to the map button |
| 38 | this.addBackToMainMapButton(this.renderArea, "treasureBackToTheMapButton"); |
| 39 | |
| 40 | // Draw the ascii |
| 41 | this.renderArea.drawArray(Database.getAscii("places/treasure"), 28, 3); |
| 42 | |
| 43 | // If we didn't find the treasure yet |
| 44 | if(Saving.loadBool("TheCavePattern_TreasureMapFoundTreasure") == false){ |
| 45 | // Add the button to get the treasure |
| 46 | this.renderArea.addAsciiRealButton(Database.getText("treasureButtonDig"), 49, 14, "treasureButton", Database.getTranslatedText("treasureButtonDig"), true, -1, null, false); |
| 47 | this.renderArea.addLinkCall(".treasureButton", new CallbackCollection(this.dig.bind(this))); |
| 48 | } |
| 49 | // Else, we found the treasure |
| 50 | else{ |
| 51 | // Add the text |
| 52 | this.renderArea.drawString(Database.getText("treasureButtonYouFound"), 49, 14); |
| 53 | this.renderArea.drawString(Database.getTranslatedText("treasureButtonYouFound"), 49, 15, true); |
| 54 | } |
| 55 | } |
| 56 | } |
no test coverage detected