Closed Savallator closed 4 years ago
If you want to keep the scoreboard configuration-free, the scoreboard.json is the way to go
In that sense, it would make sense to include the team logo url and country code/flag URL as well. This info could just be included in the ctf.json and dumped in the resulting scoreboard
Does the Engine complain about superfluous entries in the ctf.json
? Else I might just throw that in the ctf.json
but mount it in the scoreboard to extract the info that is only necessary for the scoreboard.
The way I implemented this now is that the backend needs (read-only) access to the ctf.json. It takes the Title (a new field) and DnsSuffix to set the display name and generate the team's DNS-names respectively.
In addition, each team gets an optional "FlagUrl" and "LogoUrl" entry, for the flag and logo respectively.
And judging by the fact that the engine still starts after adding those fields to the ctf.json
, that seems to be a good enough fix for now
Yep, System.Text.Json ignores unknown fields by default
The ctf name should be a config option (could be inside the json, but i would prefer environment variable) so the Window title can be something else than "bambi scoreboard" Maybe we should add ctf name into the scoreboard.json...