mirror of
https://github.com/wassname/cardsforscience.git
synced 2026-06-27 17:29:55 +08:00
Fix small errors. Some content was not displayed correctly.
This commit is contained in:
+2
-2
@@ -92,8 +92,8 @@
|
||||
<img ng-hide="r.state.level > 0" class="pull-left media-object" src="assets/icons/png/unknown.png" alt="">
|
||||
<div class="media-body">
|
||||
<h4 class="media-heading">{{ r.state.level > 0 ? r.name : '?????' }} <span ng-show="r.state.level > 0" class="badge">Level {{ r.state.level }}</span></h4>
|
||||
<p ng-show="r.level > 0">{{ r.description }}</p>
|
||||
<p ng-show="r.level > 0" class="small">Research yields <strong>{{ r.state.reputation | niceNumber }}</strong> reputation.</p>
|
||||
<p ng-show="r.state.level > 0">{{ r.description }}</p>
|
||||
<p ng-show="r.state.level > 0" class="small">Research yields <strong>{{ r.state.reputation | niceNumber }}</strong> reputation.</p>
|
||||
<div class="btn-group">
|
||||
<button class="btn btn-primary" ng-disabled="!rc.isAvailable(r)" ng-click="rc.doResearch(r)">Research <small>({{ r.state.cost | niceNumber }} data)</small></button>
|
||||
<button class="btn btn-info {{ r.state.interesting ? 'blink' : '' }}" ng-show="r.state.level > 0" ng-click="rc.showInfo(r)"><i class="fa fa-exclamation"></i></button>
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
var workers = game.workers;
|
||||
var upgrades = game.upgrades;
|
||||
var achievements = game.achievements;
|
||||
var allObjects = game.allObjects;
|
||||
|
||||
UI.validateVersion(lab.version);
|
||||
|
||||
@@ -103,13 +104,13 @@
|
||||
app.controller('UpgradesController', function() {
|
||||
this.upgrades = upgrades;
|
||||
this.isVisible = function(upgrade) {
|
||||
return upgrade.isVisible(lab);
|
||||
return upgrade.isVisible(lab, allObjects);
|
||||
};
|
||||
this.isAvailable = function(upgrade) {
|
||||
return upgrade.isAvailable(lab);
|
||||
return upgrade.isAvailable(lab, allObjects);
|
||||
};
|
||||
this.upgrade = function(upgrade) {
|
||||
if (upgrade.buy(lab)) {
|
||||
if (upgrade.buy(lab, allObjects)) {
|
||||
UI.showUpdateValue("#update-funding", upgrade.cost);
|
||||
}
|
||||
}
|
||||
|
||||
+6
-6
@@ -188,22 +188,22 @@ var GameObjects = (function() {
|
||||
return true;
|
||||
};
|
||||
|
||||
Upgrade.prototype.isAvailable = function(lab) {
|
||||
if (!lab) {
|
||||
Upgrade.prototype.isAvailable = function(lab, allObjects) {
|
||||
if (!lab || !allObjects) {
|
||||
return false;
|
||||
}
|
||||
return !this.state.used && lab.state.money >= this.cost &&
|
||||
this.meetsRequirements();
|
||||
this.meetsRequirements(allObjects);
|
||||
};
|
||||
|
||||
Upgrade.prototype.isVisible = function(lab) {
|
||||
if (!lab) {
|
||||
Upgrade.prototype.isVisible = function(lab, allObjects) {
|
||||
if (!lab || !allObjects) {
|
||||
return false;
|
||||
}
|
||||
if (!this.state.used &&
|
||||
(this.state.visible ||
|
||||
lab.state.money >= this.cost * GLOBAL_VISIBILITY_THRESHOLD &&
|
||||
this.meetsRequirements())) {
|
||||
this.meetsRequirements(allObjects))) {
|
||||
this._visible = true;
|
||||
return true;
|
||||
}
|
||||
|
||||
+10
-10
@@ -6,8 +6,8 @@
|
||||
"effect": "PhD Students produce twice as much data per second.",
|
||||
"icon": "fa-group",
|
||||
"cost": 100,
|
||||
"targets": [{"key": "PhD Students", "property": "rate"}],
|
||||
"requirements": [{"key": "PhD Students", "property": "hired", "threshold": 1}],
|
||||
"targets": [{"key": "workers-phdstudents", "property": "rate"}],
|
||||
"requirements": [{"key": "workers-phdstudents", "property": "hired", "threshold": 1}],
|
||||
"factor": 2,
|
||||
"constant": 0
|
||||
},
|
||||
@@ -18,8 +18,8 @@
|
||||
"effect": "PhD Students produce twice as much data per second.",
|
||||
"icon": "fa-group",
|
||||
"cost": 10000,
|
||||
"targets": [{"key": "PhD Students", "property": "rate"}],
|
||||
"requirements": [{"key": "Thesis supervision", "property": "_used", "threshold": 1}],
|
||||
"targets": [{"key": "workers-phdstudents", "property": "rate"}],
|
||||
"requirements": [{"key": "upgrade-thesissupervision", "property": "_used", "threshold": 1}],
|
||||
"factor": 2
|
||||
},
|
||||
{
|
||||
@@ -30,12 +30,12 @@
|
||||
"icon": "fa-group",
|
||||
"cost": 1e6,
|
||||
"targets": [
|
||||
{"key": "PhD Students", "property": "rate"},
|
||||
{"key": "Postdocs", "property": "rate"},
|
||||
{"key": "Research Fellows", "property": "rate"},
|
||||
{"key": "Tenured Professors", "property": "rate"},
|
||||
{"key": "Nobel Prize Winners", "property": "rate"},
|
||||
{"key": "Summer Students", "property": "rate"}
|
||||
{"key": "workers-phdstudents", "property": "rate"},
|
||||
{"key": "workers-postdocs", "property": "rate"},
|
||||
{"key": "workers-fellows", "property": "rate"},
|
||||
{"key": "workers-profs", "property": "rate"},
|
||||
{"key": "workers-nobel", "property": "rate"},
|
||||
{"key": "workers-summies", "property": "rate"}
|
||||
],
|
||||
"requirements": [],
|
||||
"factor": 2
|
||||
|
||||
Reference in New Issue
Block a user