Remove GameConfig (#874)

* Remove GameConfig

* Fully remove GmeConfig

* Update worldconfig.ini

Co-authored-by: Aaron Kimbrell <aronwk.aaron@gmail.com>
This commit is contained in:
David Markowitz
2023-01-06 21:21:40 -08:00
committed by GitHub
parent fc75d6048f
commit 1ac898ba00
8 changed files with 4 additions and 114 deletions

View File

@@ -63,7 +63,6 @@
#include "BuffComponent.h"
#include "SkillComponent.h"
#include "VanityUtilities.h"
#include "GameConfig.h"
#include "ScriptedActivityComponent.h"
#include "LevelProgressionComponent.h"
#include "AssetManager.h"
@@ -1701,25 +1700,6 @@ void SlashCommandHandler::HandleChatCommand(const std::u16string& command, Entit
return;
}
if (chatCommand == "config-set" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER && args.size() >= 2) {
GameConfig::SetValue(args[0], args[1]);
ChatPackets::SendSystemMessage(
sysAddr, u"Set config value: " + GeneralUtils::UTF8ToUTF16(args[0]) + u" to " + GeneralUtils::UTF8ToUTF16(args[1])
);
}
if (chatCommand == "config-get" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER && args.size() >= 1) {
const auto& value = GameConfig::GetValue(args[0]);
std::u16string u16key = GeneralUtils::UTF8ToUTF16(args[0]);
if (value.empty()) {
ChatPackets::SendSystemMessage(sysAddr, u"No value found for " + u16key);
} else {
ChatPackets::SendSystemMessage(sysAddr, u"Value for " + u16key + u": " + GeneralUtils::UTF8ToUTF16(value));
}
}
if (chatCommand == "metrics" && entity->GetGMLevel() >= GAME_MASTER_LEVEL_DEVELOPER) {
for (const auto variable : Metrics::GetAllMetrics()) {
auto* metric = Metrics::GetMetric(variable);