diff --git a/viewer/src/components/Resource.vue b/viewer/src/components/Resource.vue index 9ee460a0..030fa007 100644 --- a/viewer/src/components/Resource.vue +++ b/viewer/src/components/Resource.vue @@ -8,7 +8,7 @@ {{ kind === "t" ? "+" : "" }}{{ count }}{{ kind === "t" ? "+" : "" }}{{ kind === "burn-t" ? "-" : "" }}{{ count }} B diff --git a/viewer/src/logic/simple-charts.ts b/viewer/src/logic/simple-charts.ts index 985d39ac..1716fcf5 100644 --- a/viewer/src/logic/simple-charts.ts +++ b/viewer/src/logic/simple-charts.ts @@ -83,7 +83,7 @@ export type SimpleSourceFactory> = { extractLog?: (cmd: CommandObject, source: Source, data: Engine, player: Player) => number; }; -export type ResourceKind = Resource | "pay-pw"; +export type ResourceKind = Resource | "pay-pw" | "burn-t"; const researchNames = { [ResearchField.Terraforming]: "Terraforming", @@ -143,6 +143,12 @@ const factories = [ ((resource == source.type && change > 0) || (resource == source.inverseOf && change < 0)) ? Math.abs(change) : 0, + extractLog: (cmd, source) => { + if (source.type == "burn-t" && cmd.command == Command.BurnPower) { + return Number(cmd.args[0]); + } + return 0; + }, sources: [ { type: Resource.Credit, @@ -194,6 +200,13 @@ const factories = [ color: () => "--recent", weight: 0, }, + { + type: "burn-t", + label: "Burned Tokens", + plural: "Burned Tokens", + color: () => "--current-round", + weight: 0, + }, ], } as SimpleSourceFactory & { inverseOf?: Resource }>, {