log issue

This commit is contained in:
Olivier Gagnon 2021-12-03 13:54:49 -05:00
parent 3ed0e7c9cb
commit d852649f2b
3 changed files with 10 additions and 10 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -167,9 +167,9 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
if (gang === null) throw new Error("Should not be called without Gang"); if (gang === null) throw new Error("Should not be called without Gang");
const recruited = gang.recruitMember(name); const recruited = gang.recruitMember(name);
if (recruited) { if (recruited) {
workerScript.log("recruitMember", () => `Successfully recruited Gang Member '${name}'`); workerScript.log("gang.recruitMember", () => `Successfully recruited Gang Member '${name}'`);
} else { } else {
workerScript.log("recruitMember", () => `Failed to recruit Gang Member '${name}'`); workerScript.log("gang.recruitMember", () => `Failed to recruit Gang Member '${name}'`);
} }
return recruited; return recruited;
@ -190,12 +190,12 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
const success = member.assignToTask(taskName); const success = member.assignToTask(taskName);
if (success) { if (success) {
workerScript.log( workerScript.log(
"setMemberTask", "gang.setMemberTask",
() => `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`, () => `Successfully assigned Gang Member '${memberName}' to '${taskName}' task`,
); );
} else { } else {
workerScript.log( workerScript.log(
"setMemberTask", "gang.setMemberTask",
() => `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`, () => `Failed to assign Gang Member '${memberName}' to '${taskName}' task. '${memberName}' is now Unassigned`,
); );
} }
@ -251,10 +251,10 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
if (!equipment) return false; if (!equipment) return false;
const res = member.buyUpgrade(equipment, player, gang); const res = member.buyUpgrade(equipment, player, gang);
if (res) { if (res) {
workerScript.log("purchaseEquipment", () => `Purchased '${equipName}' for Gang member '${memberName}'`); workerScript.log("gang.purchaseEquipment", () => `Purchased '${equipName}' for Gang member '${memberName}'`);
} else { } else {
workerScript.log( workerScript.log(
"purchaseEquipment", "gang.purchaseEquipment",
() => `Failed to purchase '${equipName}' for Gang member '${memberName}'`, () => `Failed to purchase '${equipName}' for Gang member '${memberName}'`,
); );
} }
@ -277,10 +277,10 @@ export function NetscriptGang(player: IPlayer, workerScript: WorkerScript, helpe
if (gang === null) throw new Error("Should not be called without Gang"); if (gang === null) throw new Error("Should not be called without Gang");
if (engage) { if (engage) {
gang.territoryWarfareEngaged = true; gang.territoryWarfareEngaged = true;
workerScript.log("setTerritoryWarfare", () => "Engaging in Gang Territory Warfare"); workerScript.log("gang.setTerritoryWarfare", () => "Engaging in Gang Territory Warfare");
} else { } else {
gang.territoryWarfareEngaged = false; gang.territoryWarfareEngaged = false;
workerScript.log("setTerritoryWarfare", () => "Disengaging in Gang Territory Warfare"); workerScript.log("gang.setTerritoryWarfare", () => "Disengaging in Gang Territory Warfare");
} }
}, },
getChanceToWinClash: function (otherGang: any): number { getChanceToWinClash: function (otherGang: any): number {