mirror of https://github.com/OpenRCT2/OpenRCT2.git
Rename public plug-in config data members
This commit is contained in:
parent
0ca7bb058f
commit
f9d1f024c2
|
@ -553,8 +553,8 @@ namespace Config
|
|||
if (reader->ReadSection("plugin"))
|
||||
{
|
||||
auto model = &gConfigPlugin;
|
||||
model->enable_hot_reloading = reader->GetBoolean("enable_hot_reloading", false);
|
||||
model->allowed_hosts = reader->GetString("allowed_hosts", "");
|
||||
model->EnableHotReloading = reader->GetBoolean("enable_hot_reloading", false);
|
||||
model->AllowedHosts = reader->GetString("allowed_hosts", "");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -562,8 +562,8 @@ namespace Config
|
|||
{
|
||||
auto model = &gConfigPlugin;
|
||||
writer->WriteSection("plugin");
|
||||
writer->WriteBoolean("enable_hot_reloading", model->enable_hot_reloading);
|
||||
writer->WriteString("allowed_hosts", model->allowed_hosts);
|
||||
writer->WriteBoolean("enable_hot_reloading", model->EnableHotReloading);
|
||||
writer->WriteString("allowed_hosts", model->AllowedHosts);
|
||||
}
|
||||
|
||||
static bool SetDefaults()
|
||||
|
|
|
@ -216,8 +216,8 @@ struct FontConfiguration
|
|||
|
||||
struct PluginConfiguration
|
||||
{
|
||||
bool enable_hot_reloading;
|
||||
std::string allowed_hosts;
|
||||
bool EnableHotReloading;
|
||||
std::string AllowedHosts;
|
||||
};
|
||||
|
||||
enum class Sort : int32_t
|
||||
|
|
|
@ -555,7 +555,7 @@ void ScriptEngine::RefreshPlugins()
|
|||
}
|
||||
|
||||
// Turn on hot reload if not already enabled
|
||||
if (!_hotReloadingInitialised && gConfigPlugin.enable_hot_reloading && network_get_mode() == NETWORK_MODE_NONE)
|
||||
if (!_hotReloadingInitialised && gConfigPlugin.EnableHotReloading && network_get_mode() == NETWORK_MODE_NONE)
|
||||
{
|
||||
SetupHotReloading();
|
||||
}
|
||||
|
|
|
@ -90,15 +90,15 @@ namespace OpenRCT2::Scripting
|
|||
constexpr char delimiter = ',';
|
||||
size_t start_pos = 0;
|
||||
size_t end_pos = 0;
|
||||
while ((end_pos = gConfigPlugin.allowed_hosts.find(delimiter, start_pos)) != std::string::npos)
|
||||
while ((end_pos = gConfigPlugin.AllowedHosts.find(delimiter, start_pos)) != std::string::npos)
|
||||
{
|
||||
if (host == gConfigPlugin.allowed_hosts.substr(start_pos, end_pos - start_pos))
|
||||
if (host == gConfigPlugin.AllowedHosts.substr(start_pos, end_pos - start_pos))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
start_pos = end_pos + 1;
|
||||
}
|
||||
return host == gConfigPlugin.allowed_hosts.substr(start_pos, gConfigPlugin.allowed_hosts.length() - start_pos);
|
||||
return host == gConfigPlugin.AllowedHosts.substr(start_pos, gConfigPlugin.AllowedHosts.length() - start_pos);
|
||||
}
|
||||
|
||||
public:
|
||||
|
|
Loading…
Reference in New Issue