mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-14 07:47:13 +00:00
refactor(component): the multi-zone entrance reads its worlds in LoadConfigData
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -8,6 +8,10 @@
|
||||
MultiZoneEntranceComponent::MultiZoneEntranceComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {
|
||||
RegisterMsg(&MultiZoneEntranceComponent::OnRequestUse);
|
||||
m_Parent = parent;
|
||||
}
|
||||
|
||||
// The level config: the LUP worlds this launches to
|
||||
void MultiZoneEntranceComponent::LoadConfigData() {
|
||||
std::string zoneString = GeneralUtils::UTF16ToWTF8(m_Parent->GetVar<std::u16string>(u"MultiZoneIDs"));
|
||||
std::stringstream ss(zoneString);
|
||||
for (int i; ss >> i;) {
|
||||
|
||||
@@ -19,6 +19,8 @@ public:
|
||||
MultiZoneEntranceComponent(Entity* parent, const int32_t componentID);
|
||||
~MultiZoneEntranceComponent() override;
|
||||
|
||||
void LoadConfigData() override;
|
||||
|
||||
/**
|
||||
* Handles a RequestUse from some entity, preparing it for launch to some other world
|
||||
* @param originator the entity that triggered the event
|
||||
|
||||
Reference in New Issue
Block a user