Finished ironing out Gang ascension mechanic, including bugs. Refactored UI code to be part of the Gang class.

This commit is contained in:
danielyxie
2018-10-14 19:28:44 -05:00
parent fcab079b32
commit a43f8bf1e6
13 changed files with 557 additions and 388 deletions
+1 -5
View File
@@ -28,10 +28,6 @@ import {yesNoBoxCreate, yesNoTxtInpBoxCreate,
yesNoTxtInpBoxClose} from "../utils/YesNoBox";
function displayLocationContent() {
if (Engine.Debug) {
console.log("displayLocationContent() called with location " + Player.location)
}
var returnToWorld = document.getElementById("location-return-to-world-button");
var locationName = document.getElementById("location-name");
@@ -1811,7 +1807,7 @@ function initLocationButtons() {
yesBtn.innerHTML = "Purchase"; noBtn.innerHTML = "Cancel";
yesBtn.addEventListener("click", ()=>{
if (Player.money.lt(cost)) {
dialogBoxCreate("You do not have enough mone to purchase an additional CPU Core for your home computer!");
dialogBoxCreate("You do not have enough money to purchase an additional CPU Core for your home computer!");
} else {
Player.loseMoney(cost);
Player.getHomeComputer().cpuCores++;