2022-05-03 20:05:29 +00:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include "Entity.h"
|
|
|
|
#include "Component.h"
|
2023-03-04 07:16:37 +00:00
|
|
|
#include "eReplicaComponentType.h"
|
2022-05-03 20:05:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Component that handles the LUP/WBL rocket launchpad that can be interacted with to travel to WBL worlds.
|
|
|
|
*/
|
2023-07-10 03:52:48 +00:00
|
|
|
class MultiZoneEntranceComponent final : public Component {
|
2022-05-03 20:05:29 +00:00
|
|
|
public:
|
2023-06-09 08:22:45 +00:00
|
|
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MULTI_ZONE_ENTRANCE;
|
2022-05-03 20:05:29 +00:00
|
|
|
|
2022-05-05 00:26:56 +00:00
|
|
|
/**
|
|
|
|
* Constructor for this component, builds the m_LUPWorlds vector
|
|
|
|
* @param parent parent that contains this component
|
|
|
|
*/
|
2023-07-10 03:52:48 +00:00
|
|
|
MultiZoneEntranceComponent(Entity* parent) : Component(parent) {};
|
|
|
|
|
|
|
|
void LoadConfigData() override;
|
2022-05-03 20:05:29 +00:00
|
|
|
|
2022-05-04 23:24:28 +00:00
|
|
|
/**
|
|
|
|
* Handles an OnUse event from some entity, preparing it for launch to some other world
|
|
|
|
* @param originator the entity that triggered the event
|
|
|
|
*/
|
2022-05-03 20:05:29 +00:00
|
|
|
void OnUse(Entity* originator) override;
|
|
|
|
|
2022-05-04 23:24:28 +00:00
|
|
|
/**
|
|
|
|
* Handles an OnUse event from some entity, preparing it for launch to some other world
|
|
|
|
* @param originator the entity that triggered the event
|
|
|
|
* @param index index of the world that was selected
|
|
|
|
*/
|
2023-07-10 03:52:48 +00:00
|
|
|
void OnSelectWorld(Entity* originator, const uint32_t index) const;
|
2022-05-03 20:05:29 +00:00
|
|
|
private:
|
2022-05-05 00:26:56 +00:00
|
|
|
/**
|
|
|
|
* vector of the LUP World Zone IDs, built from CDServer's LUPZoneIDs table
|
|
|
|
*/
|
2023-07-10 03:52:48 +00:00
|
|
|
std::vector<LWOMAPID> m_LUPWorlds;
|
2022-05-03 20:05:29 +00:00
|
|
|
};
|