mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 06:03:50 +01:00
Added donate button. Added Netscript functions to get cost of Hacknet Node upgrades
This commit is contained in:
parent
d5be649bbd
commit
be48875ff3
@ -901,6 +901,15 @@
|
||||
<a class="a-link-button" style="display:block;" href="https://bitburner.wikia.com/wiki/Changelog" target="_blank"> Changelog </a>
|
||||
<a class="a-link-button" style="display:block;" href="https://bitburner.wikia.com" target="_blank">Wiki</a>
|
||||
<a class="a-link-button" style="display:block;", href="https://www.reddit.com/r/bitburner" target="_blank">Subreddit</a>
|
||||
|
||||
<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_blank">
|
||||
<input type="hidden" name="cmd" value="_s-xclick">
|
||||
<input type="hidden" name="encrypted" value="-----BEGIN PKCS7-----MIIHRwYJKoZIhvcNAQcEoIIHODCCBzQCAQExggEwMIIBLAIBADCBlDCBjjELMAkGA1UEBhMCVVMxCzAJBgNVBAgTAkNBMRYwFAYDVQQHEw1Nb3VudGFpbiBWaWV3MRQwEgYDVQQKEwtQYXlQYWwgSW5jLjETMBEGA1UECxQKbGl2ZV9jZXJ0czERMA8GA1UEAxQIbGl2ZV9hcGkxHDAaBgkqhkiG9w0BCQEWDXJlQHBheXBhbC5jb20CAQAwDQYJKoZIhvcNAQEBBQAEgYA2Y2VGE75oWct89z//G2YEJKmzx0uDTXNrpje9ThxmUnBLFZCY+I11Pors7lGRvFqo5okwnu41CfYMPHDxpAgyYyQndMX9pWUX0gLfBMm2BaHwsNBCwt34WmpQqj7TGsQ+aw9NbmkxiJltGnOa+6/gy10mPZAA3HxiieLeCKkGgDELMAkGBSsOAwIaBQAwgcQGCSqGSIb3DQEHATAUBggqhkiG9w0DBwQI72F1YSzHUd2AgaDMekHU3AKT93Ey9wkB3486bV+ngFSD6VOHrPweH9QATsp+PMe9QM9vmq+s2bGtTbZaYrFqM3M97SnQ0l7IQ5yuOzdZhRdfysu5uJ8dnuHUzq4gLSzqMnZ6/3c+PoHB8AS1nYHU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hbC5jb22CAQAwDAYDVR0TBAUwAwEB/zANBgkqhkiG9w0BAQUFAAOBgQCBXzpWmoBa5e9fo6ujionW1hUhPkOBakTr3YCDjbYfvJEiv/2P+IobhOGJr85+XHhN0v4gUkEDI8r2/rNk1m0GA8HKddvTjyGw/XqXa+LSTlDYkqI8OwR8GEYj4efEtcRpRYBxV8KxAW93YDWzFGvruKnnLbDAF6VR5w/cCMn5hzGCAZowggGWAgEBMIGUMIGOMQswCQYDVQQGEwJVUzELMAkGA1UECBMCQ0ExFjAUBgNVBAcTDU1vdW50YWluIFZpZXcxFDASBgNVBAoTC1BheVBhbCBJbmMuMRMwEQYDVQQLFApsaXZlX2NlcnRzMREwDwYDVQQDFAhsaXZlX2FwaTEcMBoGCSqGSIb3DQEJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTcwNzI1MDExODE2WjAjBgkqhkiG9w0BCQQxFgQUNo8efiZ7sk7nwKM/6B6Z7sU8hIIwDQYJKoZIhvcNAQEBBQAEgYB+JB4vZ/r48815/1HF/xK3+rOx7bPz3kAXmbhW/mkoF4OUbzqMeljvDIA9q/BDdlCLtxFOw9XlftTzv0eZCW/uCIiwu5wTzPIfPY1SI8WHe4cJbP2f2EYxIVs8D7OSirbW4yVa0+gACaLLj0rzIzNN8P/5PxgB03D+jwkcJABqng==-----END PKCS7-----
|
||||
">
|
||||
<input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" border="0" name="submit" alt="PayPal - The safer, easier way to pay online!">
|
||||
<img alt="" border="0" src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif" width="1" height="1">
|
||||
</form>
|
||||
|
||||
<a id="save-game-link" class="a-link-button" style="display:inline-block;width:46%;"> Save Game </a>
|
||||
<a id="delete-game-link" class="a-link-button" style="display:inline-block;width:46%;"> Delete Game </a>
|
||||
<a id="export-game-link" class="a-link-button" style="display:inline-block;width:46%;"> Export Game </a>
|
||||
|
@ -678,6 +678,10 @@ CONSTANTS = {
|
||||
"World Stock Exchange account and TIX API Access<br>",
|
||||
|
||||
LatestUpdate:
|
||||
"V0.26.1<br>" +
|
||||
"-Added autocompletion for aliases<br>" +
|
||||
"Added getServerRam() Netscript function()<br>" +
|
||||
"Added getLevelUpgradeCost(n), getRamUpgradeCost(), getCoreUpgradeCost() functions for Netscript Hacknet Node API<br>" +
|
||||
"v0.26.0<br>" +
|
||||
"-Game now has a real ending, although it's not very interesting/satisfying right now. It sets up the framework for the secondary prestige system " +
|
||||
"in the future<br>" +
|
||||
|
@ -71,6 +71,11 @@ HacknetNode.prototype.calculateLevelUpgradeCost = function(levels=1) {
|
||||
return CONSTANTS.BaseCostForHacknetNode / 2 * totalMultiplier * Player.hacknet_node_level_cost_mult;
|
||||
}
|
||||
|
||||
//Wrapper function for Netscript
|
||||
HacknetNode.prototype.getLevelUpgradeCost = function(levels=1) {
|
||||
return this.calculateLevelUpgradeCost(levels);
|
||||
}
|
||||
|
||||
HacknetNode.prototype.purchaseLevelUpgrade = function(levels=1) {
|
||||
var cost = this.calculateLevelUpgradeCost(levels);
|
||||
if (isNaN(cost)) {return false;}
|
||||
@ -100,6 +105,11 @@ HacknetNode.prototype.calculateRamUpgradeCost = function() {
|
||||
return baseCost * mult * Player.hacknet_node_ram_cost_mult;
|
||||
}
|
||||
|
||||
//Wrapper function for Netscript
|
||||
HacknetNode.prototype.getRamUpgradeCost = function() {
|
||||
return this.calculateRamUpgradeCost();
|
||||
}
|
||||
|
||||
HacknetNode.prototype.purchaseRamUpgrade = function() {
|
||||
var cost = this.calculateRamUpgradeCost();
|
||||
if (isNaN(cost)) {return false;}
|
||||
@ -122,6 +132,11 @@ HacknetNode.prototype.calculateCoreUpgradeCost = function() {
|
||||
return coreBaseCost * Math.pow(mult, this.cores-1) * Player.hacknet_node_core_cost_mult;
|
||||
}
|
||||
|
||||
//Wrapper function for Netscript
|
||||
HacknetNode.prototype.getCoreUpgradeCost = function() {
|
||||
return this.calculateCoreUpgradeCost();
|
||||
}
|
||||
|
||||
HacknetNode.prototype.purchaseCoreUpgrade = function() {
|
||||
var cost = this.calculateCoreUpgradeCost();
|
||||
if (isNaN(cost)) {return false;}
|
||||
|
Loading…
Reference in New Issue
Block a user