mirror of
https://github.com/4jcraft/4jcraft.git
synced 2026-08-20 09:57:10 +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);
|
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);
|
return m_gameRules.GetGameRulesString(key);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -719,7 +719,7 @@ public:
|
||||||
void setLevelGenerationOptions(LevelGenerationOptions *levelGen);
|
void setLevelGenerationOptions(LevelGenerationOptions *levelGen);
|
||||||
LevelRuleset *getGameRuleDefinitions() { return m_gameRules.getGameRuleDefinitions(); }
|
LevelRuleset *getGameRuleDefinitions() { return m_gameRules.getGameRuleDefinitions(); }
|
||||||
LevelGenerationOptions *getLevelGenerationOptions() { return m_gameRules.getLevelGenerationOptions(); }
|
LevelGenerationOptions *getLevelGenerationOptions() { return m_gameRules.getLevelGenerationOptions(); }
|
||||||
LPCWSTR GetGameRulesString(const std::wstring &key);
|
const wchar_t *GetGameRulesString(const std::wstring &key);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
BYTE m_playerColours[MINECRAFT_NET_MAX_PLAYERS]; // An array of QNet small-id's
|
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();
|
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() )
|
if(m_currentGameRuleDefinitions != NULL && !key.empty() )
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -72,7 +72,7 @@ public:
|
||||||
void setLevelGenerationOptions(LevelGenerationOptions *levelGen);
|
void setLevelGenerationOptions(LevelGenerationOptions *levelGen);
|
||||||
LevelRuleset *getGameRuleDefinitions() { return m_currentGameRuleDefinitions; }
|
LevelRuleset *getGameRuleDefinitions() { return m_currentGameRuleDefinitions; }
|
||||||
LevelGenerationOptions *getLevelGenerationOptions() { return m_currentLevelGenerationOptions; }
|
LevelGenerationOptions *getLevelGenerationOptions() { return m_currentLevelGenerationOptions; }
|
||||||
LPCWSTR GetGameRulesString(const std::wstring &key);
|
const wchar_t *GetGameRulesString(const std::wstring &key);
|
||||||
|
|
||||||
// 4J-JEV:
|
// 4J-JEV:
|
||||||
// Properly cleans-up and unloads the current set of gameRules.
|
// Properly cleans-up and unloads the current set of gameRules.
|
||||||
|
|
|
||||||
|
|
@ -388,7 +388,7 @@ void LevelGenerationOptions::loadStringTable(StringTable *table)
|
||||||
m_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)
|
if(m_stringTable == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -202,7 +202,7 @@ public:
|
||||||
bool isFeatureChunk(int chunkX, int chunkZ, StructureFeature::EFeatureTypes feature);
|
bool isFeatureChunk(int chunkX, int chunkZ, StructureFeature::EFeatureTypes feature);
|
||||||
|
|
||||||
void loadStringTable(StringTable *table);
|
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();
|
std::unordered_map<std::wstring, ConsoleSchematicFile *> *getUnfinishedSchematicFiles();
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -44,7 +44,7 @@ void LevelRuleset::loadStringTable(StringTable *table)
|
||||||
m_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)
|
if(m_stringTable == NULL)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ public:
|
||||||
virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_LevelRules; }
|
virtual ConsoleGameRules::EGameRuleType getActionType() { return ConsoleGameRules::eGameRuleType_LevelRules; }
|
||||||
|
|
||||||
void loadStringTable(StringTable *table);
|
void loadStringTable(StringTable *table);
|
||||||
LPCWSTR getString(const std::wstring &key);
|
const wchar_t *getString(const std::wstring &key);
|
||||||
|
|
||||||
AABB *getNamedArea(const std::wstring &areaName);
|
AABB *getNamedArea(const std::wstring &areaName);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue