enowars / bambi-scoreboard

GNU General Public License v3.0
1 stars 0 forks source link

Make CTF name a config option #6

Closed Savallator closed 4 years ago

Savallator commented 4 years ago

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...

Trolldemorted commented 4 years ago

If you want to keep the scoreboard configuration-free, the scoreboard.json is the way to go

ldruschk commented 4 years ago

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

ldruschk commented 4 years ago

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.

ldruschk commented 4 years ago

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.

ldruschk commented 4 years ago

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

Trolldemorted commented 4 years ago

Yep, System.Text.Json ignores unknown fields by default