fixed tithes log messages

This commit is contained in:
Rudis Muiznieks 2021-09-06 12:26:43 -05:00
parent e939dec388
commit b323625621
1 changed files with 10 additions and 7 deletions

View File

@ -80,15 +80,18 @@ class Money implements IResource {
}
}
protected _purchaseLog(amount: number, state: GameState): string {
protected _purchaseLog(amount: number, state: GameState): void {
const followers = state.resource.followers;
if (followers !== undefined) {
return `You collected $${formatNumber(amount)} from ${formatNumber(
state.log(
`You collected $${formatNumber(amount)} from ${formatNumber(
followers.value
)} ${
followers.value > 1 ? followers.pluralName : followers.singularName
}.`;
}.`
);
} else {
state.log(`You collected $${formatNumber(amount)} in tithings.`);
}
return `You collected $${formatNumber(amount)} in tithings.`;
}
}