mirror of
https://github.com/wesnoth/wesnoth
synced 2025-04-28 06:48:14 +00:00
Removed the core file path from the preferences.
The new implementation works with the id only.
This commit is contained in:
parent
42c9475173
commit
d98240e4f6
@ -234,16 +234,6 @@ void set_allied_color(const std::string& color_id) {
|
||||
prefs["ally_orb_color"] = color_id;
|
||||
}
|
||||
|
||||
std::string wml_tree_root() {
|
||||
std::string wml_tree_root = get("wml_tree_root");
|
||||
if (wml_tree_root.empty())
|
||||
return "_main.cfg";
|
||||
return wml_tree_root;
|
||||
}
|
||||
void set_wml_tree_root(const std::string& wml_tree_root) {
|
||||
prefs["wml_tree_root"] = wml_tree_root;
|
||||
}
|
||||
|
||||
std::string core_id() {
|
||||
std::string core_id = get("core");
|
||||
if (core_id.empty())
|
||||
|
@ -55,9 +55,6 @@ namespace preferences {
|
||||
|
||||
config* get_prefs();
|
||||
|
||||
std::string wml_tree_root();
|
||||
void set_wml_tree_root(const std::string& root);
|
||||
|
||||
std::string core_id();
|
||||
void set_core_id(const std::string& root);
|
||||
|
||||
|
@ -762,9 +762,7 @@ static int do_gameloop(const std::vector<std::string>& args)
|
||||
gui2::tcore_selection core_dlg(cores, current);
|
||||
if (core_dlg.show(game->disp().video())) {
|
||||
int core_index = core_dlg.get_choice();
|
||||
const std::string& wml_tree_root = cores[core_index]["path"];
|
||||
const std::string& core_id = cores[core_index]["id"];
|
||||
preferences::set_wml_tree_root(wml_tree_root);
|
||||
preferences::set_core_id(core_id);
|
||||
config_manager.reload_changed_game_config();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user