chore: rename rebuild to quickbuild (#1364)

* rename rebuild to quickbuild

* fix includes
This commit is contained in:
Aaron Kimbrell
2023-12-28 22:24:30 -06:00
committed by GitHub
parent fddf99946f
commit 15954413ae
95 changed files with 422 additions and 422 deletions

View File

@@ -2,7 +2,7 @@
#include "GameMessages.h"
#include "EntityManager.h"
void CatapultBouncerServer::OnRebuildComplete(Entity* self, Entity* target) {
void CatapultBouncerServer::OnQuickBuildComplete(Entity* self, Entity* target) {
GameMessages::SendNotifyClientObject(self->GetObjectID(), u"Built", 0, 0, LWOOBJID_EMPTY, "", UNASSIGNED_SYSTEM_ADDRESS);
self->SetNetworkVar<bool>(u"Built", true);

View File

@@ -3,5 +3,5 @@
class CatapultBouncerServer : public CppScripts::Script {
public:
void OnRebuildComplete(Entity* self, Entity* target) override;
void OnQuickBuildComplete(Entity* self, Entity* target) override;
};

View File

@@ -1,6 +1,6 @@
#include "CavePrisonCage.h"
#include "EntityManager.h"
#include "RebuildComponent.h"
#include "QuickBuildComponent.h"
#include "GameMessages.h"
#include "Character.h"
#include "dZoneManager.h"
@@ -45,8 +45,8 @@ void CavePrisonCage::Setup(Entity* self, Spawner* spawner) {
Game::entityManager->ConstructEntity(entity);
}
void CavePrisonCage::OnRebuildNotifyState(Entity* self, eRebuildState state) {
if (state != eRebuildState::RESETTING) {
void CavePrisonCage::OnQuickBuildNotifyState(Entity* self, eQuickBuildState state) {
if (state != eQuickBuildState::RESETTING) {
return;
}
@@ -68,14 +68,14 @@ void CavePrisonCage::SpawnCounterweight(Entity* self, Spawner* spawner) {
self->SetVar<LWOOBJID>(u"Counterweight", counterweight->GetObjectID());
auto* rebuildComponent = counterweight->GetComponent<RebuildComponent>();
auto* quickBuildComponent = counterweight->GetComponent<QuickBuildComponent>();
if (rebuildComponent != nullptr) {
rebuildComponent->AddRebuildStateCallback([this, self](eRebuildState state) {
OnRebuildNotifyState(self, state);
if (quickBuildComponent != nullptr) {
quickBuildComponent->AddQuickBuildStateCallback([this, self](eQuickBuildState state) {
OnQuickBuildNotifyState(self, state);
});
rebuildComponent->AddRebuildCompleteCallback([this, self](Entity* user) {
quickBuildComponent->AddQuickBuildCompleteCallback([this, self](Entity* user) {
// The counterweight is a simple mover, which is not implemented, so we'll just set it's position
auto* counterweight = Game::entityManager->GetEntity(self->GetVar<LWOOBJID>(u"Counterweight"));

View File

@@ -5,7 +5,7 @@ class CavePrisonCage : public CppScripts::Script {
public:
void OnStartup(Entity* self) override;
void Setup(Entity* self, Spawner* spawner);
void OnRebuildNotifyState(Entity* self, eRebuildState state) override;
void OnQuickBuildNotifyState(Entity* self, eQuickBuildState state) override;
void SpawnCounterweight(Entity* self, Spawner* spawner);
void GetButton(Entity* self);
void OnTimerDone(Entity* self, std::string timerName) override;

View File

@@ -1,15 +1,15 @@
#include "ImaginationShrineServer.h"
#include "RebuildComponent.h"
#include "QuickBuildComponent.h"
void ImaginationShrineServer::OnUse(Entity* self, Entity* user) {
// If the rebuild component is complete, use the shrine
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
if (rebuildComponent == nullptr) {
if (quickBuildComponent == nullptr) {
return;
}
if (rebuildComponent->GetState() == eRebuildState::COMPLETED) {
if (quickBuildComponent->GetState() == eQuickBuildState::COMPLETED) {
// Use the shrine
BaseUse(self, user);
}

View File

@@ -8,7 +8,7 @@ void RainOfArrows::OnStartup(Entity* self) {
}
void RainOfArrows::OnRebuildComplete(Entity* self, Entity* target) {
void RainOfArrows::OnQuickBuildComplete(Entity* self, Entity* target) {
auto myPos = self->GetPosition();
auto myRot = self->GetRotation();

View File

@@ -5,7 +5,7 @@ class RainOfArrows : public CppScripts::Script
{
public:
void OnStartup(Entity* self) override;
void OnRebuildComplete(Entity* self, Entity* target) override;
void OnQuickBuildComplete(Entity* self, Entity* target) override;
void OnTimerDone(Entity* self, std::string timerName) override;
private:

View File

@@ -1,5 +1,5 @@
#include "NjMonastryBossInstance.h"
#include "RebuildComponent.h"
#include "QuickBuildComponent.h"
#include "DestroyableComponent.h"
#include "EntityManager.h"
#include "dZoneManager.h"
@@ -221,26 +221,26 @@ void NjMonastryBossInstance::HandleLedgedFrakjawSpawned(Entity* self, Entity* le
}
void NjMonastryBossInstance::HandleCounterWeightSpawned(Entity* self, Entity* counterWeight) {
auto* rebuildComponent = counterWeight->GetComponent<RebuildComponent>();
if (rebuildComponent != nullptr) {
rebuildComponent->AddRebuildStateCallback([this, self, counterWeight](eRebuildState state) {
auto* quickBuildComponent = counterWeight->GetComponent<QuickBuildComponent>();
if (quickBuildComponent != nullptr) {
quickBuildComponent->AddQuickBuildStateCallback([this, self, counterWeight](eQuickBuildState state) {
switch (state) {
case eRebuildState::BUILDING:
case eQuickBuildState::BUILDING:
GameMessages::SendNotifyClientObject(self->GetObjectID(), PlayCinematicNotification,
0, 0, counterWeight->GetObjectID(),
BaseCounterweightQB + std::to_string(self->GetVar<uint32_t>(WaveNumberVariable)),
UNASSIGNED_SYSTEM_ADDRESS);
return;
case eRebuildState::INCOMPLETE:
case eQuickBuildState::INCOMPLETE:
GameMessages::SendNotifyClientObject(self->GetObjectID(), EndCinematicNotification,
0, 0, LWOOBJID_EMPTY, "",
UNASSIGNED_SYSTEM_ADDRESS);
return;
case eRebuildState::RESETTING:
case eQuickBuildState::RESETTING:
ActivityTimerStart(self, SpawnCounterWeightTimer, 0.0f, 0.0f);
return;
case eRebuildState::COMPLETED: {
case eQuickBuildState::COMPLETED: {
// TODO: Move the platform?
// The counterweight is actually a moving platform and we should listen to the last waypoint event here