mirror of
https://github.com/DarkflameUniverse/DarkflameServer
synced 2024-08-30 18:43:58 +00:00
chore: Misc. component cleanup (#1433)
* Misc component cleanup * Update InventoryComponent.h * Update MissionComponent.h * Update PropertyManagementComponent.h * Update PropertyVendorComponent.h * Update SkillComponent.h maximum pedantry B) * SoundTriggerComponent.h braces gone * Rename SoundTriggerComponent.h braces gone to SoundTriggerComponent.h I was tired
This commit is contained in:
parent
d5e757bd9d
commit
5225c86d65
@ -45,9 +45,9 @@ struct AiSkillEntry
|
|||||||
/**
|
/**
|
||||||
* Handles the AI of entities, making them wander, tether and attack their enemies
|
* Handles the AI of entities, making them wander, tether and attack their enemies
|
||||||
*/
|
*/
|
||||||
class BaseCombatAIComponent : public Component {
|
class BaseCombatAIComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::BASE_COMBAT_AI;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::BASE_COMBAT_AI;
|
||||||
|
|
||||||
BaseCombatAIComponent(Entity* parentEntity, uint32_t id);
|
BaseCombatAIComponent(Entity* parentEntity, uint32_t id);
|
||||||
~BaseCombatAIComponent() override;
|
~BaseCombatAIComponent() override;
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
/**
|
/**
|
||||||
* Attached to bouncer entities, allowing other entities to bounce off of it
|
* Attached to bouncer entities, allowing other entities to bounce off of it
|
||||||
*/
|
*/
|
||||||
class BouncerComponent : public Component {
|
class BouncerComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::BOUNCER;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::BOUNCER;
|
||||||
|
|
||||||
BouncerComponent(Entity* parentEntity);
|
BouncerComponent(Entity* parentEntity);
|
||||||
~BouncerComponent() override;
|
~BouncerComponent() override;
|
||||||
|
@ -47,9 +47,9 @@ struct Buff {
|
|||||||
/**
|
/**
|
||||||
* Allows for the application of buffs to the parent entity, altering health, armor and imagination.
|
* Allows for the application of buffs to the parent entity, altering health, armor and imagination.
|
||||||
*/
|
*/
|
||||||
class BuffComponent : public Component {
|
class BuffComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::BUFF;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::BUFF;
|
||||||
|
|
||||||
explicit BuffComponent(Entity* parent);
|
explicit BuffComponent(Entity* parent);
|
||||||
|
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
/**
|
/**
|
||||||
* Component for the build border, allowing the user to start building when interacting with it
|
* Component for the build border, allowing the user to start building when interacting with it
|
||||||
*/
|
*/
|
||||||
class BuildBorderComponent : public Component {
|
class BuildBorderComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::BUILD_BORDER;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::BUILD_BORDER;
|
||||||
|
|
||||||
BuildBorderComponent(Entity* parent);
|
BuildBorderComponent(Entity* parent);
|
||||||
~BuildBorderComponent() override;
|
~BuildBorderComponent() override;
|
||||||
|
@ -61,9 +61,9 @@ enum StatisticID {
|
|||||||
/**
|
/**
|
||||||
* Represents a character, including their rockets and stats
|
* Represents a character, including their rockets and stats
|
||||||
*/
|
*/
|
||||||
class CharacterComponent : public Component {
|
class CharacterComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::CHARACTER;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::CHARACTER;
|
||||||
|
|
||||||
CharacterComponent(Entity* parent, Character* character);
|
CharacterComponent(Entity* parent, Character* character);
|
||||||
~CharacterComponent() override;
|
~CharacterComponent() override;
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
#include "Component.h"
|
#include "Component.h"
|
||||||
#include "eReplicaComponentType.h"
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
class CollectibleComponent : public Component {
|
class CollectibleComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::COLLECTIBLE;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::COLLECTIBLE;
|
||||||
CollectibleComponent(Entity* parentEntity, int32_t collectibleId) : Component(parentEntity), m_CollectibleId(collectibleId) {}
|
CollectibleComponent(Entity* parentEntity, int32_t collectibleId) : Component(parentEntity), m_CollectibleId(collectibleId) {}
|
||||||
|
|
||||||
int16_t GetCollectibleId() const { return m_CollectibleId; }
|
int16_t GetCollectibleId() const { return m_CollectibleId; }
|
||||||
|
@ -7,8 +7,7 @@ class Entity;
|
|||||||
/**
|
/**
|
||||||
* Component base class, provides methods for game loop updates, usage events and loading and saving to XML.
|
* Component base class, provides methods for game loop updates, usage events and loading and saving to XML.
|
||||||
*/
|
*/
|
||||||
class Component
|
class Component {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
Component(Entity* parent);
|
Component(Entity* parent);
|
||||||
virtual ~Component();
|
virtual ~Component();
|
||||||
|
@ -21,7 +21,7 @@ enum class eStateChangeType : uint32_t;
|
|||||||
*/
|
*/
|
||||||
class ControllablePhysicsComponent : public PhysicsComponent {
|
class ControllablePhysicsComponent : public PhysicsComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::CONTROLLABLE_PHYSICS;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::CONTROLLABLE_PHYSICS;
|
||||||
|
|
||||||
ControllablePhysicsComponent(Entity* entity);
|
ControllablePhysicsComponent(Entity* entity);
|
||||||
~ControllablePhysicsComponent() override;
|
~ControllablePhysicsComponent() override;
|
||||||
|
@ -17,9 +17,9 @@ enum class eStateChangeType : uint32_t;
|
|||||||
* Represents the stats of an entity, for example its health, imagination and armor. Also handles factions, which
|
* Represents the stats of an entity, for example its health, imagination and armor. Also handles factions, which
|
||||||
* indicate which enemies this entity has.
|
* indicate which enemies this entity has.
|
||||||
*/
|
*/
|
||||||
class DestroyableComponent : public Component {
|
class DestroyableComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::DESTROYABLE;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::DESTROYABLE;
|
||||||
|
|
||||||
DestroyableComponent(Entity* parentEntity);
|
DestroyableComponent(Entity* parentEntity);
|
||||||
~DestroyableComponent() override;
|
~DestroyableComponent() override;
|
||||||
|
@ -8,7 +8,7 @@ class Entity;
|
|||||||
|
|
||||||
class DonationVendorComponent final : public VendorComponent {
|
class DonationVendorComponent final : public VendorComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::DONATION_VENDOR;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::DONATION_VENDOR;
|
||||||
DonationVendorComponent(Entity* parent);
|
DonationVendorComponent(Entity* parent);
|
||||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
||||||
uint32_t GetActivityID() {return m_ActivityId;};
|
uint32_t GetActivityID() {return m_ActivityId;};
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
class NiPoint3;
|
class NiPoint3;
|
||||||
|
|
||||||
class GhostComponent : public Component {
|
class GhostComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
static inline const eReplicaComponentType ComponentType = eReplicaComponentType::GHOST;
|
static inline const eReplicaComponentType ComponentType = eReplicaComponentType::GHOST;
|
||||||
GhostComponent(Entity* parent);
|
GhostComponent(Entity* parent);
|
||||||
|
@ -11,7 +11,7 @@
|
|||||||
*/
|
*/
|
||||||
class HavokVehiclePhysicsComponent : public PhysicsComponent {
|
class HavokVehiclePhysicsComponent : public PhysicsComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::HAVOK_VEHICLE_PHYSICS;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::HAVOK_VEHICLE_PHYSICS;
|
||||||
|
|
||||||
HavokVehiclePhysicsComponent(Entity* parentEntity);
|
HavokVehiclePhysicsComponent(Entity* parentEntity);
|
||||||
|
|
||||||
|
@ -35,10 +35,9 @@ enum class eItemType : int32_t;
|
|||||||
* of different types, each type representing a different group of items, see `eInventoryType` for a list of
|
* of different types, each type representing a different group of items, see `eInventoryType` for a list of
|
||||||
* inventories.
|
* inventories.
|
||||||
*/
|
*/
|
||||||
class InventoryComponent : public Component
|
class InventoryComponent final : public Component {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::INVENTORY;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::INVENTORY;
|
||||||
explicit InventoryComponent(Entity* parent, tinyxml2::XMLDocument* document = nullptr);
|
explicit InventoryComponent(Entity* parent, tinyxml2::XMLDocument* document = nullptr);
|
||||||
|
|
||||||
void Update(float deltaTime) override;
|
void Update(float deltaTime) override;
|
||||||
|
@ -4,9 +4,9 @@
|
|||||||
#include "Component.h"
|
#include "Component.h"
|
||||||
#include "eReplicaComponentType.h"
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
class ItemComponent : public Component {
|
class ItemComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::ITEM;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::ITEM;
|
||||||
|
|
||||||
ItemComponent(Entity* entity) : Component(entity) {}
|
ItemComponent(Entity* entity) : Component(entity) {}
|
||||||
|
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
* Component that handles the LOT that is shown in the LUP exhibit in the LUP world. Works by setting a timer and
|
* Component that handles the LOT that is shown in the LUP exhibit in the LUP world. Works by setting a timer and
|
||||||
* switching the LOTs around that we'd like to display.
|
* switching the LOTs around that we'd like to display.
|
||||||
*/
|
*/
|
||||||
class LUPExhibitComponent : public Component
|
class LUPExhibitComponent final : public Component
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::LUP_EXHIBIT;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::LUP_EXHIBIT;
|
||||||
|
|
||||||
LUPExhibitComponent(Entity* parent) : Component(parent) {};
|
LUPExhibitComponent(Entity* parent) : Component(parent) {};
|
||||||
void Update(float deltaTime) override;
|
void Update(float deltaTime) override;
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
|
|
||||||
class LevelProgressionComponent : public Component {
|
class LevelProgressionComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::LEVEL_PROGRESSION;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::LEVEL_PROGRESSION;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for this component
|
* Constructor for this component
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
class MiniGameControlComponent final : public Component {
|
class MiniGameControlComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MINI_GAME_CONTROL;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::MINI_GAME_CONTROL;
|
||||||
|
|
||||||
MiniGameControlComponent(Entity* parent) : Component(parent) {}
|
MiniGameControlComponent(Entity* parent) : Component(parent) {}
|
||||||
void Serialize(RakNet::BitStream* outBitStream, bool isConstruction);
|
void Serialize(RakNet::BitStream* outBitStream, bool isConstruction);
|
||||||
|
@ -24,10 +24,9 @@ class AchievementCacheKey;
|
|||||||
* The mission inventory of an entity. Tracks mission state for each mission that can be accepted and allows for
|
* The mission inventory of an entity. Tracks mission state for each mission that can be accepted and allows for
|
||||||
* progression of each of the mission task types (see eMissionTaskType).
|
* progression of each of the mission task types (see eMissionTaskType).
|
||||||
*/
|
*/
|
||||||
class MissionComponent : public Component
|
class MissionComponent final : public Component {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MISSION;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::MISSION;
|
||||||
|
|
||||||
explicit MissionComponent(Entity* parent);
|
explicit MissionComponent(Entity* parent);
|
||||||
~MissionComponent() override;
|
~MissionComponent() override;
|
||||||
|
@ -59,9 +59,9 @@ private:
|
|||||||
/**
|
/**
|
||||||
* Allows entities to offer missions to other entities, depending on their mission inventory progression.
|
* Allows entities to offer missions to other entities, depending on their mission inventory progression.
|
||||||
*/
|
*/
|
||||||
class MissionOfferComponent : public Component {
|
class MissionOfferComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MISSION_OFFER;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::MISSION_OFFER;
|
||||||
|
|
||||||
MissionOfferComponent(Entity* parent, LOT parentLot);
|
MissionOfferComponent(Entity* parent, LOT parentLot);
|
||||||
|
|
||||||
|
@ -22,9 +22,9 @@ class MoveToInventoryMessage;
|
|||||||
/**
|
/**
|
||||||
* Component that represents entities that are a model, e.g. collectible models and BBB models.
|
* Component that represents entities that are a model, e.g. collectible models and BBB models.
|
||||||
*/
|
*/
|
||||||
class ModelComponent : public Component {
|
class ModelComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MODEL;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::MODEL;
|
||||||
|
|
||||||
ModelComponent(Entity* parent);
|
ModelComponent(Entity* parent);
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
* same as having said items in your inventory (the subkey for this component) this component is the one that
|
* same as having said items in your inventory (the subkey for this component) this component is the one that
|
||||||
* renders the entity into the world.
|
* renders the entity into the world.
|
||||||
*/
|
*/
|
||||||
class ModuleAssemblyComponent : public Component {
|
class ModuleAssemblyComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MODULE_ASSEMBLY;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::MODULE_ASSEMBLY;
|
||||||
|
|
||||||
ModuleAssemblyComponent(Entity* parent);
|
ModuleAssemblyComponent(Entity* parent);
|
||||||
~ModuleAssemblyComponent() override;
|
~ModuleAssemblyComponent() override;
|
||||||
|
@ -55,9 +55,9 @@ struct MovementAIInfo {
|
|||||||
* Component that handles the movement settings of an entity. Not to be confused with the BaseCombatAI component that
|
* Component that handles the movement settings of an entity. Not to be confused with the BaseCombatAI component that
|
||||||
* actually handles attackig and following enemy entities.
|
* actually handles attackig and following enemy entities.
|
||||||
*/
|
*/
|
||||||
class MovementAIComponent : public Component {
|
class MovementAIComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MOVEMENT_AI;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::MOVEMENT_AI;
|
||||||
|
|
||||||
MovementAIComponent(Entity* parentEntity, MovementAIInfo info);
|
MovementAIComponent(Entity* parentEntity, MovementAIInfo info);
|
||||||
|
|
||||||
|
@ -104,9 +104,9 @@ public:
|
|||||||
* don't at all do what you expect them to as we don't instruct the client of changes made here.
|
* don't at all do what you expect them to as we don't instruct the client of changes made here.
|
||||||
* ^^^ Trivia: This made the red blocks platform and property platforms a pain to implement.
|
* ^^^ Trivia: This made the red blocks platform and property platforms a pain to implement.
|
||||||
*/
|
*/
|
||||||
class MovingPlatformComponent : public Component {
|
class MovingPlatformComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MOVING_PLATFORM;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::MOVING_PLATFORM;
|
||||||
|
|
||||||
MovingPlatformComponent(Entity* parent, const std::string& pathName);
|
MovingPlatformComponent(Entity* parent, const std::string& pathName);
|
||||||
~MovingPlatformComponent() override;
|
~MovingPlatformComponent() override;
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
* Component that handles the LUP/WBL rocket launchpad that can be interacted with to travel to WBL worlds.
|
* Component that handles the LUP/WBL rocket launchpad that can be interacted with to travel to WBL worlds.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class MultiZoneEntranceComponent : public Component {
|
class MultiZoneEntranceComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MULTI_ZONE_ENTRANCE;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::MULTI_ZONE_ENTRANCE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for this component, builds the m_LUPWorlds vector
|
* Constructor for this component, builds the m_LUPWorlds vector
|
||||||
|
@ -13,10 +13,10 @@
|
|||||||
* Represents an entity that is a pet. This pet can be tamed and consequently follows the tamer around, allowing it
|
* Represents an entity that is a pet. This pet can be tamed and consequently follows the tamer around, allowing it
|
||||||
* to dig for treasure and activate pet bouncers.
|
* to dig for treasure and activate pet bouncers.
|
||||||
*/
|
*/
|
||||||
class PetComponent : public Component
|
class PetComponent final : public Component
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PET;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PET;
|
||||||
|
|
||||||
explicit PetComponent(Entity* parentEntity, uint32_t componentId);
|
explicit PetComponent(Entity* parentEntity, uint32_t componentId);
|
||||||
~PetComponent() override;
|
~PetComponent() override;
|
||||||
|
@ -25,9 +25,9 @@ enum class ePhysicsEffectType : uint32_t ;
|
|||||||
* trigger gameplay events, for example the bus in Avant Gardens that moves around when the player touches its physics
|
* trigger gameplay events, for example the bus in Avant Gardens that moves around when the player touches its physics
|
||||||
* body. Optionally this object can also have effects, like the fans in AG.
|
* body. Optionally this object can also have effects, like the fans in AG.
|
||||||
*/
|
*/
|
||||||
class PhantomPhysicsComponent : public PhysicsComponent {
|
class PhantomPhysicsComponent final : public PhysicsComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PHANTOM_PHYSICS;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PHANTOM_PHYSICS;
|
||||||
|
|
||||||
PhantomPhysicsComponent(Entity* parent);
|
PhantomPhysicsComponent(Entity* parent);
|
||||||
~PhantomPhysicsComponent() override;
|
~PhantomPhysicsComponent() override;
|
||||||
|
@ -8,9 +8,9 @@
|
|||||||
* Component that handles player forced movement
|
* Component that handles player forced movement
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
class PlayerForcedMovementComponent : public Component {
|
class PlayerForcedMovementComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PLAYER_FORCED_MOVEMENT;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PLAYER_FORCED_MOVEMENT;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Constructor for this component
|
* Constructor for this component
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
* Represents an entity that can be controlled by some other entity, generally used by cars to indicate that some
|
* Represents an entity that can be controlled by some other entity, generally used by cars to indicate that some
|
||||||
* player is controlling it.
|
* player is controlling it.
|
||||||
*/
|
*/
|
||||||
class PossessableComponent : public Component {
|
class PossessableComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::POSSESSABLE;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::POSSESSABLE;
|
||||||
|
|
||||||
PossessableComponent(Entity* parentEntity, uint32_t componentId);
|
PossessableComponent(Entity* parentEntity, uint32_t componentId);
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ enum class ePossessionType : uint8_t {
|
|||||||
/**
|
/**
|
||||||
* Represents an entity that can posess other entities. Generally used by players to drive a car.
|
* Represents an entity that can posess other entities. Generally used by players to drive a car.
|
||||||
*/
|
*/
|
||||||
class PossessorComponent : public Component {
|
class PossessorComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::POSSESSOR;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::POSSESSOR;
|
||||||
|
|
||||||
PossessorComponent(Entity* parent);
|
PossessorComponent(Entity* parent);
|
||||||
~PossessorComponent() override;
|
~PossessorComponent() override;
|
||||||
|
@ -20,9 +20,9 @@ struct PropertyState {
|
|||||||
/**
|
/**
|
||||||
* This component is unused and has no functionality
|
* This component is unused and has no functionality
|
||||||
*/
|
*/
|
||||||
class PropertyComponent : public Component {
|
class PropertyComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY;
|
||||||
explicit PropertyComponent(Entity* parentEntity);
|
explicit PropertyComponent(Entity* parentEntity);
|
||||||
~PropertyComponent() override;
|
~PropertyComponent() override;
|
||||||
[[nodiscard]] PropertyState* GetPropertyState() const { return m_PropertyState; };
|
[[nodiscard]] PropertyState* GetPropertyState() const { return m_PropertyState; };
|
||||||
|
@ -11,10 +11,10 @@
|
|||||||
/**
|
/**
|
||||||
* Represents the launch pad that's used to select and browse properties
|
* Represents the launch pad that's used to select and browse properties
|
||||||
*/
|
*/
|
||||||
class PropertyEntranceComponent : public Component {
|
class PropertyEntranceComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
explicit PropertyEntranceComponent(Entity* parent, uint32_t componentID);
|
explicit PropertyEntranceComponent(Entity* parent, uint32_t componentID);
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_ENTRANCE;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_ENTRANCE;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles an OnUse request for some other entity, rendering the property browse menu
|
* Handles an OnUse request for some other entity, rendering the property browse menu
|
||||||
|
@ -8,8 +8,7 @@
|
|||||||
/**
|
/**
|
||||||
* Information regarding which players may visit this property
|
* Information regarding which players may visit this property
|
||||||
*/
|
*/
|
||||||
enum class PropertyPrivacyOption
|
enum class PropertyPrivacyOption {
|
||||||
{
|
|
||||||
/**
|
/**
|
||||||
* Default, only you can visit your property
|
* Default, only you can visit your property
|
||||||
*/
|
*/
|
||||||
@ -29,10 +28,9 @@ enum class PropertyPrivacyOption
|
|||||||
/**
|
/**
|
||||||
* Main component that handles interactions with a property, generally the plaques you see on properties.
|
* Main component that handles interactions with a property, generally the plaques you see on properties.
|
||||||
*/
|
*/
|
||||||
class PropertyManagementComponent : public Component
|
class PropertyManagementComponent final : public Component {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_MANAGEMENT;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_MANAGEMENT;
|
||||||
PropertyManagementComponent(Entity* parent);
|
PropertyManagementComponent(Entity* parent);
|
||||||
static PropertyManagementComponent* Instance();
|
static PropertyManagementComponent* Instance();
|
||||||
|
|
||||||
|
@ -7,10 +7,9 @@
|
|||||||
/**
|
/**
|
||||||
* The property guard that stands on a property before it's claimed, allows entities to attempt claiming this property.
|
* The property guard that stands on a property before it's claimed, allows entities to attempt claiming this property.
|
||||||
*/
|
*/
|
||||||
class PropertyVendorComponent : public Component
|
class PropertyVendorComponent final : public Component {
|
||||||
{
|
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_VENDOR;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROPERTY_VENDOR;
|
||||||
explicit PropertyVendorComponent(Entity* parent);
|
explicit PropertyVendorComponent(Entity* parent);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -17,9 +17,9 @@
|
|||||||
* Utility component for detecting how close entities are to named proximities for this entity. Allows you to store
|
* Utility component for detecting how close entities are to named proximities for this entity. Allows you to store
|
||||||
* proximity checks for multiple ojects.
|
* proximity checks for multiple ojects.
|
||||||
*/
|
*/
|
||||||
class ProximityMonitorComponent : public Component {
|
class ProximityMonitorComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::PROXIMITY_MONITOR;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROXIMITY_MONITOR;
|
||||||
|
|
||||||
ProximityMonitorComponent(Entity* parentEntity, int smallRadius = -1, int largeRadius = -1);
|
ProximityMonitorComponent(Entity* parentEntity, int smallRadius = -1, int largeRadius = -1);
|
||||||
~ProximityMonitorComponent() override;
|
~ProximityMonitorComponent() override;
|
||||||
|
@ -20,9 +20,9 @@ enum class eQuickBuildFailReason : uint32_t;
|
|||||||
* consists of an activator that shows a popup and then the actual entity that the bricks are built into. Note
|
* consists of an activator that shows a popup and then the actual entity that the bricks are built into. Note
|
||||||
* that quick builds are also scripted activities so this shared some logic with the ScriptedActivityComponent.
|
* that quick builds are also scripted activities so this shared some logic with the ScriptedActivityComponent.
|
||||||
*/
|
*/
|
||||||
class QuickBuildComponent : public Component {
|
class QuickBuildComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::QUICK_BUILD;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::QUICK_BUILD;
|
||||||
|
|
||||||
QuickBuildComponent(Entity* entity);
|
QuickBuildComponent(Entity* entity);
|
||||||
~QuickBuildComponent() override;
|
~QuickBuildComponent() override;
|
||||||
|
@ -103,9 +103,9 @@ struct RacingPlayerInfo {
|
|||||||
/**
|
/**
|
||||||
* Component that's attached to a manager entity in each race zone that loads player vehicles, keep scores, etc.
|
* Component that's attached to a manager entity in each race zone that loads player vehicles, keep scores, etc.
|
||||||
*/
|
*/
|
||||||
class RacingControlComponent : public Component {
|
class RacingControlComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_CONTROL;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::RACING_CONTROL;
|
||||||
|
|
||||||
RacingControlComponent(Entity* parentEntity);
|
RacingControlComponent(Entity* parentEntity);
|
||||||
~RacingControlComponent();
|
~RacingControlComponent();
|
||||||
|
@ -8,7 +8,7 @@ class Entity;
|
|||||||
|
|
||||||
class RacingSoundTriggerComponent : public SoundTriggerComponent {
|
class RacingSoundTriggerComponent : public SoundTriggerComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_SOUND_TRIGGER;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::RACING_SOUND_TRIGGER;
|
||||||
RacingSoundTriggerComponent(Entity* parent) : SoundTriggerComponent(parent){};
|
RacingSoundTriggerComponent(Entity* parent) : SoundTriggerComponent(parent){};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
class RacingStatsComponent final : public Component {
|
class RacingStatsComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_STATS;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::RACING_STATS;
|
||||||
|
|
||||||
RacingStatsComponent(Entity* parent) : Component(parent) {}
|
RacingStatsComponent(Entity* parent) : Component(parent) {}
|
||||||
};
|
};
|
||||||
|
@ -15,7 +15,7 @@ public:
|
|||||||
explicit RailActivatorComponent(Entity* parent, int32_t componentID);
|
explicit RailActivatorComponent(Entity* parent, int32_t componentID);
|
||||||
~RailActivatorComponent() override;
|
~RailActivatorComponent() override;
|
||||||
|
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RAIL_ACTIVATOR;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::RAIL_ACTIVATOR;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Handles the OnUse event from some entity, initiates the rail movement
|
* Handles the OnUse event from some entity, initiates the rail movement
|
||||||
|
@ -54,9 +54,9 @@ struct Effect {
|
|||||||
* Determines that a component should be visibly rendered into the world, most entities have this. This component
|
* Determines that a component should be visibly rendered into the world, most entities have this. This component
|
||||||
* also handles effects that play for entities.
|
* also handles effects that play for entities.
|
||||||
*/
|
*/
|
||||||
class RenderComponent : public Component {
|
class RenderComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RENDER;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::RENDER;
|
||||||
|
|
||||||
RenderComponent(Entity* entity, int32_t componentId = -1);
|
RenderComponent(Entity* entity, int32_t componentId = -1);
|
||||||
~RenderComponent() override;
|
~RenderComponent() override;
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
*/
|
*/
|
||||||
class RigidbodyPhantomPhysicsComponent : public PhysicsComponent {
|
class RigidbodyPhantomPhysicsComponent : public PhysicsComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RIGID_BODY_PHANTOM_PHYSICS;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::RIGID_BODY_PHANTOM_PHYSICS;
|
||||||
|
|
||||||
RigidbodyPhantomPhysicsComponent(Entity* parent);
|
RigidbodyPhantomPhysicsComponent(Entity* parent);
|
||||||
|
|
||||||
|
@ -16,9 +16,9 @@ class PreconditionExpression;
|
|||||||
/**
|
/**
|
||||||
* Component that handles rocket launchpads that can be interacted with to travel to other worlds.
|
* Component that handles rocket launchpads that can be interacted with to travel to other worlds.
|
||||||
*/
|
*/
|
||||||
class RocketLaunchpadControlComponent : public Component {
|
class RocketLaunchpadControlComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::ROCKET_LAUNCH;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::ROCKET_LAUNCH;
|
||||||
|
|
||||||
RocketLaunchpadControlComponent(Entity* parent, int rocketId);
|
RocketLaunchpadControlComponent(Entity* parent, int rocketId);
|
||||||
~RocketLaunchpadControlComponent() override;
|
~RocketLaunchpadControlComponent() override;
|
||||||
|
@ -6,9 +6,9 @@
|
|||||||
|
|
||||||
class Entity;
|
class Entity;
|
||||||
|
|
||||||
class ScriptedActivityComponent : public ActivityComponent {
|
class ScriptedActivityComponent final : public ActivityComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SCRIPTED_ACTIVITY;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SCRIPTED_ACTIVITY;
|
||||||
ScriptedActivityComponent(Entity* parent, int activityID) : ActivityComponent(parent, activityID){};
|
ScriptedActivityComponent(Entity* parent, int activityID) : ActivityComponent(parent, activityID){};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -71,9 +71,9 @@ struct StaticShootingGalleryParams {
|
|||||||
* A very ancient component that was used to guide shooting galleries, it's still kind of used but a lot of logic is
|
* A very ancient component that was used to guide shooting galleries, it's still kind of used but a lot of logic is
|
||||||
* also in the related scripts.
|
* also in the related scripts.
|
||||||
*/
|
*/
|
||||||
class ShootingGalleryComponent : public Component {
|
class ShootingGalleryComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SHOOTING_GALLERY;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SHOOTING_GALLERY;
|
||||||
|
|
||||||
explicit ShootingGalleryComponent(Entity* parent);
|
explicit ShootingGalleryComponent(Entity* parent);
|
||||||
~ShootingGalleryComponent();
|
~ShootingGalleryComponent();
|
||||||
|
@ -28,7 +28,7 @@ enum class eClimbableType : int32_t {
|
|||||||
*/
|
*/
|
||||||
class SimplePhysicsComponent : public PhysicsComponent {
|
class SimplePhysicsComponent : public PhysicsComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SIMPLE_PHYSICS;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SIMPLE_PHYSICS;
|
||||||
|
|
||||||
SimplePhysicsComponent(Entity* parent, uint32_t componentID);
|
SimplePhysicsComponent(Entity* parent, uint32_t componentID);
|
||||||
~SimplePhysicsComponent() override;
|
~SimplePhysicsComponent() override;
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Darkflame Universe
|
* Darkflame Universe
|
||||||
* Copyright 2018
|
* Copyright 2024
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef SKILLCOMPONENT_H
|
#ifndef SKILLCOMPONENT_H
|
||||||
@ -55,11 +55,11 @@ struct SkillExecutionResult {
|
|||||||
*
|
*
|
||||||
* Skills are a built up by a tree of behaviors. See dGame/dBehaviors/ for a list of behaviors.
|
* Skills are a built up by a tree of behaviors. See dGame/dBehaviors/ for a list of behaviors.
|
||||||
*
|
*
|
||||||
* This system is very conveluted and still has a lot of unknowns.
|
* This system is very convoluted and still has a lot of unknowns.
|
||||||
*/
|
*/
|
||||||
class SkillComponent : public Component {
|
class SkillComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SKILL;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SKILL;
|
||||||
|
|
||||||
explicit SkillComponent(Entity* parent);
|
explicit SkillComponent(Entity* parent);
|
||||||
~SkillComponent() override;
|
~SkillComponent() override;
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "dCommonVars.h"
|
#include "dCommonVars.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "GUID.h"
|
#include "GUID.h"
|
||||||
@ -58,7 +59,7 @@ struct MixerProgram{
|
|||||||
|
|
||||||
class SoundTriggerComponent : public Component {
|
class SoundTriggerComponent : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SOUND_TRIGGER;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SOUND_TRIGGER;
|
||||||
explicit SoundTriggerComponent(Entity* parent);
|
explicit SoundTriggerComponent(Entity* parent);
|
||||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
||||||
void ActivateMusicCue(const std::string& name, float bordemTime = -1.0);
|
void ActivateMusicCue(const std::string& name, float bordemTime = -1.0);
|
||||||
@ -66,11 +67,11 @@ public:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
std::vector<MusicCue> m_MusicCues = {};
|
std::vector<MusicCue> m_MusicCues;
|
||||||
std::vector<MusicParameter> m_MusicParameters = {};
|
std::vector<MusicParameter> m_MusicParameters;
|
||||||
std::vector<GUIDResults> m_2DAmbientSounds = {};
|
std::vector<GUIDResults> m_2DAmbientSounds;
|
||||||
std::vector<GUIDResults> m_3DAmbientSounds = {};
|
std::vector<GUIDResults> m_3DAmbientSounds;
|
||||||
std::vector<MixerProgram> m_MixerPrograms = {};
|
std::vector<MixerProgram> m_MixerPrograms;
|
||||||
|
|
||||||
bool m_Dirty = false;
|
bool m_Dirty = false;
|
||||||
};
|
};
|
||||||
|
@ -14,9 +14,9 @@
|
|||||||
/**
|
/**
|
||||||
* A component for switches in game, including pet triggered switches.
|
* A component for switches in game, including pet triggered switches.
|
||||||
*/
|
*/
|
||||||
class SwitchComponent : public Component {
|
class SwitchComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SWITCH;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SWITCH;
|
||||||
|
|
||||||
SwitchComponent(Entity* parent);
|
SwitchComponent(Entity* parent);
|
||||||
~SwitchComponent() override;
|
~SwitchComponent() override;
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
#include "LUTriggers.h"
|
#include "LUTriggers.h"
|
||||||
#include "eReplicaComponentType.h"
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
class TriggerComponent : public Component {
|
class TriggerComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::TRIGGER;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::TRIGGER;
|
||||||
|
|
||||||
explicit TriggerComponent(Entity* parent, const std::string triggerInfo);
|
explicit TriggerComponent(Entity* parent, const std::string triggerInfo);
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ struct SoldItem {
|
|||||||
|
|
||||||
class VendorComponent : public Component {
|
class VendorComponent : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::VENDOR;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::VENDOR;
|
||||||
VendorComponent(Entity* parent);
|
VendorComponent(Entity* parent);
|
||||||
|
|
||||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
||||||
|
@ -17,9 +17,9 @@ class Entity;
|
|||||||
* Handles the loading and execution of server side scripts on entities, scripts were originally written in Lua,
|
* Handles the loading and execution of server side scripts on entities, scripts were originally written in Lua,
|
||||||
* here they're written in C++
|
* here they're written in C++
|
||||||
*/
|
*/
|
||||||
class ScriptComponent : public Component {
|
class ScriptComponent final : public Component {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SCRIPT;
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SCRIPT;
|
||||||
|
|
||||||
ScriptComponent(Entity* parent, std::string scriptName, bool serialized, bool client = false);
|
ScriptComponent(Entity* parent, std::string scriptName, bool serialized, bool client = false);
|
||||||
~ScriptComponent() override;
|
~ScriptComponent() override;
|
||||||
|
Loading…
Reference in New Issue
Block a user