Fix for challenge mode
This commit is contained in:
@@ -3260,17 +3260,15 @@ CM.Disp.CreateStatsHeader = function(text, config) {
|
|||||||
* @returns {object} div The option object
|
* @returns {object} div The option object
|
||||||
*/
|
*/
|
||||||
CM.Disp.CreateStatsListing = function(type, name, text, placeholder) {
|
CM.Disp.CreateStatsListing = function(type, name, text, placeholder) {
|
||||||
|
var div = document.createElement('div');
|
||||||
|
div.className = 'listing';
|
||||||
|
|
||||||
|
var listingName = document.createElement('span');
|
||||||
|
listingName.textContent = name + ' '
|
||||||
|
div.appendChild(listingName);
|
||||||
if (type == "withTooltip") {
|
if (type == "withTooltip") {
|
||||||
var div = document.createElement('div');
|
|
||||||
div.className = 'listingWithTooltip';
|
div.className = 'listingWithTooltip';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
var listingName = document.createElement('span');
|
|
||||||
listingName.textContent = name + ' '
|
|
||||||
div.appendChild(listingName);
|
|
||||||
|
|
||||||
var frag = document.createDocumentFragment();
|
|
||||||
var tooltip = document.createElement('span');
|
var tooltip = document.createElement('span');
|
||||||
tooltip.onmouseout = function() { Game.tooltip.hide(); };
|
tooltip.onmouseout = function() { Game.tooltip.hide(); };
|
||||||
tooltip.onmouseover = function() {Game.tooltip.draw(this, escape(CM.Disp[placeholder].innerHTML));};
|
tooltip.onmouseover = function() {Game.tooltip.draw(this, escape(CM.Disp[placeholder].innerHTML));};
|
||||||
@@ -3285,14 +3283,12 @@ CM.Disp.CreateStatsListing = function(type, name, text, placeholder) {
|
|||||||
tooltip.style.fontSize = '9px';
|
tooltip.style.fontSize = '9px';
|
||||||
tooltip.style.verticalAlign = 'bottom';
|
tooltip.style.verticalAlign = 'bottom';
|
||||||
tooltip.textContent = '?';
|
tooltip.textContent = '?';
|
||||||
frag.appendChild(tooltip);
|
div.appendChild(tooltip);
|
||||||
frag.appendChild(document.createTextNode(' : '));
|
div.appendChild(document.createTextNode(' '));
|
||||||
div.appendChild(frag);
|
|
||||||
|
|
||||||
div.appendChild(text);
|
|
||||||
return div;
|
|
||||||
}
|
}
|
||||||
|
div.appendChild(document.createTextNode(': '));
|
||||||
|
div.appendChild(text);
|
||||||
|
return div;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -4204,7 +4200,11 @@ CM.Sim.InitialBuildingData = function(buildingName) {
|
|||||||
* so this function just returns an empty object.
|
* so this function just returns an empty object.
|
||||||
*/
|
*/
|
||||||
CM.Sim.InitUpgrade = function(upgradeName) {
|
CM.Sim.InitUpgrade = function(upgradeName) {
|
||||||
return {};
|
var me = Game.Upgrades[upgradeName];
|
||||||
|
var you = {};
|
||||||
|
you.pool = me.pool;
|
||||||
|
you.name = me.name;
|
||||||
|
return you;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Similar to the previous function, but for achievements.
|
/* Similar to the previous function, but for achievements.
|
||||||
|
|||||||
@@ -171,7 +171,11 @@ CM.Sim.InitialBuildingData = function(buildingName) {
|
|||||||
* so this function just returns an empty object.
|
* so this function just returns an empty object.
|
||||||
*/
|
*/
|
||||||
CM.Sim.InitUpgrade = function(upgradeName) {
|
CM.Sim.InitUpgrade = function(upgradeName) {
|
||||||
return {};
|
var me = Game.Upgrades[upgradeName];
|
||||||
|
var you = {};
|
||||||
|
you.pool = me.pool;
|
||||||
|
you.name = me.name;
|
||||||
|
return you;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Similar to the previous function, but for achievements.
|
/* Similar to the previous function, but for achievements.
|
||||||
|
|||||||
Reference in New Issue
Block a user