mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-10-18 05:18:08 +00:00
Split out unrelated changes to CleanupRoundup branch
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
|
||||
#include "CppScripts.h"
|
||||
|
||||
QuickBuildComponent::QuickBuildComponent(Entity* entity) : Component{ entity } {
|
||||
QuickBuildComponent::QuickBuildComponent(Entity* entity) : Component(entity) {
|
||||
std::u16string checkPreconditions = entity->GetVar<std::u16string>(u"CheckPrecondition");
|
||||
|
||||
if (!checkPreconditions.empty()) {
|
||||
@@ -283,47 +283,47 @@ void QuickBuildComponent::DespawnActivator() {
|
||||
}
|
||||
}
|
||||
|
||||
Entity* QuickBuildComponent::GetActivator() const {
|
||||
Entity* QuickBuildComponent::GetActivator() {
|
||||
return Game::entityManager->GetEntity(m_ActivatorId);
|
||||
}
|
||||
|
||||
NiPoint3 QuickBuildComponent::GetActivatorPosition() const noexcept {
|
||||
NiPoint3 QuickBuildComponent::GetActivatorPosition() {
|
||||
return m_ActivatorPosition;
|
||||
}
|
||||
|
||||
float QuickBuildComponent::GetResetTime() const noexcept {
|
||||
float QuickBuildComponent::GetResetTime() {
|
||||
return m_ResetTime;
|
||||
}
|
||||
|
||||
float QuickBuildComponent::GetCompleteTime() const noexcept {
|
||||
float QuickBuildComponent::GetCompleteTime() {
|
||||
return m_CompleteTime;
|
||||
}
|
||||
|
||||
int QuickBuildComponent::GetTakeImagination() const noexcept {
|
||||
int QuickBuildComponent::GetTakeImagination() {
|
||||
return m_TakeImagination;
|
||||
}
|
||||
|
||||
bool QuickBuildComponent::GetInterruptible() const noexcept {
|
||||
bool QuickBuildComponent::GetInterruptible() {
|
||||
return m_Interruptible;
|
||||
}
|
||||
|
||||
bool QuickBuildComponent::GetSelfActivator() const noexcept {
|
||||
bool QuickBuildComponent::GetSelfActivator() {
|
||||
return m_SelfActivator;
|
||||
}
|
||||
|
||||
std::vector<int> QuickBuildComponent::GetCustomModules() const noexcept {
|
||||
std::vector<int> QuickBuildComponent::GetCustomModules() {
|
||||
return m_CustomModules;
|
||||
}
|
||||
|
||||
int QuickBuildComponent::GetActivityId() const noexcept {
|
||||
int QuickBuildComponent::GetActivityId() {
|
||||
return m_ActivityId;
|
||||
}
|
||||
|
||||
int QuickBuildComponent::GetPostImaginationCost() const noexcept {
|
||||
int QuickBuildComponent::GetPostImaginationCost() {
|
||||
return m_PostImaginationCost;
|
||||
}
|
||||
|
||||
float QuickBuildComponent::GetTimeBeforeSmash() const noexcept {
|
||||
float QuickBuildComponent::GetTimeBeforeSmash() {
|
||||
return m_TimeBeforeSmash;
|
||||
}
|
||||
|
||||
@@ -337,19 +337,19 @@ Entity* QuickBuildComponent::GetBuilder() const {
|
||||
return builder;
|
||||
}
|
||||
|
||||
bool QuickBuildComponent::GetRepositionPlayer() const noexcept {
|
||||
bool QuickBuildComponent::GetRepositionPlayer() const {
|
||||
return m_RepositionPlayer;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetActivatorPosition(NiPoint3 value) noexcept {
|
||||
void QuickBuildComponent::SetActivatorPosition(NiPoint3 value) {
|
||||
m_ActivatorPosition = value;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetResetTime(float value) noexcept {
|
||||
void QuickBuildComponent::SetResetTime(float value) {
|
||||
m_ResetTime = value;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetCompleteTime(float value) noexcept {
|
||||
void QuickBuildComponent::SetCompleteTime(float value) {
|
||||
if (value < 0) {
|
||||
m_CompleteTime = 4.5f;
|
||||
} else {
|
||||
@@ -357,31 +357,31 @@ void QuickBuildComponent::SetCompleteTime(float value) noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetTakeImagination(int value) noexcept {
|
||||
void QuickBuildComponent::SetTakeImagination(int value) {
|
||||
m_TakeImagination = value;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetInterruptible(bool value) noexcept {
|
||||
void QuickBuildComponent::SetInterruptible(bool value) {
|
||||
m_Interruptible = value;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetSelfActivator(bool value) noexcept {
|
||||
void QuickBuildComponent::SetSelfActivator(bool value) {
|
||||
m_SelfActivator = value;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetCustomModules(std::vector<int> value) noexcept {
|
||||
void QuickBuildComponent::SetCustomModules(std::vector<int> value) {
|
||||
m_CustomModules = value;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetActivityId(int value) noexcept {
|
||||
void QuickBuildComponent::SetActivityId(int value) {
|
||||
m_ActivityId = value;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetPostImaginationCost(int value) noexcept {
|
||||
void QuickBuildComponent::SetPostImaginationCost(int value) {
|
||||
m_PostImaginationCost = value;
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetTimeBeforeSmash(float value) noexcept {
|
||||
void QuickBuildComponent::SetTimeBeforeSmash(float value) {
|
||||
if (value < 0) {
|
||||
m_TimeBeforeSmash = 10.0f;
|
||||
} else {
|
||||
@@ -389,7 +389,7 @@ void QuickBuildComponent::SetTimeBeforeSmash(float value) noexcept {
|
||||
}
|
||||
}
|
||||
|
||||
void QuickBuildComponent::SetRepositionPlayer(bool value) noexcept {
|
||||
void QuickBuildComponent::SetRepositionPlayer(bool value) {
|
||||
m_RepositionPlayer = value;
|
||||
}
|
||||
|
||||
|
@@ -50,124 +50,124 @@ public:
|
||||
* Returns the entity that acts as the activator for this quickbuild
|
||||
* @return the entity that acts as the activator for this quickbuild
|
||||
*/
|
||||
[[nodiscard]] Entity* GetActivator() const;
|
||||
Entity* GetActivator();
|
||||
|
||||
/**
|
||||
* Returns the spawn position of the activator for this quickbuild, if any
|
||||
* @return the spawn position of the activator for this quickbuild, if any
|
||||
*/
|
||||
[[nodiscard]] NiPoint3 GetActivatorPosition() const noexcept;
|
||||
NiPoint3 GetActivatorPosition();
|
||||
|
||||
/**
|
||||
* Sets the spawn position for the activator of this quickbuild
|
||||
* @param value the spawn position to set for the activator
|
||||
*/
|
||||
void SetActivatorPosition(NiPoint3 value) noexcept;
|
||||
void SetActivatorPosition(NiPoint3 value);
|
||||
|
||||
/**
|
||||
* Returns the time it takes for the quickbuild to reset after being built
|
||||
* @return the time it takes for the quickbuild to reset after being built
|
||||
*/
|
||||
[[nodiscard]] float GetResetTime() const noexcept;
|
||||
float GetResetTime();
|
||||
|
||||
/**
|
||||
* Sets the time it takes for the quickbuild to reset after being built
|
||||
* @param value the reset time to set
|
||||
*/
|
||||
void SetResetTime(float value) noexcept;
|
||||
void SetResetTime(float value);
|
||||
|
||||
/**
|
||||
* Returns the time it takes to complete the quickbuild
|
||||
* @return the time it takes to complete the quickbuild
|
||||
*/
|
||||
[[nodiscard]] float GetCompleteTime() const noexcept;
|
||||
float GetCompleteTime();
|
||||
|
||||
/**
|
||||
* Sets the time it takes to complete the quickbuild
|
||||
* @param value the completion time to set
|
||||
*/
|
||||
void SetCompleteTime(float value) noexcept;
|
||||
void SetCompleteTime(float value);
|
||||
|
||||
/**
|
||||
* Returns the imagination that's taken when completing the quickbuild
|
||||
* @return the imagination that's taken when completing the quickbuild
|
||||
*/
|
||||
[[nodiscard]] int GetTakeImagination() const noexcept;
|
||||
int GetTakeImagination();
|
||||
|
||||
/**
|
||||
* Sets the imagination that's taken when completing the quickbuild
|
||||
* @param value the imagination deduction to set
|
||||
*/
|
||||
void SetTakeImagination(int value) noexcept;
|
||||
void SetTakeImagination(int value);
|
||||
|
||||
/**
|
||||
* Returns if the quickbuild can be interrupted, currently unused
|
||||
* @return if the quickbuild can be interrupted
|
||||
*/
|
||||
[[nodiscard]] bool GetInterruptible() const noexcept;
|
||||
bool GetInterruptible();
|
||||
|
||||
/**
|
||||
* Sets whether or not the quickbuild can be interrupted, currently unused
|
||||
* @param value true if the quickbuild may be interrupted, false otherwise
|
||||
*/
|
||||
void SetInterruptible(bool value) noexcept;
|
||||
void SetInterruptible(bool value);
|
||||
|
||||
/**
|
||||
* Returns whether or not this entity contains a built-in activator
|
||||
* @return whether or not this entity contains a built-in activator
|
||||
*/
|
||||
[[nodiscard]] bool GetSelfActivator() const noexcept;
|
||||
bool GetSelfActivator();
|
||||
|
||||
/**
|
||||
* Sets whether or not this entity contains a built-in activator. If set to false this will spawn activators on
|
||||
* each new quickbuild.
|
||||
* @param value whether or not this entity contains a built-in activator
|
||||
*/
|
||||
void SetSelfActivator(bool value) noexcept;
|
||||
void SetSelfActivator(bool value);
|
||||
|
||||
/**
|
||||
* Currently unused
|
||||
*/
|
||||
[[nodiscard]] std::vector<int> GetCustomModules() const noexcept;
|
||||
std::vector<int> GetCustomModules();
|
||||
|
||||
/**
|
||||
* Currently unused
|
||||
*/
|
||||
void SetCustomModules(std::vector<int> value) noexcept;
|
||||
void SetCustomModules(std::vector<int> value);
|
||||
|
||||
/**
|
||||
* Returns the activity ID for participating in this quickbuild
|
||||
* @return the activity ID for participating in this quickbuild
|
||||
*/
|
||||
[[nodiscard]] int GetActivityId() const noexcept;
|
||||
int GetActivityId();
|
||||
|
||||
/**
|
||||
* Sets the activity ID for participating in this quickbuild
|
||||
* @param value the activity ID to set
|
||||
*/
|
||||
void SetActivityId(int value) noexcept;
|
||||
void SetActivityId(int value);
|
||||
|
||||
/**
|
||||
* Currently unused
|
||||
*/
|
||||
[[nodiscard]] int GetPostImaginationCost() const noexcept;
|
||||
int GetPostImaginationCost();
|
||||
|
||||
/**
|
||||
* Currently unused
|
||||
*/
|
||||
void SetPostImaginationCost(int value) noexcept;
|
||||
void SetPostImaginationCost(int value);
|
||||
|
||||
/**
|
||||
* Returns the time it takes for an incomplete quickbuild to be smashed automatically
|
||||
* @return the time it takes for an incomplete quickbuild to be smashed automatically
|
||||
*/
|
||||
[[nodiscard]] float GetTimeBeforeSmash() const noexcept;
|
||||
float GetTimeBeforeSmash();
|
||||
|
||||
/**
|
||||
* Sets the time it takes for an incomplete quickbuild to be smashed automatically
|
||||
* @param value the time to set
|
||||
*/
|
||||
void SetTimeBeforeSmash(float value) noexcept;
|
||||
void SetTimeBeforeSmash(float value);
|
||||
|
||||
/**
|
||||
* Returns the current quickbuild state
|
||||
@@ -179,19 +179,19 @@ public:
|
||||
* Returns the player that is currently building this quickbuild
|
||||
* @return the player that is currently building this quickbuild
|
||||
*/
|
||||
[[nodiscard]] Entity* GetBuilder() const;
|
||||
Entity* GetBuilder() const;
|
||||
|
||||
/**
|
||||
* Returns whether or not the player is repositioned when initiating the quickbuild
|
||||
* @return whether or not the player is repositioned when initiating the quickbuild
|
||||
*/
|
||||
[[nodiscard]] bool GetRepositionPlayer() const noexcept;
|
||||
bool GetRepositionPlayer() const;
|
||||
|
||||
/**
|
||||
* Sets whether or not the player is repositioned when initiating the quickbuild
|
||||
* @param value whether or not the player is repositioned when initiating the quickbuild
|
||||
*/
|
||||
void SetRepositionPlayer(bool value) noexcept;
|
||||
void SetRepositionPlayer(bool value);
|
||||
|
||||
/**
|
||||
* Adds a callback that is called when the quickbuild is completed
|
||||
|
Reference in New Issue
Block a user