mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-18 05:33:54 +01:00
Fixed bugs with new Singularity Functions
This commit is contained in:
parent
7a05d3585a
commit
ff5359dc3d
55
dist/bundle.js
vendored
55
dist/bundle.js
vendored
@ -1666,7 +1666,7 @@ PlayerObject.prototype.applyForJob = function(entryPosType, sing=false) {
|
|||||||
var pos = entryPosType;
|
var pos = entryPosType;
|
||||||
|
|
||||||
if (!this.isQualified(company, pos)) {
|
if (!this.isQualified(company, pos)) {
|
||||||
var reqText = Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["e" /* getJobRequirementText */])(company, pos);
|
var reqText = Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["f" /* getJobRequirementText */])(company, pos);
|
||||||
if (sing) {return false;}
|
if (sing) {return false;}
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_14__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Unforunately, you do not qualify for this position<br>" + reqText);
|
Object(__WEBPACK_IMPORTED_MODULE_14__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Unforunately, you do not qualify for this position<br>" + reqText);
|
||||||
return;
|
return;
|
||||||
@ -1674,7 +1674,7 @@ PlayerObject.prototype.applyForJob = function(entryPosType, sing=false) {
|
|||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
if (__WEBPACK_IMPORTED_MODULE_6__engine_js__["Engine"].Debug) {console.log("Determining qualification for next Company Position");}
|
if (__WEBPACK_IMPORTED_MODULE_6__engine_js__["Engine"].Debug) {console.log("Determining qualification for next Company Position");}
|
||||||
var newPos = Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["f" /* getNextCompanyPosition */])(pos);
|
var newPos = Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["g" /* getNextCompanyPosition */])(pos);
|
||||||
if (newPos == null) {break;}
|
if (newPos == null) {break;}
|
||||||
|
|
||||||
//Check if this company has this position
|
//Check if this company has this position
|
||||||
@ -1693,13 +1693,13 @@ PlayerObject.prototype.applyForJob = function(entryPosType, sing=false) {
|
|||||||
if (currCompany != "") {
|
if (currCompany != "") {
|
||||||
if (currCompany.companyName == company.companyName &&
|
if (currCompany.companyName == company.companyName &&
|
||||||
pos.positionName == currPositionName) {
|
pos.positionName == currPositionName) {
|
||||||
var nextPos = Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["f" /* getNextCompanyPosition */])(pos);
|
var nextPos = Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["g" /* getNextCompanyPosition */])(pos);
|
||||||
if (nextPos == null) {
|
if (nextPos == null) {
|
||||||
if (sing) {return false;}
|
if (sing) {return false;}
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_14__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You are already at the highest position for your field! No promotion available");
|
Object(__WEBPACK_IMPORTED_MODULE_14__utils_DialogBox_js__["a" /* dialogBoxCreate */])("You are already at the highest position for your field! No promotion available");
|
||||||
} else if (company.hasPosition(nextPos)) {
|
} else if (company.hasPosition(nextPos)) {
|
||||||
if (sing) {return false;}
|
if (sing) {return false;}
|
||||||
var reqText = Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["e" /* getJobRequirementText */])(company, nextPos);
|
var reqText = Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["f" /* getJobRequirementText */])(company, nextPos);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_14__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Unfortunately, you do not qualify for a promotion<br>" + reqText);
|
Object(__WEBPACK_IMPORTED_MODULE_14__utils_DialogBox_js__["a" /* dialogBoxCreate */])("Unfortunately, you do not qualify for a promotion<br>" + reqText);
|
||||||
} else {
|
} else {
|
||||||
if (sing) {return false;}
|
if (sing) {return false;}
|
||||||
@ -1762,7 +1762,7 @@ PlayerObject.prototype.getNextCompanyPosition = function(company, entryPosType)
|
|||||||
(this.companyPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob()) ||
|
(this.companyPosition.isSoftwareConsultantJob() && entryPosType.isSoftwareConsultantJob()) ||
|
||||||
(this.companyPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob()) ||
|
(this.companyPosition.isBusinessConsultantJob() && entryPosType.isBusinessConsultantJob()) ||
|
||||||
(this.companyPosition.isPartTimeJob() && entryPosType.isPartTimeJob())) {
|
(this.companyPosition.isPartTimeJob() && entryPosType.isPartTimeJob())) {
|
||||||
return Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["f" /* getNextCompanyPosition */])(this.companyPosition);
|
return Object(__WEBPACK_IMPORTED_MODULE_2__Company_js__["g" /* getNextCompanyPosition */])(this.companyPosition);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -4494,7 +4494,7 @@ let Engine = {
|
|||||||
Engine.start(); //Run main game loop and Scripts loop
|
Engine.start(); //Run main game loop and Scripts loop
|
||||||
__WEBPACK_IMPORTED_MODULE_21__Player_js__["a" /* Player */].init();
|
__WEBPACK_IMPORTED_MODULE_21__Player_js__["a" /* Player */].init();
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_26__Server_js__["f" /* initForeignServers */])();
|
Object(__WEBPACK_IMPORTED_MODULE_26__Server_js__["f" /* initForeignServers */])();
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_9__Company_js__["g" /* initCompanies */])();
|
Object(__WEBPACK_IMPORTED_MODULE_9__Company_js__["h" /* initCompanies */])();
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_12__Faction_js__["f" /* initFactions */])();
|
Object(__WEBPACK_IMPORTED_MODULE_12__Faction_js__["f" /* initFactions */])();
|
||||||
__WEBPACK_IMPORTED_MODULE_9__Company_js__["d" /* CompanyPositions */].init();
|
__WEBPACK_IMPORTED_MODULE_9__Company_js__["d" /* CompanyPositions */].init();
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_7__Augmentations_js__["g" /* initAugmentations */])();
|
Object(__WEBPACK_IMPORTED_MODULE_7__Augmentations_js__["g" /* initAugmentations */])();
|
||||||
@ -19975,7 +19975,7 @@ function setJobRequirementTooltip(loc, entryPosType, btn) {
|
|||||||
var pos = __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].getNextCompanyPosition(company, entryPosType);
|
var pos = __WEBPACK_IMPORTED_MODULE_5__Player_js__["a" /* Player */].getNextCompanyPosition(company, entryPosType);
|
||||||
if (pos == null) {return};
|
if (pos == null) {return};
|
||||||
if (!company.hasPosition(pos)) {return;}
|
if (!company.hasPosition(pos)) {return;}
|
||||||
var reqText = Object(__WEBPACK_IMPORTED_MODULE_0__Company_js__["e" /* getJobRequirementText */])(company, pos, true);
|
var reqText = Object(__WEBPACK_IMPORTED_MODULE_0__Company_js__["f" /* getJobRequirementText */])(company, pos, true);
|
||||||
btn.innerHTML += "<span class='tooltiptext'>" + reqText + "</span>";
|
btn.innerHTML += "<span class='tooltiptext'>" + reqText + "</span>";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -21993,13 +21993,14 @@ function giveAllAugmentations() {
|
|||||||
|
|
||||||
"use strict";
|
"use strict";
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return CompanyPositions; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "d", function() { return CompanyPositions; });
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return initCompanies; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return initCompanies; });
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Companies; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "a", function() { return Companies; });
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return getJobRequirementText; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getJobRequirementText; });
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "f", function() { return getNextCompanyPosition; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "g", function() { return getNextCompanyPosition; });
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "h", function() { return loadCompanies; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "i", function() { return loadCompanies; });
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Company; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "b", function() { return Company; });
|
||||||
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CompanyPosition; });
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "c", function() { return CompanyPosition; });
|
||||||
|
/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, "e", function() { return companyExists; });
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_0__Constants_js__ = __webpack_require__(3);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Location_js__ = __webpack_require__(15);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_1__Location_js__ = __webpack_require__(15);
|
||||||
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Player_js__ = __webpack_require__(0);
|
/* harmony import */ var __WEBPACK_IMPORTED_MODULE_2__Player_js__ = __webpack_require__(0);
|
||||||
@ -33824,7 +33825,7 @@ function prestigeAugmentation() {
|
|||||||
Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["f" /* initFactions */])(); //Factions must be initialized before augmentations
|
Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["f" /* initFactions */])(); //Factions must be initialized before augmentations
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_1__Augmentations_js__["g" /* initAugmentations */])(); //Calls reapplyAllAugmentations() and resets Player multipliers
|
Object(__WEBPACK_IMPORTED_MODULE_1__Augmentations_js__["g" /* initAugmentations */])(); //Calls reapplyAllAugmentations() and resets Player multipliers
|
||||||
__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].reapplyAllSourceFiles();
|
__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].reapplyAllSourceFiles();
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_3__Company_js__["g" /* initCompanies */])();
|
Object(__WEBPACK_IMPORTED_MODULE_3__Company_js__["h" /* initCompanies */])();
|
||||||
|
|
||||||
//Clear terminal
|
//Clear terminal
|
||||||
$("#terminal tr:not(:last)").remove();
|
$("#terminal tr:not(:last)").remove();
|
||||||
@ -33941,7 +33942,7 @@ function prestigeSourceFile() {
|
|||||||
Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["f" /* initFactions */])(); //Factions must be initialized before augmentations
|
Object(__WEBPACK_IMPORTED_MODULE_6__Faction_js__["f" /* initFactions */])(); //Factions must be initialized before augmentations
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_1__Augmentations_js__["g" /* initAugmentations */])(); //Calls reapplyAllAugmentations() and resets Player multipliers
|
Object(__WEBPACK_IMPORTED_MODULE_1__Augmentations_js__["g" /* initAugmentations */])(); //Calls reapplyAllAugmentations() and resets Player multipliers
|
||||||
__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].reapplyAllSourceFiles();
|
__WEBPACK_IMPORTED_MODULE_10__Player_js__["a" /* Player */].reapplyAllSourceFiles();
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_3__Company_js__["g" /* initCompanies */])();
|
Object(__WEBPACK_IMPORTED_MODULE_3__Company_js__["h" /* initCompanies */])();
|
||||||
|
|
||||||
//Clear terminal
|
//Clear terminal
|
||||||
$("#terminal tr:not(:last)").remove();
|
$("#terminal tr:not(:last)").remove();
|
||||||
@ -35606,6 +35607,14 @@ function NetscriptFunctions(workerScript) {
|
|||||||
costMult = 10;
|
costMult = 10;
|
||||||
expMult = 7.5;
|
expMult = 7.5;
|
||||||
break;
|
break;
|
||||||
|
case __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].VolhavenMilleniumFitnessGym:
|
||||||
|
if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].city != __WEBPACK_IMPORTED_MODULE_7__Location_js__["a" /* Locations */].Volhaven) {
|
||||||
|
workerScript.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
costMult = 3;
|
||||||
|
expMult = 2.5;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
workerScript.scriptRef.log("Invalid gym name: " + gymName + ". gymWorkout() failed");
|
workerScript.scriptRef.log("Invalid gym name: " + gymName + ". gymWorkout() failed");
|
||||||
return false;
|
return false;
|
||||||
@ -35871,6 +35880,11 @@ function NetscriptFunctions(workerScript) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Object(__WEBPACK_IMPORTED_MODULE_1__Company_js__["e" /* companyExists */])(companyName)) {
|
||||||
|
workerScript.scriptRef.log("ERROR: applyToCompany failed because specified company " + companyName + " does not exist.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].location = companyName;
|
__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].location = companyName;
|
||||||
var res;
|
var res;
|
||||||
switch (field.toLowerCase()) {
|
switch (field.toLowerCase()) {
|
||||||
@ -35997,6 +36011,11 @@ function NetscriptFunctions(workerScript) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].factions.includes(name)) {
|
||||||
|
workerScript.scriptRef.log("ERROR: workForFaction() failed because you are not a member of " + name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].isWorking) {
|
if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].isWorking) {
|
||||||
var txt = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].singularityStopWork();
|
var txt = __WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].singularityStopWork();
|
||||||
workerScript.scriptRef.log(txt);
|
workerScript.scriptRef.log(txt);
|
||||||
@ -36058,6 +36077,7 @@ function NetscriptFunctions(workerScript) {
|
|||||||
default:
|
default:
|
||||||
workerScript.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): " + type);
|
workerScript.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): " + type);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
getFactionRep(name) {
|
getFactionRep(name) {
|
||||||
if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) {
|
if (__WEBPACK_IMPORTED_MODULE_8__Player_js__["a" /* Player */].bitNodeN != 4) {
|
||||||
@ -36215,6 +36235,11 @@ function NetscriptFunctions(workerScript) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fac.playerReputation < aug.baseRepRequirement) {
|
||||||
|
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you do not have enough reputation with " + fac.name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var res = Object(__WEBPACK_IMPORTED_MODULE_5__Faction_js__["k" /* purchaseAugmentation */])(aug, fac, true);
|
var res = Object(__WEBPACK_IMPORTED_MODULE_5__Faction_js__["k" /* purchaseAugmentation */])(aug, fac, true);
|
||||||
workerScript.scriptRef.log(res);
|
workerScript.scriptRef.log(res);
|
||||||
if (Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["d" /* isString */])(res) && res.startsWith("You purchased")) {
|
if (Object(__WEBPACK_IMPORTED_MODULE_20__utils_StringHelperFunctions_js__["d" /* isString */])(res) && res.startsWith("You purchased")) {
|
||||||
@ -43410,7 +43435,7 @@ function loadGame(saveObj) {
|
|||||||
|
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_8__Player_js__["b" /* loadPlayer */])(saveObj.PlayerSave);
|
Object(__WEBPACK_IMPORTED_MODULE_8__Player_js__["b" /* loadPlayer */])(saveObj.PlayerSave);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["g" /* loadAllServers */])(saveObj.AllServersSave);
|
Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["g" /* loadAllServers */])(saveObj.AllServersSave);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_1__Company_js__["h" /* loadCompanies */])(saveObj.CompaniesSave);
|
Object(__WEBPACK_IMPORTED_MODULE_1__Company_js__["i" /* loadCompanies */])(saveObj.CompaniesSave);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_4__Faction_js__["i" /* loadFactions */])(saveObj.FactionsSave);
|
Object(__WEBPACK_IMPORTED_MODULE_4__Faction_js__["i" /* loadFactions */])(saveObj.FactionsSave);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_12__SpecialServerIps_js__["d" /* loadSpecialServerIps */])(saveObj.SpecialServerIpsSave);
|
Object(__WEBPACK_IMPORTED_MODULE_12__SpecialServerIps_js__["d" /* loadSpecialServerIps */])(saveObj.SpecialServerIpsSave);
|
||||||
|
|
||||||
@ -43598,7 +43623,7 @@ function loadImportedGame(saveObj, saveString) {
|
|||||||
|
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_8__Player_js__["b" /* loadPlayer */])(saveObj.PlayerSave);
|
Object(__WEBPACK_IMPORTED_MODULE_8__Player_js__["b" /* loadPlayer */])(saveObj.PlayerSave);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["g" /* loadAllServers */])(saveObj.AllServersSave);
|
Object(__WEBPACK_IMPORTED_MODULE_10__Server_js__["g" /* loadAllServers */])(saveObj.AllServersSave);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_1__Company_js__["h" /* loadCompanies */])(saveObj.CompaniesSave);
|
Object(__WEBPACK_IMPORTED_MODULE_1__Company_js__["i" /* loadCompanies */])(saveObj.CompaniesSave);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_4__Faction_js__["i" /* loadFactions */])(saveObj.FactionsSave);
|
Object(__WEBPACK_IMPORTED_MODULE_4__Faction_js__["i" /* loadFactions */])(saveObj.FactionsSave);
|
||||||
Object(__WEBPACK_IMPORTED_MODULE_12__SpecialServerIps_js__["d" /* loadSpecialServerIps */])(saveObj.SpecialServerIpsSave);
|
Object(__WEBPACK_IMPORTED_MODULE_12__SpecialServerIps_js__["d" /* loadSpecialServerIps */])(saveObj.SpecialServerIpsSave);
|
||||||
|
|
||||||
|
@ -1146,4 +1146,5 @@ function getJobRequirementText(company, pos, tooltiptext=false) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export {CompanyPositions, initCompanies, Companies, getJobRequirementText,
|
export {CompanyPositions, initCompanies, Companies, getJobRequirementText,
|
||||||
getNextCompanyPosition, loadCompanies, Company, CompanyPosition};
|
getNextCompanyPosition, loadCompanies, Company, CompanyPosition,
|
||||||
|
companyExists};
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import {Augmentations, Augmentation,
|
import {Augmentations, Augmentation,
|
||||||
augmentationExists, installAugmentations} from "./Augmentations.js";
|
augmentationExists, installAugmentations} from "./Augmentations.js";
|
||||||
import {Companies, Company, CompanyPosition,
|
import {Companies, Company, CompanyPosition,
|
||||||
CompanyPositions} from "./Company.js";
|
CompanyPositions, companyExists} from "./Company.js";
|
||||||
import {CONSTANTS} from "./Constants.js";
|
import {CONSTANTS} from "./Constants.js";
|
||||||
import {Programs} from "./CreateProgram.js";
|
import {Programs} from "./CreateProgram.js";
|
||||||
import {parseDarkwebItemPrice, DarkWebItems} from "./DarkWeb.js";
|
import {parseDarkwebItemPrice, DarkWebItems} from "./DarkWeb.js";
|
||||||
@ -1035,6 +1035,14 @@ function NetscriptFunctions(workerScript) {
|
|||||||
costMult = 10;
|
costMult = 10;
|
||||||
expMult = 7.5;
|
expMult = 7.5;
|
||||||
break;
|
break;
|
||||||
|
case Locations.VolhavenMilleniumFitnessGym:
|
||||||
|
if (Player.city != Locations.Volhaven) {
|
||||||
|
workerScript.scriptRef.log("ERROR: You cannot workout at Millenium Fitness Gym because you are not in Volhaven. gymWorkout() failed");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
costMult = 3;
|
||||||
|
expMult = 2.5;
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
workerScript.scriptRef.log("Invalid gym name: " + gymName + ". gymWorkout() failed");
|
workerScript.scriptRef.log("Invalid gym name: " + gymName + ". gymWorkout() failed");
|
||||||
return false;
|
return false;
|
||||||
@ -1300,6 +1308,11 @@ function NetscriptFunctions(workerScript) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!companyExists(companyName)) {
|
||||||
|
workerScript.scriptRef.log("ERROR: applyToCompany failed because specified company " + companyName + " does not exist.");
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
Player.location = companyName;
|
Player.location = companyName;
|
||||||
var res;
|
var res;
|
||||||
switch (field.toLowerCase()) {
|
switch (field.toLowerCase()) {
|
||||||
@ -1426,6 +1439,11 @@ function NetscriptFunctions(workerScript) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!Player.factions.includes(name)) {
|
||||||
|
workerScript.scriptRef.log("ERROR: workForFaction() failed because you are not a member of " + name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (Player.isWorking) {
|
if (Player.isWorking) {
|
||||||
var txt = Player.singularityStopWork();
|
var txt = Player.singularityStopWork();
|
||||||
workerScript.scriptRef.log(txt);
|
workerScript.scriptRef.log(txt);
|
||||||
@ -1487,6 +1505,7 @@ function NetscriptFunctions(workerScript) {
|
|||||||
default:
|
default:
|
||||||
workerScript.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): " + type);
|
workerScript.scriptRef.log("ERROR: Invalid work type passed into workForFaction(): " + type);
|
||||||
}
|
}
|
||||||
|
return true;
|
||||||
},
|
},
|
||||||
getFactionRep(name) {
|
getFactionRep(name) {
|
||||||
if (Player.bitNodeN != 4) {
|
if (Player.bitNodeN != 4) {
|
||||||
@ -1644,6 +1663,11 @@ function NetscriptFunctions(workerScript) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fac.playerReputation < aug.baseRepRequirement) {
|
||||||
|
workerScript.scriptRef.log("ERROR: purchaseAugmentation() failed because you do not have enough reputation with " + fac.name);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var res = purchaseAugmentation(aug, fac, true);
|
var res = purchaseAugmentation(aug, fac, true);
|
||||||
workerScript.scriptRef.log(res);
|
workerScript.scriptRef.log(res);
|
||||||
if (isString(res) && res.startsWith("You purchased")) {
|
if (isString(res) && res.startsWith("You purchased")) {
|
||||||
|
Loading…
Reference in New Issue
Block a user