mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
scaffold activity based components
This commit is contained in:
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"
|
||||
"BuffComponent.cpp"
|
||||
"BuildBorderComponent.cpp"
|
||||
@@ -30,6 +32,7 @@ set(DGAME_DCOMPONENTS_SOURCES "BaseCombatAIComponent.cpp"
|
||||
"PropertyVendorComponent.cpp"
|
||||
"ProximityMonitorComponent.cpp"
|
||||
"RacingControlComponent.cpp"
|
||||
"RacingSoundTriggerComponent.cpp"
|
||||
"RacingStatsComponent.cpp"
|
||||
"RailActivatorComponent.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"
|
||||
|
||||
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"
|
||||
|
||||
class Entity;
|
||||
|
||||
class MinigameControlComponent : public Component {
|
||||
class MinigameControlComponent : public ActivityComponent {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MINIGAME_CONTROL;
|
||||
MinigameControlComponent(Entity* parent);
|
||||
};
|
||||
|
||||
#endif //!__MINIGAMECONTROLCOMPONENT__H__
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#include "NiPoint3.h"
|
||||
#include "ScriptedActivityComponent.h"
|
||||
#include "Preconditions.h"
|
||||
#include "Component.h"
|
||||
#include "ActivityComponent.h"
|
||||
#include "eReplicaComponentType.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
|
||||
* that quick builds are also scripted activities so this shared some logic with the ScriptedActivityComponent.
|
||||
*/
|
||||
class QuickBuildComponent : public Component {
|
||||
class QuickBuildComponent : public ActivityComponent {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::QUICK_BUILD;
|
||||
|
||||
|
@@ -29,8 +29,7 @@
|
||||
#define M_PI 3.14159265358979323846264338327950288
|
||||
#endif
|
||||
|
||||
RacingControlComponent::RacingControlComponent(Entity* parent)
|
||||
: Component(parent) {
|
||||
RacingControlComponent::RacingControlComponent(Entity* parent) : BaseRacingControlComponent(parent) {
|
||||
m_PathName = u"MainPath";
|
||||
m_RemainingLaps = 3;
|
||||
m_LeadingPlayer = LWOOBJID_EMPTY;
|
||||
|
@@ -6,7 +6,7 @@
|
||||
|
||||
#include "BitStream.h"
|
||||
#include "Entity.h"
|
||||
#include "Component.h"
|
||||
#include "BaseRacingControlComponent.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.
|
||||
*/
|
||||
class RacingControlComponent : public Component {
|
||||
class RacingControlComponent : public BaseRacingControlComponent {
|
||||
public:
|
||||
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 "ScriptedActivityComponent.h"
|
||||
|
||||
ShootingGalleryComponent::ShootingGalleryComponent(Entity* parent) : Component(parent) {
|
||||
ShootingGalleryComponent::ShootingGalleryComponent(Entity* parent) : ActivityComponent(parent) {
|
||||
}
|
||||
|
||||
ShootingGalleryComponent::~ShootingGalleryComponent() = default;
|
||||
|
@@ -2,7 +2,7 @@
|
||||
#include "dCommonVars.h"
|
||||
#include "NiPoint3.h"
|
||||
#include "Entity.h"
|
||||
#include "Component.h"
|
||||
#include "ActivityComponent.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
|
||||
* also in the related scripts.
|
||||
*/
|
||||
class ShootingGalleryComponent : public Component {
|
||||
class ShootingGalleryComponent : public ActivityComponent {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::SHOOTING_GALLERY;
|
||||
|
||||
|
Reference in New Issue
Block a user