[Changelog] Improved UIScript
- only run once - support for offline
This commit is contained in:
parent
97bdf1a842
commit
f042aa2d4f
@ -6,12 +6,20 @@ namespace Components
|
|||||||
|
|
||||||
void Changelog::LoadChangelog(UIScript::Token)
|
void Changelog::LoadChangelog(UIScript::Token)
|
||||||
{
|
{
|
||||||
|
if (!Changelog::Line.empty())
|
||||||
|
return;
|
||||||
|
|
||||||
std::vector<std::string> changelog;
|
std::vector<std::string> changelog;
|
||||||
Changelog::Line.clear();
|
Changelog::Line.clear();
|
||||||
|
|
||||||
{
|
{
|
||||||
std::string uncleaned = Utils::Cache::GetFile("/iw4/changelog.txt");
|
std::string uncleaned = Utils::Cache::GetFile("/iw4/changelog.txt");
|
||||||
|
|
||||||
|
if (uncleaned.empty())
|
||||||
|
{
|
||||||
|
uncleaned = "\n\n^1Unable to get changelog.";
|
||||||
|
}
|
||||||
|
|
||||||
changelog = Utils::String::Explode(uncleaned, '\n');
|
changelog = Utils::String::Explode(uncleaned, '\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user