Make additional changes to client source handling based on discussion.
Add a "BSD Repository" option. Add data/dist to .gitignore. Delete data/dist from git. Error conditions reading data/dist just set the value to Default. Remove a leftover TODO comment. Add description comments for the two new database columns.
This commit is contained in:
parent
c7e84e1d49
commit
3bc7b3fae7
4 changed files with 7 additions and 5 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -212,3 +212,4 @@ config.h
|
|||
6not
|
||||
.kdev*
|
||||
callgrind.out.*
|
||||
data/dist
|
||||
|
|
|
@ -1 +0,0 @@
|
|||
Default
|
|
@ -159,7 +159,6 @@ std::pair<wesnothd_connection_ptr, config> open_connection(std::string host)
|
|||
config res;
|
||||
cfg["version"] = game_config::version;
|
||||
|
||||
// TODO: retest with below string values - dist doesn't exist
|
||||
std::string info;
|
||||
std::ifstream infofile("./data/dist");
|
||||
if(infofile.is_open()){
|
||||
|
@ -167,13 +166,14 @@ std::pair<wesnothd_connection_ptr, config> open_connection(std::string host)
|
|||
infofile.close();
|
||||
|
||||
if(info == "Default" || info == "Steam" || info == "SourceForge" || info == "Flatpak"
|
||||
|| info == "macOS App Store" || info == "Linux repository" || info == "iOS" || info == "Android") {
|
||||
|| info == "macOS App Store" || info == "Linux repository" || info == "iOS" || info == "Android"
|
||||
|| info == "BSD repository") {
|
||||
cfg["client_source"] = info;
|
||||
} else {
|
||||
cfg["client_source"] = "dist file has wrong value!";
|
||||
cfg["client_source"] = "Default";
|
||||
}
|
||||
} else {
|
||||
cfg["client_source"] = "failed to read dist file!";
|
||||
cfg["client_source"] = "Default";
|
||||
}
|
||||
res.add_child("version", std::move(cfg));
|
||||
sock->send_data(res);
|
||||
|
|
|
@ -79,6 +79,8 @@ create table game_info
|
|||
-- IS_HOST: if USER_ID is the game's host
|
||||
-- FACTION: the faction being played by this side
|
||||
-- STATUS: the status of the side, currently only updated at game end
|
||||
-- CLIENT_VERSION: the version of the wesnoth client used to connect
|
||||
-- CLIENT_SOURCE: where the wesnoth client was downloaded from - SourceForge, Steam, etc
|
||||
create table game_player_info
|
||||
(
|
||||
INSTANCE_UUID CHAR(36) NOT NULL,
|
||||
|
|
Loading…
Add table
Reference in a new issue