beyond-all-reason / BYAR-Chobby

Currently used legacy lobby for BAR, for the new lobby development see https://github.com/beyond-all-reason/bar-lobby
59 stars 69 forks source link

Decode and display first line of tweakunits/tweakdefs modoptions #713

Closed DeviousNull closed 3 months ago

DeviousNull commented 3 months ago

Currently, players who have just joined a lobby with tweakunits/tweakdefs configured do not have an easy way to know what they do. This is sometimes alleviated by setting a Welcome message, but many players do not notice those messages. As a result, such lobbies often have a stream of new players asking "what does the tweak do?".

This PR updates gui_modoptions_panel.lua to:

The following validation is performed on the configured tweakunits/tweakdefs values. If any validation fails, then only the length and 4-character hash is displayed.

Before: BeforeChange

After: AfterChange

Example Base64-encoded tweakunits string (with comment added): ExampleTweakunit.txt