From 85e55969b016392de8004a911961a6719e9616f8 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Fri, 18 Aug 2023 09:58:28 -0500 Subject: [PATCH] Renamed RocketLaunchLUP to MultiZoneEntrance --- dCommon/dEnums/eReplicaComponentType.h | 2 +- dGame/Entity.cpp | 8 ++++---- dGame/dComponents/CMakeLists.txt | 2 +- ...LupComponent.cpp => MultiZoneEntranceComponent.cpp} | 10 +++++----- ...unchLupComponent.h => MultiZoneEntranceComponent.h} | 9 ++++----- dGame/dComponents/RocketLaunchpadControlComponent.cpp | 4 ++-- dGame/dGameMessages/GameMessages.cpp | 8 ++++---- 7 files changed, 21 insertions(+), 22 deletions(-) rename dGame/dComponents/{RocketLaunchLupComponent.cpp => MultiZoneEntranceComponent.cpp} (72%) rename dGame/dComponents/{RocketLaunchLupComponent.h => MultiZoneEntranceComponent.h} (84%) diff --git a/dCommon/dEnums/eReplicaComponentType.h b/dCommon/dEnums/eReplicaComponentType.h index 2d24c19e4..a0be9dd45 100644 --- a/dCommon/dEnums/eReplicaComponentType.h +++ b/dCommon/dEnums/eReplicaComponentType.h @@ -101,7 +101,7 @@ enum class eReplicaComponentType : uint32_t { TRADE, USER_CONTROL, IGNORE_LIST, - ROCKET_LAUNCH_LUP, + MULTI_ZONE_ENTRANCE, BUFF_REAL, // the real buff component, should just be name BUFF INTERACTION_MANAGER, DONATION_VENDOR, diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index b5abe9189..b577d1f50 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -30,7 +30,7 @@ #include "Component.h" #include "ControllablePhysicsComponent.h" #include "RenderComponent.h" -#include "RocketLaunchLupComponent.h" +#include "MultiZoneEntranceComponent.h" #include "CharacterComponent.h" #include "DestroyableComponent.h" #include "BuffComponent.h" @@ -451,9 +451,9 @@ void Entity::Initialize() { m_Components.insert(std::make_pair(eReplicaComponentType::INVENTORY, comp)); } // if this component exists, then we initialize it. it's value is always 0 - if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::ROCKET_LAUNCH_LUP, -1) != -1) { - auto comp = new RocketLaunchLupComponent(this); - m_Components.insert(std::make_pair(eReplicaComponentType::ROCKET_LAUNCH_LUP, comp)); + if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::MULTI_ZONE_ENTRANCE, -1) != -1) { + auto comp = new MultiZoneEntranceComponent(this); + m_Components.insert(std::make_pair(eReplicaComponentType::MULTI_ZONE_ENTRANCE, comp)); } /** diff --git a/dGame/dComponents/CMakeLists.txt b/dGame/dComponents/CMakeLists.txt index 67f4ece54..6c02cf0bf 100644 --- a/dGame/dComponents/CMakeLists.txt +++ b/dGame/dComponents/CMakeLists.txt @@ -31,7 +31,7 @@ set(DGAME_DCOMPONENTS_SOURCES "BaseCombatAIComponent.cpp" "RebuildComponent.cpp" "RenderComponent.cpp" "RigidbodyPhantomPhysicsComponent.cpp" - "RocketLaunchLupComponent.cpp" + "MultiZoneEntranceComponent.cpp" "RocketLaunchpadControlComponent.cpp" "ScriptedActivityComponent.cpp" "ShootingGalleryComponent.cpp" diff --git a/dGame/dComponents/RocketLaunchLupComponent.cpp b/dGame/dComponents/MultiZoneEntranceComponent.cpp similarity index 72% rename from dGame/dComponents/RocketLaunchLupComponent.cpp rename to dGame/dComponents/MultiZoneEntranceComponent.cpp index 3c3265408..e5a510315 100644 --- a/dGame/dComponents/RocketLaunchLupComponent.cpp +++ b/dGame/dComponents/MultiZoneEntranceComponent.cpp @@ -1,9 +1,9 @@ -#include "RocketLaunchLupComponent.h" +#include "MultiZoneEntranceComponent.h" #include "RocketLaunchpadControlComponent.h" #include "InventoryComponent.h" #include "CharacterComponent.h" -RocketLaunchLupComponent::RocketLaunchLupComponent(Entity* parent) : Component(parent) { +MultiZoneEntranceComponent::MultiZoneEntranceComponent(Entity* parent) : Component(parent) { m_Parent = parent; std::string zoneString = GeneralUtils::UTF16ToWTF8(m_Parent->GetVar(u"MultiZoneIDs")); std::stringstream ss(zoneString); @@ -14,9 +14,9 @@ RocketLaunchLupComponent::RocketLaunchLupComponent(Entity* parent) : Component(p } } -RocketLaunchLupComponent::~RocketLaunchLupComponent() {} +MultiZoneEntranceComponent::~MultiZoneEntranceComponent() {} -void RocketLaunchLupComponent::OnUse(Entity* originator) { +void MultiZoneEntranceComponent::OnUse(Entity* originator) { auto* rocket = originator->GetComponent()->RocketEquip(originator); if (!rocket) return; @@ -24,7 +24,7 @@ void RocketLaunchLupComponent::OnUse(Entity* originator) { GameMessages::SendPropertyEntranceBegin(m_Parent->GetObjectID(), m_Parent->GetSystemAddress()); } -void RocketLaunchLupComponent::OnSelectWorld(Entity* originator, uint32_t index) { +void MultiZoneEntranceComponent::OnSelectWorld(Entity* originator, uint32_t index) { auto* rocketLaunchpadControlComponent = m_Parent->GetComponent(); if (!rocketLaunchpadControlComponent) return; diff --git a/dGame/dComponents/RocketLaunchLupComponent.h b/dGame/dComponents/MultiZoneEntranceComponent.h similarity index 84% rename from dGame/dComponents/RocketLaunchLupComponent.h rename to dGame/dComponents/MultiZoneEntranceComponent.h index 226fa1b23..9c1f4360b 100644 --- a/dGame/dComponents/RocketLaunchLupComponent.h +++ b/dGame/dComponents/MultiZoneEntranceComponent.h @@ -1,7 +1,6 @@ #pragma once #include "Entity.h" -#include "GameMessages.h" #include "Component.h" #include "eReplicaComponentType.h" @@ -9,16 +8,16 @@ * Component that handles the LUP/WBL rocket launchpad that can be interacted with to travel to WBL worlds. * */ -class RocketLaunchLupComponent : public Component { +class MultiZoneEntranceComponent : public Component { public: - static const eReplicaComponentType ComponentType = eReplicaComponentType::ROCKET_LAUNCH_LUP; + static const eReplicaComponentType ComponentType = eReplicaComponentType::MULTI_ZONE_ENTRANCE; /** * Constructor for this component, builds the m_LUPWorlds vector * @param parent parent that contains this component */ - RocketLaunchLupComponent(Entity* parent); - ~RocketLaunchLupComponent() override; + MultiZoneEntranceComponent(Entity* parent); + ~MultiZoneEntranceComponent() override; /** * Handles an OnUse event from some entity, preparing it for launch to some other world diff --git a/dGame/dComponents/RocketLaunchpadControlComponent.cpp b/dGame/dComponents/RocketLaunchpadControlComponent.cpp index 10908d9ef..c61ede231 100644 --- a/dGame/dComponents/RocketLaunchpadControlComponent.cpp +++ b/dGame/dComponents/RocketLaunchpadControlComponent.cpp @@ -13,7 +13,7 @@ #include "ChatPackets.h" #include "MissionComponent.h" #include "PropertyEntranceComponent.h" -#include "RocketLaunchLupComponent.h" +#include "MultiZoneEntranceComponent.h" #include "dServer.h" #include "PacketUtils.h" #include "eObjectWorldState.h" @@ -94,7 +94,7 @@ void RocketLaunchpadControlComponent::OnUse(Entity* originator) { return; } - auto* rocketLaunchLUP = m_Parent->GetComponent(); + auto* rocketLaunchLUP = m_Parent->GetComponent(); if (rocketLaunchLUP) { return; } diff --git a/dGame/dGameMessages/GameMessages.cpp b/dGame/dGameMessages/GameMessages.cpp index 020e0abee..6113b1eed 100644 --- a/dGame/dGameMessages/GameMessages.cpp +++ b/dGame/dGameMessages/GameMessages.cpp @@ -24,7 +24,7 @@ #include "dConfig.h" #include "TeamManager.h" #include "ChatPackets.h" -#include "RocketLaunchLupComponent.h" +#include "MultiZoneEntranceComponent.h" #include "eUnequippableActiveType.h" #include "eMovementPlatformState.h" #include "LeaderboardManager.h" @@ -2795,9 +2795,9 @@ void GameMessages::HandleEnterProperty(RakNet::BitStream* inStream, Entity* enti return; } - auto rocketLaunchLupComponent = entity->GetComponent(); - if (rocketLaunchLupComponent != nullptr) { - rocketLaunchLupComponent->OnSelectWorld(player, index); + auto multiZoneEntranceComponent = entity->GetComponent(); + if (multiZoneEntranceComponent != nullptr) { + multiZoneEntranceComponent->OnSelectWorld(player, index); } }