mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 17:23:00 +02:00
Added documentation for Bladeburner API. Fixed typo in BN-7 description.
This commit is contained in:
Vendored
+19
-18
@@ -12181,7 +12181,7 @@ function initBitNodes() {
|
||||
"Corporations have 80% lower valuations and are therefore less profitable<br>" +
|
||||
"Working for companies is 50% less profitable<br>" +
|
||||
"Crimes and Infiltration are 50% less profitable<br><br>" +
|
||||
"Destroying this BitNode will give you Source-File 6, or if you already have this Source-File it will upgrade " +
|
||||
"Destroying this BitNode will give you Source-File 7, or if you already have this Source-File it will upgrade " +
|
||||
"its level up to a maximum of 3. This Source-File allows you to access the Bladeburner Netscript API in other " +
|
||||
"BitNodes. In addition, this Source-File will increase all of your Bladeburner multipliers by:<br><br>" +
|
||||
"Level 1: 8%<br>" +
|
||||
@@ -29173,6 +29173,7 @@ Bladeburner.prototype.getActionIdFromTypeAndName = function(type="", name="") {
|
||||
switch (convertedType) {
|
||||
case "contract":
|
||||
case "contracts":
|
||||
case "contr":
|
||||
action.type = ActionTypes["Contract"];
|
||||
if (this.contracts.hasOwnProperty(name)) {
|
||||
action.name = name;
|
||||
@@ -29233,23 +29234,23 @@ Bladeburner.prototype.getActionIdFromTypeAndName = function(type="", name="") {
|
||||
}
|
||||
}
|
||||
|
||||
Bladeburner.prototype.getContractNamesNetscriptFn = function(name) {
|
||||
Bladeburner.prototype.getContractNamesNetscriptFn = function() {
|
||||
return Object.keys(this.contracts);
|
||||
}
|
||||
|
||||
Bladeburner.prototype.getOperationNamesNetscriptFn = function(name) {
|
||||
Bladeburner.prototype.getOperationNamesNetscriptFn = function() {
|
||||
return Object.keys(this.operations);
|
||||
}
|
||||
|
||||
Bladeburner.prototype.getBlackOpNamesNetscriptFn = function(name) {
|
||||
Bladeburner.prototype.getBlackOpNamesNetscriptFn = function() {
|
||||
return Object.keys(BlackOperations);
|
||||
}
|
||||
|
||||
Bladeburner.prototype.getGeneralActionNamesNetscriptFn = function(name) {
|
||||
Bladeburner.prototype.getGeneralActionNamesNetscriptFn = function() {
|
||||
return Object.keys(GeneralActions);
|
||||
}
|
||||
|
||||
Bladeburner.prototype.getSkillNamesNetscriptFn = function(name) {
|
||||
Bladeburner.prototype.getSkillNamesNetscriptFn = function() {
|
||||
return Object.keys(Skills);
|
||||
}
|
||||
|
||||
@@ -29474,8 +29475,8 @@ Bladeburner.prototype.setTeamSizeNetscriptFn = function(type, name, size, worker
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (actionId.type !== ActionTypes["Operation"] ||
|
||||
actionId.type !== ActionTypes["BlackOp"] ||
|
||||
if (actionId.type !== ActionTypes["Operation"] &&
|
||||
actionId.type !== ActionTypes["BlackOp"] &&
|
||||
actionId.type !== ActionTypes["BlackOperation"]) {
|
||||
workerScript.log("ERROR: Bladeburner.setTeamSize() failed. This function " +
|
||||
"only works for Operations and BlackOps");
|
||||
@@ -33907,57 +33908,57 @@ function NetscriptFunctions(workerScript) {
|
||||
|
||||
//Bladeburner API
|
||||
bladeburner : {
|
||||
getContractNames : function(name) {
|
||||
getContractNames : function() {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("getContractNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
}
|
||||
updateDynamicRam("getContractNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getContractNamesNetscriptFn(name);
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getContractNamesNetscriptFn();
|
||||
}
|
||||
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getContractNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
|
||||
"at the Bladeburner division or because you do not have Source-File 7");
|
||||
},
|
||||
getOperationNames : function(name) {
|
||||
getOperationNames : function() {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("getOperationNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
}
|
||||
updateDynamicRam("getOperationNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getOperationNamesNetscriptFn(name);
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getOperationNamesNetscriptFn();
|
||||
}
|
||||
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getOperationNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
|
||||
"at the Bladeburner division or because you do not have Source-File 7");
|
||||
},
|
||||
getBlackOpNames : function(name) {
|
||||
getBlackOpNames : function() {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("getBlackOpNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
}
|
||||
updateDynamicRam("getBlackOpNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getBlackOpNamesNetscriptFn(name);
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getBlackOpNamesNetscriptFn();
|
||||
}
|
||||
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getBlackOpNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
|
||||
"at the Bladeburner division or because you do not have Source-File 7");
|
||||
},
|
||||
getGeneralActionNames : function(name) {
|
||||
getGeneralActionNames : function() {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("getGeneralActionNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
}
|
||||
updateDynamicRam("getGeneralActionNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getGeneralActionNamesNetscriptFn(name);
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getGeneralActionNamesNetscriptFn();
|
||||
}
|
||||
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getGeneralActionNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
|
||||
"at the Bladeburner division or because you do not have Source-File 7");
|
||||
},
|
||||
getSkillNames : function(name) {
|
||||
getSkillNames : function() {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("getSkillNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
}
|
||||
updateDynamicRam("getSkillNames", _Constants_js__WEBPACK_IMPORTED_MODULE_6__["CONSTANTS"].ScriptBladeburnerApiBaseRamCost / 10);
|
||||
if (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner instanceof _Bladeburner_js__WEBPACK_IMPORTED_MODULE_4__["Bladeburner"] && (_Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bitNodeN === 7 || hasBladeburner2079SF)) {
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getSkillNamesNetscriptFn(name);
|
||||
return _Player_js__WEBPACK_IMPORTED_MODULE_16__["Player"].bladeburner.getSkillNamesNetscriptFn();
|
||||
}
|
||||
throw Object(_NetscriptEvaluator_js__WEBPACK_IMPORTED_MODULE_25__["makeRuntimeRejectMsg"])(workerScript, "getSkillNames() failed because you do not currently have access to the Bladeburner API. This is either because you are not currently employed " +
|
||||
"at the Bladeburner division or because you do not have Source-File 7");
|
||||
|
||||
Reference in New Issue
Block a user