breakout the component types into a scoped enum (#1002)

* breakout the component types into a scoped enum

tested that things are the same as they were before

* fix missed rename

* fix brick-by-brick name to be crafting
because that's what it is
This commit is contained in:
Aaron Kimbrell
2023-03-04 01:16:37 -06:00
committed by GitHub
parent 2837f68f44
commit e524b86e12
106 changed files with 598 additions and 430 deletions

View File

@@ -13,6 +13,7 @@
#include "GameMessages.h"
#include "SkillComponent.h"
#include "eReplicaComponentType.h"
#include <vector>
@@ -27,9 +28,9 @@ void BossSpiderQueenEnemyServer::OnStartup(Entity* self) {
//self:SetStatusImmunity{ StateChangeType = "PUSH", bImmuneToPullToPoint = true, bImmuneToKnockback = true, bImmuneToInterrupt = true }
//Get our components:
destroyable = static_cast<DestroyableComponent*>(self->GetComponent(COMPONENT_TYPE_DESTROYABLE));
controllable = static_cast<ControllablePhysicsComponent*>(self->GetComponent(COMPONENT_TYPE_CONTROLLABLE_PHYSICS));
combat = static_cast<BaseCombatAIComponent*>(self->GetComponent(COMPONENT_TYPE_BASE_COMBAT_AI));
destroyable = static_cast<DestroyableComponent*>(self->GetComponent(eReplicaComponentType::DESTROYABLE));
controllable = static_cast<ControllablePhysicsComponent*>(self->GetComponent(eReplicaComponentType::CONTROLLABLE_PHYSICS));
combat = static_cast<BaseCombatAIComponent*>(self->GetComponent(eReplicaComponentType::BASE_COMBAT_AI));
if (!destroyable || !controllable) return;
@@ -397,7 +398,7 @@ void BossSpiderQueenEnemyServer::RapidFireShooterManager(Entity* self) {
void BossSpiderQueenEnemyServer::RunRapidFireShooter(Entity* self) {
/*
const auto targets = EntityManager::Instance()->GetEntitiesByComponent(COMPONENT_TYPE_CHARACTER);
const auto targets = EntityManager::Instance()->GetEntitiesByComponent(eReplicaComponentType::CHARACTER);
*/
const auto targets = self->GetTargetsInPhantom();

View File

@@ -6,6 +6,7 @@
#include "EntityInfo.h"
#include "GeneralUtils.h"
#include "DestroyableComponent.h"
#include "eReplicaComponentType.h"
void BaseEnemyMech::OnStartup(Entity* self) {
auto* destroyableComponent = self->GetComponent<DestroyableComponent>();
@@ -15,7 +16,7 @@ void BaseEnemyMech::OnStartup(Entity* self) {
}
void BaseEnemyMech::OnDie(Entity* self, Entity* killer) {
ControllablePhysicsComponent* controlPhys = static_cast<ControllablePhysicsComponent*>(self->GetComponent(COMPONENT_TYPE_CONTROLLABLE_PHYSICS));
ControllablePhysicsComponent* controlPhys = static_cast<ControllablePhysicsComponent*>(self->GetComponent(eReplicaComponentType::CONTROLLABLE_PHYSICS));
if (!controlPhys) return;
NiPoint3 newLoc = { controlPhys->GetPosition().x, dpWorld::Instance().GetNavMesh()->GetHeightAtPoint(controlPhys->GetPosition()), controlPhys->GetPosition().z };