Add local-only lobby checkboxes/dropdowns - #1074
Conversation
|
What is the use case for such? Currently we do local options through user settings (via literal settings menu), this kind of blurs the line (and honestly calls for a greater restructure I outlined, with shared game options/settings that can be mixed and matched). |
|
Can you introduce more about the |
Use case is for a "Record replay" checkbox shown in the lobby. It needs to write to spawn.ini and not be broadcasted. |
eeb42d2 to
697fc1d
Compare
|
Nightly build for this pull request:
|
697fc1d to
42e6a1a
Compare
42e6a1a to
2af029b
Compare
Adds
LocalGameLobbyCheckBoxandLocalGameLobbyDropDown: lobby options that write tospawn.iniand are remembered per user, but are never broadcast to other players.A
GameLobbyCheckBoxis part of the shared game options - it is sent in game option messages, only the host can change it. Some options are purely local, such as whether this player records a replay. Those need to be settable by non-hosts, must not be broadcast, and should be remembered between sessions.Any
GameSessionCheckBoxorGameSessionDropDowncan now persist through aUserSettingKey, which stores the value in[LocalGameOptions]. That is deliberately independent ofSaveSkirmishGameOptions/SaveCampaignGameOptions, which persist whole lobbies under the control's own name and are loaded after the control initialises - setting both for one control would let the older mechanism overwrite the remembered value.