mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-25 23:13:35 +00:00
scaffold activity based components
This commit is contained in:
parent
c78760db59
commit
f27e0400e7
5
dGame/dComponents/ActivityComponent.cpp
Normal file
5
dGame/dComponents/ActivityComponent.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "ActivityComponent.h"
|
||||||
|
|
||||||
|
ActivityComponent::ActivityComponent(Entity* parent) : Component(parent) {
|
||||||
|
|
||||||
|
}
|
17
dGame/dComponents/ActivityComponent.h
Normal file
17
dGame/dComponents/ActivityComponent.h
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
#ifndef __ACTIVITYCOMPONENT__H__
|
||||||
|
#define __ACTIVITYCOMPONENT__H__
|
||||||
|
|
||||||
|
#include "Component.h"
|
||||||
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
|
class Entity;
|
||||||
|
|
||||||
|
class ActivityComponent : public Component {
|
||||||
|
public:
|
||||||
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::INVALID;
|
||||||
|
ActivityComponent(Entity* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //!__ACTIVITYCOMPONENT__H__
|
||||||
|
|
||||||
|
|
5
dGame/dComponents/BaseRacingControlComponent.cpp
Normal file
5
dGame/dComponents/BaseRacingControlComponent.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "BaseRacingControlComponent.h"
|
||||||
|
|
||||||
|
BaseRacingControlComponent::BaseRacingControlComponent(Entity* parent) : Component(parent) {
|
||||||
|
|
||||||
|
}
|
16
dGame/dComponents/BaseRacingControlComponent.h
Normal file
16
dGame/dComponents/BaseRacingControlComponent.h
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
#ifndef __BASERACINGCONTROLCOMPONENT__H__
|
||||||
|
#define __BASERACINGCONTROLCOMPONENT__H__
|
||||||
|
|
||||||
|
#include "ScriptedActivityComponent.h"
|
||||||
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
|
class Entity;
|
||||||
|
|
||||||
|
class BaseRacingControlComponent : public ScriptedActivityComponent {
|
||||||
|
public:
|
||||||
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_CONTROL;
|
||||||
|
BaseRacingControlComponent(Entity* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#endif //!__BASERACINGCONTROLCOMPONENT__H__
|
@ -1,4 +1,6 @@
|
|||||||
set(DGAME_DCOMPONENTS_SOURCES "BaseCombatAIComponent.cpp"
|
set(DGAME_DCOMPONENTS_SOURCES "ActivityComponent.cpp"
|
||||||
|
"BaseCombatAIComponent.cpp"
|
||||||
|
"BaseRacingControlComponent.cpp"
|
||||||
"BouncerComponent.cpp"
|
"BouncerComponent.cpp"
|
||||||
"BuffComponent.cpp"
|
"BuffComponent.cpp"
|
||||||
"BuildBorderComponent.cpp"
|
"BuildBorderComponent.cpp"
|
||||||
@ -30,6 +32,7 @@ set(DGAME_DCOMPONENTS_SOURCES "BaseCombatAIComponent.cpp"
|
|||||||
"PropertyVendorComponent.cpp"
|
"PropertyVendorComponent.cpp"
|
||||||
"ProximityMonitorComponent.cpp"
|
"ProximityMonitorComponent.cpp"
|
||||||
"RacingControlComponent.cpp"
|
"RacingControlComponent.cpp"
|
||||||
|
"RacingSoundTriggerComponent.cpp"
|
||||||
"RacingStatsComponent.cpp"
|
"RacingStatsComponent.cpp"
|
||||||
"RailActivatorComponent.cpp"
|
"RailActivatorComponent.cpp"
|
||||||
"QuickBuildComponent.cpp"
|
"QuickBuildComponent.cpp"
|
||||||
|
5
dGame/dComponents/GateRushControlComponent.cpp
Normal file
5
dGame/dComponents/GateRushControlComponent.cpp
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
#include "GateRushControlComponent.h"
|
||||||
|
|
||||||
|
GateRushControlComponent::GateRushControlComponent(Entity* parent) : BaseRacingControlComponent(parent) {
|
||||||
|
|
||||||
|
}
|
15
dGame/dComponents/GateRushControlComponent.h
Normal file
15
dGame/dComponents/GateRushControlComponent.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef __GATERUSHCONTROLCOMPONENT__H__
|
||||||
|
#define __GATERUSHCONTROLCOMPONENT__H__
|
||||||
|
|
||||||
|
#include "BaseRacingControlComponent.h"
|
||||||
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
|
class Entity;
|
||||||
|
|
||||||
|
class GateRushControlComponent : public BaseRacingControlComponent {
|
||||||
|
public:
|
||||||
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::GATE_RUSH_CONTROL;
|
||||||
|
GateRushControlComponent(Entity* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //!__GATERUSHCONTROLCOMPONENT__H__
|
@ -1,5 +1,5 @@
|
|||||||
#include "ItemComponent.h"
|
#include "ItemComponent.h"
|
||||||
|
|
||||||
ItemComponent::ItemComponent(Entity* parent) : Component(parent) {
|
ItemComponent::ItemComponent(Entity* parent) : Component(parent) {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,15 @@
|
|||||||
#include "Component.h"
|
#ifndef __MINIGAMECONTROLCOMPONENT__H__
|
||||||
|
#define __MINIGAMECONTROLCOMPONENT__H__
|
||||||
|
|
||||||
|
#include "ActivityComponent.h"
|
||||||
#include "eReplicaComponentType.h"
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
class Entity;
|
class Entity;
|
||||||
|
|
||||||
class MinigameControlComponent : public Component {
|
class MinigameControlComponent : public ActivityComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MINIGAME_CONTROL;
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MINIGAME_CONTROL;
|
||||||
MinigameControlComponent(Entity* parent);
|
MinigameControlComponent(Entity* parent);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#endif //!__MINIGAMECONTROLCOMPONENT__H__
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
#include "NiPoint3.h"
|
#include "NiPoint3.h"
|
||||||
#include "ScriptedActivityComponent.h"
|
#include "ScriptedActivityComponent.h"
|
||||||
#include "Preconditions.h"
|
#include "Preconditions.h"
|
||||||
#include "Component.h"
|
#include "ActivityComponent.h"
|
||||||
#include "eReplicaComponentType.h"
|
#include "eReplicaComponentType.h"
|
||||||
#include "eRebuildState.h"
|
#include "eRebuildState.h"
|
||||||
|
|
||||||
@ -20,7 +20,7 @@ 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 : public ActivityComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::QUICK_BUILD;
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::QUICK_BUILD;
|
||||||
|
|
||||||
|
@ -29,8 +29,7 @@
|
|||||||
#define M_PI 3.14159265358979323846264338327950288
|
#define M_PI 3.14159265358979323846264338327950288
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RacingControlComponent::RacingControlComponent(Entity* parent)
|
RacingControlComponent::RacingControlComponent(Entity* parent) : BaseRacingControlComponent(parent) {
|
||||||
: Component(parent) {
|
|
||||||
m_PathName = u"MainPath";
|
m_PathName = u"MainPath";
|
||||||
m_RemainingLaps = 3;
|
m_RemainingLaps = 3;
|
||||||
m_LeadingPlayer = LWOOBJID_EMPTY;
|
m_LeadingPlayer = LWOOBJID_EMPTY;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#include "BitStream.h"
|
#include "BitStream.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "Component.h"
|
#include "BaseRacingControlComponent.h"
|
||||||
#include "eReplicaComponentType.h"
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -103,7 +103,7 @@ 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 : public BaseRacingControlComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_CONTROL;
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_CONTROL;
|
||||||
|
|
||||||
|
0
dGame/dComponents/RacingSoundTriggerComponent.cpp
Normal file
0
dGame/dComponents/RacingSoundTriggerComponent.cpp
Normal file
15
dGame/dComponents/RacingSoundTriggerComponent.h
Normal file
15
dGame/dComponents/RacingSoundTriggerComponent.h
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
#ifndef __RACINGSOUNDTRIGGERCOMPONENT__H__
|
||||||
|
#define __RACINGSOUNDTRIGGERCOMPONENT__H__
|
||||||
|
|
||||||
|
#include "SoundTriggerComponent.h"
|
||||||
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
|
class Entity;
|
||||||
|
|
||||||
|
class RacingSoundTriggerComponent : public SoundTriggerComponent {
|
||||||
|
public:
|
||||||
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_SOUND_TRIGGER;
|
||||||
|
RacingSoundTriggerComponent(Entity* parent);
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif //!__RACINGSOUNDTRIGGERCOMPONENT__H__
|
@ -2,7 +2,7 @@
|
|||||||
#include "EntityManager.h"
|
#include "EntityManager.h"
|
||||||
#include "ScriptedActivityComponent.h"
|
#include "ScriptedActivityComponent.h"
|
||||||
|
|
||||||
ShootingGalleryComponent::ShootingGalleryComponent(Entity* parent) : Component(parent) {
|
ShootingGalleryComponent::ShootingGalleryComponent(Entity* parent) : ActivityComponent(parent) {
|
||||||
}
|
}
|
||||||
|
|
||||||
ShootingGalleryComponent::~ShootingGalleryComponent() = default;
|
ShootingGalleryComponent::~ShootingGalleryComponent() = default;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "dCommonVars.h"
|
#include "dCommonVars.h"
|
||||||
#include "NiPoint3.h"
|
#include "NiPoint3.h"
|
||||||
#include "Entity.h"
|
#include "Entity.h"
|
||||||
#include "Component.h"
|
#include "ActivityComponent.h"
|
||||||
#include "eReplicaComponentType.h"
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -71,7 +71,7 @@ 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 : public ActivityComponent {
|
||||||
public:
|
public:
|
||||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SHOOTING_GALLERY;
|
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SHOOTING_GALLERY;
|
||||||
|
|
||||||
|
@ -71,6 +71,8 @@
|
|||||||
#include "MinigameControlComponent.h"
|
#include "MinigameControlComponent.h"
|
||||||
#include "ItemComponent.h"
|
#include "ItemComponent.h"
|
||||||
#include "DonationVendorComponent.h"
|
#include "DonationVendorComponent.h"
|
||||||
|
#include "GateRushControlComponent.h"
|
||||||
|
#include "RacingSoundTriggerComponent.h"
|
||||||
|
|
||||||
// Table includes
|
// Table includes
|
||||||
#include "CDComponentsRegistryTable.h"
|
#include "CDComponentsRegistryTable.h"
|
||||||
@ -418,6 +420,12 @@ void Entity::Initialize() {
|
|||||||
AddComponent<ProximityMonitorComponent>();
|
AddComponent<ProximityMonitorComponent>();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
case eReplicaComponentType::GATE_RUSH_CONTROL:
|
||||||
|
AddComponent<GateRushControlComponent>();
|
||||||
|
break;
|
||||||
|
case eReplicaComponentType::RACING_SOUND_TRIGGER:
|
||||||
|
AddComponent<RacingSoundTriggerComponent>();
|
||||||
|
break;
|
||||||
case eReplicaComponentType::GHOST:
|
case eReplicaComponentType::GHOST:
|
||||||
case eReplicaComponentType::SPAWN:
|
case eReplicaComponentType::SPAWN:
|
||||||
case eReplicaComponentType::MODULAR_BUILD:
|
case eReplicaComponentType::MODULAR_BUILD:
|
||||||
@ -459,7 +467,6 @@ void Entity::Initialize() {
|
|||||||
case eReplicaComponentType::DROPPED_LOOT:
|
case eReplicaComponentType::DROPPED_LOOT:
|
||||||
case eReplicaComponentType::FACTION_TRIGGER:
|
case eReplicaComponentType::FACTION_TRIGGER:
|
||||||
case eReplicaComponentType::BBB:
|
case eReplicaComponentType::BBB:
|
||||||
case eReplicaComponentType::RACING_SOUND_TRIGGER:
|
|
||||||
case eReplicaComponentType::CHAT_BUBBLE:
|
case eReplicaComponentType::CHAT_BUBBLE:
|
||||||
case eReplicaComponentType::FRIENDS_LIST:
|
case eReplicaComponentType::FRIENDS_LIST:
|
||||||
case eReplicaComponentType::GUILD:
|
case eReplicaComponentType::GUILD:
|
||||||
@ -480,7 +487,6 @@ void Entity::Initialize() {
|
|||||||
case eReplicaComponentType::INTERACTION_MANAGER:
|
case eReplicaComponentType::INTERACTION_MANAGER:
|
||||||
case eReplicaComponentType::COMBAT_MEDIATOR:
|
case eReplicaComponentType::COMBAT_MEDIATOR:
|
||||||
case eReplicaComponentType::ACHIEVEMENT_VENDOR:
|
case eReplicaComponentType::ACHIEVEMENT_VENDOR:
|
||||||
case eReplicaComponentType::GATE_RUSH_CONTROL:
|
|
||||||
case eReplicaComponentType::ROLLER:
|
case eReplicaComponentType::ROLLER:
|
||||||
case eReplicaComponentType::PLAYER_FORCED_MOVEMENT:
|
case eReplicaComponentType::PLAYER_FORCED_MOVEMENT:
|
||||||
case eReplicaComponentType::CRAFTING:
|
case eReplicaComponentType::CRAFTING:
|
||||||
|
Loading…
Reference in New Issue
Block a user