[Changelog] Improved UIScript

- only run once
- support for offline
This commit is contained in:
/dev/root 2017-02-04 19:07:02 +01:00
parent 97bdf1a842
commit f042aa2d4f

View File

@ -6,12 +6,20 @@ namespace Components
void Changelog::LoadChangelog(UIScript::Token)
{
if (!Changelog::Line.empty())
return;
std::vector<std::string> changelog;
Changelog::Line.clear();
{
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');
}