Rename RebuildComponent to QuickbuildComponent

This commit is contained in:
Aaron Kimbre
2023-06-09 17:12:57 -05:00
parent ddc5f0e117
commit a68fa69e7a
31 changed files with 155 additions and 155 deletions

View File

@@ -1,13 +1,13 @@
#include "NjRailActivatorsServer.h"
#include "RebuildComponent.h"
#include "QuickBuildComponent.h"
#include "Character.h"
void NjRailActivatorsServer::OnUse(Entity* self, Entity* user) {
const auto flag = self->GetVar<int32_t>(u"RailFlagNum");
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
// Only allow use if this is not a quick build or the quick build is built
if (rebuildComponent == nullptr || rebuildComponent->GetState() == eRebuildState::COMPLETED) {
if (quickBuildComponent == nullptr || quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
auto* character = user->GetCharacter();
if (character != nullptr) {
character->SetPlayerFlag(flag, true);

View File

@@ -1,10 +1,10 @@
#include "NjRailPostServer.h"
#include "RebuildComponent.h"
#include "QuickBuildComponent.h"
#include "EntityManager.h"
void NjRailPostServer::OnStartup(Entity* self) {
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
if (rebuildComponent != nullptr) {
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
if (quickBuildComponent != nullptr) {
self->SetNetworkVar<bool>(NetworkNotActiveVariable, true);
}
}

View File

@@ -1,5 +1,5 @@
#include "PropertyPlatform.h"
#include "RebuildComponent.h"
#include "QuickBuildComponent.h"
#include "GameMessages.h"
#include "MovingPlatformComponent.h"
@@ -14,8 +14,8 @@ void PropertyPlatform::OnRebuildComplete(Entity* self, Entity* target) {
}
void PropertyPlatform::OnUse(Entity* self, Entity* user) {
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
if (rebuildComponent != nullptr && rebuildComponent->GetState() == eRebuildState::COMPLETED) {
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
if (quickBuildComponent != nullptr && quickBuildComponent->GetState() == eRebuildState::COMPLETED) {
// auto* movingPlatform = self->GetComponent<MovingPlatformComponent>();
// if (movingPlatform != nullptr) {
// movingPlatform->GotoWaypoint(1);