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

@@ -3,7 +3,7 @@
#include "Item.h"
#include "DestroyableComponent.h"
#include "EntityManager.h"
#include "RebuildComponent.h"
#include "QuickBuildComponent.h"
#include "SoundTriggerComponent.h"
#include "InventoryComponent.h"
#include "MissionComponent.h"
@@ -20,13 +20,13 @@ void NsConcertInstrument::OnStartup(Entity* self) {
self->SetVar<LWOOBJID>(u"oldItemRight", LWOOBJID_EMPTY);
}
void NsConcertInstrument::OnRebuildNotifyState(Entity* self, eRebuildState state) {
if (state == eRebuildState::RESETTING || state == eRebuildState::OPEN) {
void NsConcertInstrument::OnQuickBuildNotifyState(Entity* self, eQuickBuildState state) {
if (state == eQuickBuildState::RESETTING || state == eQuickBuildState::OPEN) {
self->SetVar<LWOOBJID>(u"activePlayer", LWOOBJID_EMPTY);
}
}
void NsConcertInstrument::OnRebuildComplete(Entity* self, Entity* target) {
void NsConcertInstrument::OnQuickBuildComplete(Entity* self, Entity* target) {
if (!target->GetIsDead()) {
self->SetVar<LWOOBJID>(u"activePlayer", target->GetObjectID());
@@ -93,9 +93,9 @@ void NsConcertInstrument::OnTimerDone(Entity* self, std::string name) {
activePlayer->GetObjectID(), "", UNASSIGNED_SYSTEM_ADDRESS);
}
auto* rebuildComponent = self->GetComponent<RebuildComponent>();
if (rebuildComponent != nullptr)
rebuildComponent->ResetRebuild(false);
auto* quickBuildComponent = self->GetComponent<QuickBuildComponent>();
if (quickBuildComponent != nullptr)
quickBuildComponent->ResetQuickBuild(false);
self->Smash(self->GetObjectID(), eKillType::VIOLENT);
self->SetVar<LWOOBJID>(u"activePlayer", LWOOBJID_EMPTY);

View File

@@ -11,10 +11,10 @@ enum InstrumentLot {
class NsConcertInstrument : public CppScripts::Script {
public:
void OnStartup(Entity* self) override;
void OnRebuildNotifyState(Entity* self, eRebuildState state) override;
void OnQuickBuildNotifyState(Entity* self, eQuickBuildState state) override;
void OnFireEventServerSide(Entity* self, Entity* sender, std::string args, int32_t param1, int32_t param2,
int32_t param3) override;
void OnRebuildComplete(Entity* self, Entity* target) override;
void OnQuickBuildComplete(Entity* self, Entity* target) override;
void OnTimerDone(Entity* self, std::string name) override;
private:
static void StartPlayingInstrument(Entity* self, Entity* player);

View File

@@ -80,7 +80,7 @@ void NsConcertQuickBuild::OnDie(Entity* self, Entity* killer) {
finishedQuickBuilds.erase(position);
}
void NsConcertQuickBuild::OnRebuildComplete(Entity* self, Entity* target) {
void NsConcertQuickBuild::OnQuickBuildComplete(Entity* self, Entity* target) {
const auto groupNumber = self->GetVar<int32_t>(u"groupNumber");
finishedQuickBuilds.push_back(self->GetObjectID());
self->SetNetworkVar<float>(u"startEffect", -1.0f);

View File

@@ -9,7 +9,7 @@ struct QuickBuildSet {
class NsConcertQuickBuild : public CppScripts::Script {
public:
void OnStartup(Entity* self) override;
void OnRebuildComplete(Entity* self, Entity* target) override;
void OnQuickBuildComplete(Entity* self, Entity* target) override;
void OnDie(Entity* self, Entity* killer) override;
private:
static std::vector<LWOOBJID> finishedQuickBuilds;

View File

@@ -6,7 +6,7 @@ void NsQbImaginationStatue::OnStartup(Entity* self) {
}
void NsQbImaginationStatue::OnRebuildComplete(Entity* self, Entity* target) {
void NsQbImaginationStatue::OnQuickBuildComplete(Entity* self, Entity* target) {
if (target == nullptr) return;
self->SetVar(u"Player", target->GetObjectID());

View File

@@ -5,7 +5,7 @@ class NsQbImaginationStatue : 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;
void SpawnLoot(Entity* self);
};