mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-04 09:44:10 +00:00
chore: rename rebuild to quickbuild (#1364)
* rename rebuild to quickbuild * fix includes
This commit is contained in:
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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);
|
||||
|
@@ -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;
|
||||
|
@@ -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());
|
||||
|
@@ -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);
|
||||
};
|
||||
|
Reference in New Issue
Block a user