fix: make all game names be supported in lowercase instead of only t6

This commit is contained in:
Jan 2024-08-12 10:20:04 +02:00
parent 254918acca
commit fc5853eaa4
No known key found for this signature in database
GPG Key ID: 44B581F78FF5C57C
4 changed files with 20 additions and 4 deletions

View File

@ -4,6 +4,7 @@
#include "Game/IW3/GameAssetPoolIW3.h"
#include "Game/IW3/GameIW3.h"
#include "ObjLoading.h"
#include "Utils/StringUtils.h"
#include <iostream>
@ -59,7 +60,10 @@ void ZoneCreator::CreateZoneAssetPools(Zone* zone) const
bool ZoneCreator::SupportsGame(const std::string& gameName) const
{
return gameName == g_GameIW3.GetShortName();
auto shortName = g_GameIW3.GetShortName();
utils::MakeStringLowerCase(shortName);
return gameName == shortName;
}
std::unique_ptr<Zone> ZoneCreator::CreateZoneForDefinition(ZoneCreationContext& context) const

View File

@ -3,6 +3,7 @@
#include "Game/IW4/GameAssetPoolIW4.h"
#include "Game/IW4/GameIW4.h"
#include "ObjLoading.h"
#include "Utils/StringUtils.h"
#include <iostream>
@ -58,7 +59,10 @@ void ZoneCreator::CreateZoneAssetPools(Zone* zone) const
bool ZoneCreator::SupportsGame(const std::string& gameName) const
{
return gameName == g_GameIW4.GetShortName();
auto shortName = g_GameIW4.GetShortName();
utils::MakeStringLowerCase(shortName);
return gameName == shortName;
}
std::unique_ptr<Zone> ZoneCreator::CreateZoneForDefinition(ZoneCreationContext& context) const

View File

@ -3,6 +3,7 @@
#include "Game/IW5/GameAssetPoolIW5.h"
#include "Game/IW5/GameIW5.h"
#include "ObjLoading.h"
#include "Utils/StringUtils.h"
#include <iostream>
@ -58,7 +59,10 @@ void ZoneCreator::CreateZoneAssetPools(Zone* zone) const
bool ZoneCreator::SupportsGame(const std::string& gameName) const
{
return gameName == g_GameIW5.GetShortName();
auto shortName = g_GameIW5.GetShortName();
utils::MakeStringLowerCase(shortName);
return gameName == shortName;
}
std::unique_ptr<Zone> ZoneCreator::CreateZoneForDefinition(ZoneCreationContext& context) const

View File

@ -4,6 +4,7 @@
#include "Game/T5/GameAssetPoolT5.h"
#include "Game/T5/GameT5.h"
#include "ObjLoading.h"
#include "Utils/StringUtils.h"
#include <iostream>
@ -59,7 +60,10 @@ void ZoneCreator::CreateZoneAssetPools(Zone* zone) const
bool ZoneCreator::SupportsGame(const std::string& gameName) const
{
return gameName == g_GameT5.GetShortName();
auto shortName = g_GameT5.GetShortName();
utils::MakeStringLowerCase(shortName);
return gameName == shortName;
}
std::unique_ptr<Zone> ZoneCreator::CreateZoneForDefinition(ZoneCreationContext& context) const