Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MP Lobby: actually properly display required addon names
Turns out I implemented ba9274e incorrectly. I had naively thought that the name= key in both instances (required addon parsing and version compatibility check) was the right key to use. I was wrong. In the case of required addon parsing, it turns out there was no name= key in the first place, so the "Missing addon: foo" message was using the addon id. In the case of the version compatibility check, it was using the *content* name, not the *addon* name. For example, it was displaying the name of a given modification shipped with an addon, but not the actual addon that shipped it. That was definitely not what we wanted. To fix this issue, I've added a name field to the config for required addons. This is populated with the addon_title= key (see below) of the required addon when the host creates a game. Do note the list of required addons is sent over the network. In the case of the version compatibility check, I made use of the same addon_title= key, except taken from the player's local config (this is because the version compatibility check only happens if you already have the given modification/era/etc installed from an addon). The addon_title= key itself is added to an era/mod/scenario/campaign/etc's config when addons are loaded, same as the addon_id= and addon_version= key. Currently it takes its value from _info.cfg's [info] title= field. If that isn't present, it falls back to addon_id=.
- Loading branch information
Showing
5 changed files
with
60 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters