mirror of
https://github.com/openfrontio/OpenFrontIO.git
synced 2026-06-21 07:40:43 +00:00
Fix events display showing troop donation amounts 10x too high
Troops are stored internally at 10x their displayed value, but the donation event message formatted the raw amount with renderNumber instead of renderTroops. Gold is unscaled and was already correct.
This commit is contained in:
@@ -28,6 +28,7 @@ import { UIState } from "../../UIState";
|
||||
import {
|
||||
getMessageTypeClasses,
|
||||
renderNumber,
|
||||
renderTroops,
|
||||
translateText,
|
||||
} from "../../Utils";
|
||||
|
||||
@@ -428,7 +429,9 @@ export class EventsDisplay extends LitElement implements Controller {
|
||||
: "events_display.sent_troops_to_player";
|
||||
const params: Record<string, string | number> = {
|
||||
name: other.displayName(),
|
||||
[isGold ? "gold" : "troops"]: renderNumber(update.amount),
|
||||
[isGold ? "gold" : "troops"]: isGold
|
||||
? renderNumber(update.amount)
|
||||
: renderTroops(Number(update.amount)),
|
||||
};
|
||||
|
||||
this.addEvent({
|
||||
|
||||
Reference in New Issue
Block a user