mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator.git
synced 2024-11-27 14:08:39 +01:00
Add a way to set subscribed groups.
This commit is contained in:
parent
beffb89bda
commit
a0648d454c
5 changed files with 37 additions and 0 deletions
|
@ -48,6 +48,10 @@ Depots:
|
||||||
This is pretty rare but some games might use depot ids to see if dlcs are installed. You can provide a list of installed depots to the game with a steam_settings\depots.txt file.
|
This is pretty rare but some games might use depot ids to see if dlcs are installed. You can provide a list of installed depots to the game with a steam_settings\depots.txt file.
|
||||||
See the steam_settings.EXAMPLE folder for an example.
|
See the steam_settings.EXAMPLE folder for an example.
|
||||||
|
|
||||||
|
Subscribed Groups:
|
||||||
|
Some games like payday 2 check which groups you are subscribed in and unlock things based on that. You can provide a list of subscribed groups to the game with a steam_settings\subscribed_groups.txt file.
|
||||||
|
See steam_settings.EXAMPLE\subscribed_groups.EXAMPLE.txt for an example for payday 2.
|
||||||
|
|
||||||
App paths:
|
App paths:
|
||||||
Some rare games might need to be provided one or more paths to app ids. For example the path to where a dlc is installed. This sets the paths returned by the Steam_Apps::GetAppInstallDir function.
|
Some rare games might need to be provided one or more paths to app ids. For example the path to where a dlc is installed. This sets the paths returned by the Steam_Apps::GetAppInstallDir function.
|
||||||
See steam_settings.EXAMPLE\app_paths.EXAMPLE.txt for an example.
|
See steam_settings.EXAMPLE\app_paths.EXAMPLE.txt for an example.
|
||||||
|
|
|
@ -132,6 +132,9 @@ public:
|
||||||
std::map<std::string, Stat_config> getStats() { return stats; }
|
std::map<std::string, Stat_config> getStats() { return stats; }
|
||||||
void setStatDefiniton(std::string name, struct Stat_config stat_config) {stats[name] = stat_config; }
|
void setStatDefiniton(std::string name, struct Stat_config stat_config) {stats[name] = stat_config; }
|
||||||
|
|
||||||
|
//subscribed lobby/group ids
|
||||||
|
std::set<uint64> subscribed_groups;
|
||||||
|
|
||||||
//images
|
//images
|
||||||
std::map<int, struct Image_Data> images;
|
std::map<int, struct Image_Data> images;
|
||||||
int add_image(std::string data, uint32 width, uint32 height);
|
int add_image(std::string data, uint32 width, uint32 height);
|
||||||
|
|
|
@ -511,6 +511,28 @@ uint32 create_localstorage_settings(Settings **settings_client_out, Settings **s
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
{
|
||||||
|
std::string depots_config_path = Local_Storage::get_game_settings_path() + "subscribed_groups.txt";
|
||||||
|
std::ifstream input( depots_config_path );
|
||||||
|
if (input.is_open()) {
|
||||||
|
consume_bom(input);
|
||||||
|
for( std::string line; getline( input, line ); ) {
|
||||||
|
if (!line.empty() && line[line.length()-1] == '\n') {
|
||||||
|
line.pop_back();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!line.empty() && line[line.length()-1] == '\r') {
|
||||||
|
line.pop_back();
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64 source_id = stoull(line);
|
||||||
|
settings_client->subscribed_groups.insert(source_id);
|
||||||
|
settings_server->subscribed_groups.insert(source_id);
|
||||||
|
PRINT_DEBUG("Added source %llu\n", source_id);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
std::string mod_path = Local_Storage::get_game_settings_path() + "mods";
|
std::string mod_path = Local_Storage::get_game_settings_path() + "mods";
|
||||||
std::vector<std::string> paths = Local_Storage::get_filenames_path(mod_path);
|
std::vector<std::string> paths = Local_Storage::get_filenames_path(mod_path);
|
||||||
|
|
|
@ -502,6 +502,10 @@ bool IsUserInSource( CSteamID steamIDUser, CSteamID steamIDSource )
|
||||||
if (settings->get_lobby() == steamIDSource) {
|
if (settings->get_lobby() == steamIDSource) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (settings->subscribed_groups.find(steamIDSource.ConvertToUint64()) != settings->subscribed_groups.end()) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Friend *f = find_friend(steamIDUser);
|
Friend *f = find_friend(steamIDUser);
|
||||||
if (!f) return false;
|
if (!f) return false;
|
||||||
|
|
|
@ -0,0 +1,4 @@
|
||||||
|
103582791433980119
|
||||||
|
103582791438562929
|
||||||
|
103582791441335905
|
||||||
|
103582791460014708
|
Loading…
Reference in a new issue