MISC: Cancel faction work instead of finishing it when creating gang (#2726)

This commit is contained in:
catloversg
2026-05-05 05:24:08 +07:00
committed by GitHub
parent ec307241e0
commit 2ef68d31ae
@@ -54,8 +54,9 @@ export function hasGangWith(this: PlayerObject, facName: FactionName): boolean {
}
export function startGang(this: PlayerObject, factionName: FactionName, hacking: boolean): void {
// isFactionWork handles null internally, finishWork might need to be run with true
if (isFactionWork(this.currentWork) && this.currentWork.factionName === factionName) this.finishWork(false);
if (isFactionWork(this.currentWork) && this.currentWork.factionName === factionName) {
this.finishWork(true);
}
this.gang = new Gang(factionName, hacking);