mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-28 08:57:32 +01:00
get sync/shock
This commit is contained in:
parent
8df7f8de4b
commit
060e0f7bfc
@ -4828,6 +4828,18 @@ function NetscriptFunctions(workerScript) {
|
||||
|
||||
return Player.sleeves[sleeveNumber].shockRecovery(Player);
|
||||
},
|
||||
getShock : function(sleeveNumber=0) {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("getShock", CONSTANTS.ScriptSleeveBaseRamCost);
|
||||
}
|
||||
updateDynamicRam("getShock", CONSTANTS.ScriptSleeveBaseRamCost);
|
||||
if (sleeveNumber >= Player.sleeves.length || sleeveNumber < 0) {
|
||||
workerScript.log(`ERROR: sleeve.getShock(${sleeveNumber}) failed because it is an invalid sleeve number.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
return Player.sleeves[sleeveNumber].shock;
|
||||
},
|
||||
synchronize : function(sleeveNumber=0) {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("synchronize", CONSTANTS.ScriptSleeveBaseRamCost);
|
||||
@ -4840,6 +4852,18 @@ function NetscriptFunctions(workerScript) {
|
||||
|
||||
return Player.sleeves[sleeveNumber].synchronize(Player);
|
||||
},
|
||||
getSync : function(sleeveNumber=0) {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("getSync", CONSTANTS.ScriptSleeveBaseRamCost);
|
||||
}
|
||||
updateDynamicRam("getSync", CONSTANTS.ScriptSleeveBaseRamCost);
|
||||
if (sleeveNumber >= Player.sleeves.length || sleeveNumber < 0) {
|
||||
workerScript.log(`ERROR: sleeve.getSync(${sleeveNumber}) failed because it is an invalid sleeve number.`);
|
||||
return false;
|
||||
}
|
||||
|
||||
return Player.sleeves[sleeveNumber].sync;
|
||||
},
|
||||
commitCrime : function(sleeveNumber=0, crimeName="") {
|
||||
if (workerScript.checkingRam) {
|
||||
return updateStaticRam("commitCrime", CONSTANTS.ScriptSleeveBaseRamCost);
|
||||
|
Loading…
Reference in New Issue
Block a user