Fixed Infiltration exp display bug. Set cursor: pointer css styling for main menu

This commit is contained in:
danielyxie 2018-09-29 13:58:32 -05:00
parent fdc98f43d4
commit 1d20d475f3
3 changed files with 16 additions and 24 deletions

@ -29,6 +29,7 @@
padding: 12px 8px; padding: 12px 8px;
text-decoration: none; text-decoration: none;
cursor: pointer;
width: 100%; width: 100%;
text-align: left; text-align: left;
} }

@ -508,13 +508,15 @@ let CONSTANTS = {
` `
v0.40.4<br> v0.40.4<br>
* Added new Coding Contracts mechanic. Solve programming problems to earn rewards * Added new Coding Contracts mechanic. Solve programming problems to earn rewards
* (TODO NEEDS DOCUMENTATION) The write() and read() Netscript functions now work on scripts * The write() and read() Netscript functions now work on scripts
* Added wget() Netscript function
* Added bladeburner.getActionRepGain() function to the Netscript Bladeburner API * Added bladeburner.getActionRepGain() function to the Netscript Bladeburner API
* The getLevelUpgradeCost(), getRamUpgradeCost(), and getCoreUpgradeCost() functions in the Hacknet API now return Infinity if the node is at max level. See documentation * The getLevelUpgradeCost(), getRamUpgradeCost(), and getCoreUpgradeCost() functions in the Hacknet API now return Infinity if the node is at max level. See documentation
* It is now possible to use freely use angled bracket (<, >) and create DOM elements using tprint() * It is now possible to use freely use angled bracket (<, >) and create DOM elements using tprint()
* The game's theme colors can now be set through the Terminal configuration (.fconf). * The game's theme colors can now be set through the Terminal configuration (.fconf).
* You can now switch to the old left-hand main menu bar through the Terminal configuration (.fconf) * You can now switch to the old left-hand main menu bar through the Terminal configuration (.fconf)
* grow() percentage is no longer reported as Infinity when a server's money is grown from 0 to X * Bug Fix: grow() percentage is no longer reported as Infinity when a server's money is grown from 0 to X
* Bug Fix: Infiltration popup now displays the correct amount of exp gained
` `
} }

@ -37,20 +37,21 @@ function infiltrationBoxCreate(inst) {
Player.gainCharismaExp(inst.chaExpGained * expMultiplier); Player.gainCharismaExp(inst.chaExpGained * expMultiplier);
Player.gainIntelligenceExp(inst.intExpGained * expMultiplier); Player.gainIntelligenceExp(inst.intExpGained * expMultiplier);
const expGainText = ["You gained:",
`${formatNumber(inst.hackingExpGained * expMultiplier, 3)} hacking exp`,
`${formatNumber(inst.strExpGained * expMultiplier, 3)} str exp`,
`${formatNumber(inst.defExpGained * expMultiplier, 3)} def exp`,
`${formatNumber(inst.dexExpGained * expMultiplier, 3)} dex exp`,
`${formatNumber(inst.agiExpGained * expMultiplier, 3)} agi exp`,
`${formatNumber(inst.chaExpGained * expMultiplier, 3)} cha exp`].join("\n");
var totalValue = 0; var totalValue = 0;
for (var i = 0; i < inst.secretsStolen.length; ++i) { for (var i = 0; i < inst.secretsStolen.length; ++i) {
totalValue += inst.secretsStolen[i]; totalValue += inst.secretsStolen[i];
} }
if (totalValue == 0) { if (totalValue == 0) {
dialogBoxCreate("You successfully escaped the facility but you did not steal " + dialogBoxCreate("You successfully escaped the facility but you did not steal " +
"anything of worth when infiltrating.<br><br>" + "anything of worth when infiltrating.<br><br>" + expGainText);
"You gained:<br>" +
formatNumber(inst.hackingExpGained, 3) + " hacking exp<br>" +
formatNumber(inst.strExpGained, 3) + " str exp<br>" +
formatNumber(inst.defExpGained, 3) + " def exp<br>" +
formatNumber(inst.dexExpGained, 3) + " dex exp<br>" +
formatNumber(inst.agiExpGained, 3) + " agi exp<br>" +
formatNumber(inst.chaExpGained, 3) + " cha exp<br>");
return; return;
} }
var facValue = totalValue * Player.faction_rep_mult * var facValue = totalValue * Player.faction_rep_mult *
@ -86,13 +87,7 @@ function infiltrationBoxCreate(inst) {
Player.gainMoney(moneyValue); Player.gainMoney(moneyValue);
dialogBoxCreate("You sold the classified information you stole from " + inst.companyName + dialogBoxCreate("You sold the classified information you stole from " + inst.companyName +
" for <span class='money-gold'>$" + formatNumber(moneyValue, 2) + "</span> on the black market!<br><br>" + " for <span class='money-gold'>$" + formatNumber(moneyValue, 2) + "</span> on the black market!<br><br>" +
"You gained:<br>" + expGainText);
formatNumber(inst.hackingExpGained, 3) + " hacking exp<br>" +
formatNumber(inst.strExpGained, 3) + " str exp<br>" +
formatNumber(inst.defExpGained, 3) + " def exp<br>" +
formatNumber(inst.dexExpGained, 3) + " dex exp<br>" +
formatNumber(inst.agiExpGained, 3) + " agi exp<br>" +
formatNumber(inst.chaExpGained, 3) + " cha exp<br>");
infiltrationBoxClose(); infiltrationBoxClose();
return false; return false;
}); });
@ -112,13 +107,7 @@ function infiltrationBoxCreate(inst) {
faction.playerReputation += facValue; faction.playerReputation += facValue;
dialogBoxCreate("You gave the classified information you stole from " + inst.companyName + dialogBoxCreate("You gave the classified information you stole from " + inst.companyName +
" to " + facName + " and gained <span class='light-yellow'>" + formatNumber(facValue, 3) + " reputation</span> with the faction. <br><br>" + " to " + facName + " and gained <span class='light-yellow'>" + formatNumber(facValue, 3) + " reputation</span> with the faction. <br><br>" +
"You gained:<br>" + expGainText);
formatNumber(inst.hackingExpGained, 3) + " hacking exp<br>" +
formatNumber(inst.strExpGained, 3) + " str exp<br>" +
formatNumber(inst.defExpGained, 3) + " def exp<br>" +
formatNumber(inst.dexExpGained, 3) + " dex exp<br>" +
formatNumber(inst.agiExpGained, 3) + " agi exp<br>" +
formatNumber(inst.chaExpGained, 3) + " cha exp<br>");
infiltrationBoxClose(); infiltrationBoxClose();
return false; return false;
}); });