mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-30 21:07:04 +02:00
merge dev
This commit is contained in:
@@ -242,6 +242,8 @@ export const RamCosts: IMap<any> = {
|
||||
purchaseAugmentation: RamCostConstants.ScriptSingularityFn3RamCost,
|
||||
softReset: RamCostConstants.ScriptSingularityFn3RamCost,
|
||||
installAugmentations: RamCostConstants.ScriptSingularityFn3RamCost,
|
||||
isFocused: 0.1,
|
||||
setFocus: 0.1,
|
||||
|
||||
// Gang API
|
||||
gang: {
|
||||
@@ -295,7 +297,7 @@ export const RamCosts: IMap<any> = {
|
||||
getTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||
setTeamSize: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||
getCityEstimatedPopulation: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||
getCityEstimatedCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||
getCityCommunities: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||
getCityChaos: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||
getCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||
switchCity: RamCostConstants.ScriptBladeburnerApiBaseRamCost,
|
||||
|
||||
@@ -5,7 +5,7 @@ export const recentScripts: RecentScript[] = [];
|
||||
|
||||
export function AddRecentScript(workerScript: WorkerScript): void {
|
||||
if (recentScripts.find((r) => r.pid === workerScript.pid)) return;
|
||||
recentScripts.push({
|
||||
recentScripts.unshift({
|
||||
filename: workerScript.name,
|
||||
args: workerScript.args,
|
||||
pid: workerScript.pid,
|
||||
|
||||
@@ -195,14 +195,14 @@ export class WorkerScript {
|
||||
return this.disableLogs[fn] == null;
|
||||
}
|
||||
|
||||
log(func: string, txt: string): void {
|
||||
log(func: string, txt: () => string): void {
|
||||
if (this.shouldLog(func)) {
|
||||
if (func && txt) {
|
||||
this.scriptRef.log(`${func}: ${txt}`);
|
||||
this.scriptRef.log(`${func}: ${txt()}`);
|
||||
} else if (func) {
|
||||
this.scriptRef.log(func);
|
||||
} else {
|
||||
this.scriptRef.log(txt);
|
||||
this.scriptRef.log(txt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user