mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-05-06 07:44:07 +00:00
Use standard wide string returns in game rules
This commit is contained in:
parent
dd726f8ba1
commit
09896918cd
|
|
@ -7605,7 +7605,7 @@ void CMinecraftApp::setLevelGenerationOptions(LevelGenerationOptions *levelGen)
|
|||
m_gameRules.setLevelGenerationOptions(levelGen);
|
||||
}
|
||||
|
||||
LPCWSTR CMinecraftApp::GetGameRulesString(const std::wstring &key)
|
||||
const wchar_t *CMinecraftApp::GetGameRulesString(const std::wstring &key)
|
||||
{
|
||||
return m_gameRules.GetGameRulesString(key);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -719,7 +719,7 @@ public:
|
|||
void setLevelGenerationOptions(LevelGenerationOptions *levelGen);
|
||||
LevelRuleset *getGameRuleDefinitions() { return m_gameRules.getGameRuleDefinitions(); }
|
||||
LevelGenerationOptions *getLevelGenerationOptions() { return m_gameRules.getLevelGenerationOptions(); }
|
||||
LPCWSTR GetGameRulesString(const std::wstring &key);
|
||||
const wchar_t *GetGameRulesString(const std::wstring &key);
|
||||
|
||||
private:
|
||||
BYTE m_playerColours[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's
|
||||
|
|
|
|||
|
|
@ -749,7 +749,7 @@ void GameRuleManager::setLevelGenerationOptions(LevelGenerationOptions *levelGen
|
|||
m_currentLevelGenerationOptions->reset_start();
|
||||
}
|
||||
|
||||
LPCWSTR GameRuleManager::GetGameRulesString(const std::wstring &key)
|
||||
const wchar_t *GameRuleManager::GetGameRulesString(const std::wstring &key)
|
||||
{
|
||||
if(m_currentGameRuleDefinitions != NULL && !key.empty() )
|
||||
{
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ public:
|
|||
void setLevelGenerationOptions(LevelGenerationOptions *levelGen);
|
||||
LevelRuleset *getGameRuleDefinitions() { return m_currentGameRuleDefinitions; }
|
||||
LevelGenerationOptions *getLevelGenerationOptions() { return m_currentLevelGenerationOptions; }
|
||||
LPCWSTR GetGameRulesString(const std::wstring &key);
|
||||
const wchar_t *GetGameRulesString(const std::wstring &key);
|
||||
|
||||
// 4J-JEV:
|
||||
// Properly cleans-up and unloads the current set of gameRules.
|
||||
|
|
|
|||
|
|
@ -388,7 +388,7 @@ void LevelGenerationOptions::loadStringTable(StringTable *table)
|
|||
m_stringTable = table;
|
||||
}
|
||||
|
||||
LPCWSTR LevelGenerationOptions::getString(const std::wstring &key)
|
||||
const wchar_t *LevelGenerationOptions::getString(const std::wstring &key)
|
||||
{
|
||||
if(m_stringTable == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -202,7 +202,7 @@ public:
|
|||
bool isFeatureChunk(int chunkX, int chunkZ, StructureFeature::EFeatureTypes feature);
|
||||
|
||||
void loadStringTable(StringTable *table);
|
||||
LPCWSTR getString(const std::wstring &key);
|
||||
const wchar_t *getString(const std::wstring &key);
|
||||
|
||||
std::unordered_map<std::wstring, ConsoleSchematicFile *> *getUnfinishedSchematicFiles();
|
||||
|
||||
|
|
|
|||
|
|
@ -44,7 +44,7 @@ void LevelRuleset::loadStringTable(StringTable *table)
|
|||
m_stringTable = table;
|
||||
}
|
||||
|
||||
LPCWSTR LevelRuleset::getString(const std::wstring &key)
|
||||
const wchar_t *LevelRuleset::getString(const std::wstring &key)
|
||||
{
|
||||
if(m_stringTable == NULL)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@ public:
|
|||
virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_LevelRules; }
|
||||
|
||||
void loadStringTable(StringTable *table);
|
||||
LPCWSTR getString(const std::wstring &key);
|
||||
const wchar_t *getString(const std::wstring &key);
|
||||
|
||||
AABB *getNamedArea(const std::wstring &areaName);
|
||||
|
||||
StringTable *getStringTable() { return m_stringTable; }
|
||||
};
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in a new issue