mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 15:57:13 +00:00
refactor(component): the switch reads its reset time and factions in LoadConfigData
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -12,9 +12,13 @@ SwitchComponent::SwitchComponent(Entity* parent, const int32_t componentID) : Co
|
||||
RegisterMsg(&SwitchComponent::OnRequestUse);
|
||||
m_Active = false;
|
||||
|
||||
m_QuickBuild = m_Parent->GetComponent<QuickBuildComponent>();
|
||||
}
|
||||
|
||||
// The level config: the reset time and the factions this responds to
|
||||
void SwitchComponent::LoadConfigData() {
|
||||
m_ResetTime = m_Parent->GetVarAs<int32_t>(u"switch_reset_time");
|
||||
|
||||
m_QuickBuild = m_Parent->GetComponent<QuickBuildComponent>();
|
||||
|
||||
const auto factions = GeneralUtils::SplitString(m_Parent->GetVar<std::u16string>(u"respond_to_faction"), u':');
|
||||
for (const auto& faction : factions) {
|
||||
|
||||
Reference in New Issue
Block a user