mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-06 20:18:17 +00:00
addon: Rename get_addon_info() and set_addon_info()...
...to better reflect their function They have been renamed to get_addon_pbl_info() and set_addon_pbl_info(), respectively. This also makes sense given the existing have_addon_pbl_info() function.
This commit is contained in:
parent
21f5c99e55
commit
7b16b67e80
@ -104,7 +104,7 @@ bool addons_client::upload_addon(const std::string& id, std::string& response_me
|
||||
response_message.clear();
|
||||
|
||||
config cfg;
|
||||
get_addon_info(id, cfg);
|
||||
get_addon_pbl_info(id, cfg);
|
||||
|
||||
utils::string_map i18n_symbols;
|
||||
i18n_symbols["addon_title"] = cfg["title"];
|
||||
@ -121,7 +121,7 @@ bool addons_client::upload_addon(const std::string& id, std::string& response_me
|
||||
passphrase[n] = 'a' + (rand()%26);
|
||||
}
|
||||
cfg["passphrase"] = passphrase;
|
||||
set_addon_info(id, cfg);
|
||||
set_addon_pbl_info(id, cfg);
|
||||
|
||||
LOG_ADDONS << "automatically generated an initial passphrase for " << id << '\n';
|
||||
}
|
||||
@ -155,7 +155,7 @@ bool addons_client::delete_remote_addon(const std::string& id, std::string& resp
|
||||
response_message.clear();
|
||||
|
||||
config cfg;
|
||||
get_addon_info(id, cfg);
|
||||
get_addon_pbl_info(id, cfg);
|
||||
|
||||
utils::string_map i18n_symbols;
|
||||
i18n_symbols["addon_title"] = cfg["title"];
|
||||
|
@ -83,13 +83,13 @@ bool have_addon_pbl_info(const std::string& addon_name)
|
||||
file_exists(parentd+"/"+addon_name+"/_server.pbl");
|
||||
}
|
||||
|
||||
void get_addon_info(const std::string& addon_name, config& cfg)
|
||||
void get_addon_pbl_info(const std::string& addon_name, config& cfg)
|
||||
{
|
||||
scoped_istream stream = istream_file(get_pbl_file_path(addon_name));
|
||||
read(cfg, *stream);
|
||||
}
|
||||
|
||||
void set_addon_info(const std::string& addon_name, const config& cfg)
|
||||
void set_addon_pbl_info(const std::string& addon_name, const config& cfg)
|
||||
{
|
||||
scoped_ostream stream = ostream_file(get_pbl_file_path(addon_name));
|
||||
write(*stream, cfg);
|
||||
|
@ -49,7 +49,7 @@ bool have_addon_in_vcs_tree(const std::string& addon_name);
|
||||
* @param cfg A config object to store the add-on's
|
||||
* properties.
|
||||
*/
|
||||
void get_addon_info(const std::string& addon_name, class config& cfg);
|
||||
void get_addon_pbl_info(const std::string& addon_name, class config& cfg);
|
||||
|
||||
/**
|
||||
* Sets the publish information for an add-on
|
||||
@ -58,7 +58,7 @@ void get_addon_info(const std::string& addon_name, class config& cfg);
|
||||
* @param cfg A config object from which the add-on's
|
||||
* properties are copied.
|
||||
*/
|
||||
void set_addon_info(const std::string& addon_name, const class config& cfg);
|
||||
void set_addon_pbl_info(const std::string& addon_name, const class config& cfg);
|
||||
|
||||
/**
|
||||
* Replaces underscores to dress up file or dirnames as add-on titles.
|
||||
|
Loading…
x
Reference in New Issue
Block a user