1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-16 03:23:15 +01:00

Remove use of gCurrentLanguage

This commit is contained in:
Ted John
2018-04-26 23:48:25 +01:00
parent 7b28078da2
commit 35df72e61f
15 changed files with 69 additions and 53 deletions

View File

@@ -26,6 +26,7 @@
#include "../core/FileStream.hpp"
#include "../core/Path.hpp"
#include "../core/String.hpp"
#include "../localisation/LocalisationService.h"
#include "../object/ObjectRepository.h"
#include "../object/RideObject.h"
#include "../PlatformEnvironment.h"
@@ -284,10 +285,10 @@ public:
return refs;
}
void Scan() override
void Scan(sint32 language) override
{
_items.clear();
auto trackDesigns = _fileIndex.LoadOrBuild();
auto trackDesigns = _fileIndex.LoadOrBuild(language);
for (const auto &td : trackDesigns)
{
_items.push_back(td);
@@ -404,7 +405,7 @@ ITrackDesignRepository * CreateTrackDesignRepository(std::shared_ptr<IPlatformEn
void track_repository_scan()
{
ITrackDesignRepository * repo = GetContext()->GetTrackDesignRepository();
repo->Scan();
repo->Scan(LocalisationService_GetCurrentLanguage());
}
bool track_repository_delete(const utf8 * path)