You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
//* if upgradeCost is too low, Math.floor'ing it after multiplying it by upgradeCostMultiplier can actually just get you the same upgradeCost as before. warn in console if this will happen, but don't throw an error in case it's intended or smth stupid
Handlers.UPGRADE.getFromIdentifier(newIdentifier(this.NAMESPACE,"keyboard1")).desc=`Multiplys Keyboard and clicking ${Handlers.CURRENTLY_CLICKED.getCurrentlyClicked().name.toLowerCase()} production by 2`;
document.getElementById("allTimeCookies").innerText=`All Time ${Handlers.CURRENTLY_CLICKED.getCurrentlyClicked().namePlural}: ${makeSlightlyImperfectFloatNice(this.totalCookies)}`;
Copy file name to clipboardExpand all lines: src/ts/handlers.ts
+13Lines changed: 13 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -127,6 +127,19 @@ export class BuildingHandler extends Handler<Building> {
127
127
returnbought;
128
128
}
129
129
130
+
/**
131
+
* Iterates through every building registered to this handler and checks if it meets its own unlock condition. If it does, set its unlock status to true. If it does not, set it to false.
132
+
*/
133
+
updateBuildingsUnlocked(){
134
+
for(constvalueofthis){
135
+
if(value.condition(Game.getInstance())){
136
+
value.unlocked=true;
137
+
}else{
138
+
value.unlocked=false;
139
+
}
140
+
}
141
+
}
142
+
130
143
/**
131
144
* Dumps savedata for all registered buildings
132
145
* @param namespace Optional: if present only dump savedata from this namespace
0 commit comments