mirror of
https://gitlab.com/Mr_Goldberg/goldberg_emulator
synced 2025-07-07 06:52:15 +08:00
Add a way to set subscribed groups.
This commit is contained in:
@ -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::vector<std::string> paths = Local_Storage::get_filenames_path(mod_path);
|
||||
|
Reference in New Issue
Block a user