From 34d22d2d0dbfe40a72cb8571f29a926b5656d3ab Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Fri, 23 Jun 2023 10:56:05 -0500 Subject: [PATCH] AchievementVendor scaffold --- dGame/dComponents/AchievementVendorComponent.cpp | 5 +++++ dGame/dComponents/AchievementVendorComponent.h | 16 ++++++++++++++++ dGame/dComponents/CMakeLists.txt | 3 ++- dGame/dEntity/Entity.cpp | 5 ++++- 4 files changed, 27 insertions(+), 2 deletions(-) create mode 100644 dGame/dComponents/AchievementVendorComponent.cpp create mode 100644 dGame/dComponents/AchievementVendorComponent.h diff --git a/dGame/dComponents/AchievementVendorComponent.cpp b/dGame/dComponents/AchievementVendorComponent.cpp new file mode 100644 index 00000000..65042b15 --- /dev/null +++ b/dGame/dComponents/AchievementVendorComponent.cpp @@ -0,0 +1,5 @@ +#include "AchievementVendorComponent.h" + +AchievementVendorComponent::AchievementVendorComponent(Entity* parent) : VendorComponent(parent) { + +} diff --git a/dGame/dComponents/AchievementVendorComponent.h b/dGame/dComponents/AchievementVendorComponent.h new file mode 100644 index 00000000..62fb87bd --- /dev/null +++ b/dGame/dComponents/AchievementVendorComponent.h @@ -0,0 +1,16 @@ +#ifndef __ACHIEVEMENTVENDORCOMPONENT__H__ +#define __ACHIEVEMENTVENDORCOMPONENT__H__ + +#include "VendorComponent.h" +#include "eReplicaComponentType.h" + +class Entity; + +class AchievementVendorComponent : public VendorComponent { +public: + inline static const eReplicaComponentType ComponentType = eReplicaComponentType::ACHIEVEMENT_VENDOR; + AchievementVendorComponent(Entity* parent); +}; + + +#endif //!__ACHIEVEMENTVENDORCOMPONENT__H__ diff --git a/dGame/dComponents/CMakeLists.txt b/dGame/dComponents/CMakeLists.txt index e46daa0b..9f4b0d06 100644 --- a/dGame/dComponents/CMakeLists.txt +++ b/dGame/dComponents/CMakeLists.txt @@ -1,4 +1,5 @@ -set(DGAME_DCOMPONENTS_SOURCES "ActivityComponent.cpp" +set(DGAME_DCOMPONENTS_SOURCES "AchievementVendorComponent.cpp" + "ActivityComponent.cpp" "BaseCombatAIComponent.cpp" "BaseRacingControlComponent.cpp" "BouncerComponent.cpp" diff --git a/dGame/dEntity/Entity.cpp b/dGame/dEntity/Entity.cpp index 07f01b4d..368f9993 100644 --- a/dGame/dEntity/Entity.cpp +++ b/dGame/dEntity/Entity.cpp @@ -73,6 +73,7 @@ #include "DonationVendorComponent.h" #include "GateRushControlComponent.h" #include "RacingSoundTriggerComponent.h" +#include "AchievementVendorComponent.h" // Table includes #include "CDComponentsRegistryTable.h" @@ -426,6 +427,9 @@ void Entity::Initialize() { case eReplicaComponentType::RACING_SOUND_TRIGGER: AddComponent(); break; + case eReplicaComponentType::ACHIEVEMENT_VENDOR: + AddComponent(); + break; case eReplicaComponentType::GHOST: case eReplicaComponentType::SPAWN: case eReplicaComponentType::MODULAR_BUILD: @@ -486,7 +490,6 @@ void Entity::Initialize() { case eReplicaComponentType::IGNORE_LIST: case eReplicaComponentType::INTERACTION_MANAGER: case eReplicaComponentType::COMBAT_MEDIATOR: - case eReplicaComponentType::ACHIEVEMENT_VENDOR: case eReplicaComponentType::ROLLER: case eReplicaComponentType::PLAYER_FORCED_MOVEMENT: case eReplicaComponentType::CRAFTING: