Changed how the TryParse function works (and also did some general cleanup along the way)

This commit is contained in:
jadebenn
2024-02-02 17:50:30 -06:00
parent d78b50874c
commit 4f75479a4c
34 changed files with 506 additions and 535 deletions

View File

@@ -50,148 +50,148 @@ public:
* Returns the entity that acts as the activator for this quickbuild
* @return the entity that acts as the activator for this quickbuild
*/
Entity* GetActivator();
[[nodiscard]] Entity* GetActivator() const;
/**
* Returns the spawn position of the activator for this quickbuild, if any
* @return the spawn position of the activator for this quickbuild, if any
*/
NiPoint3 GetActivatorPosition();
[[nodiscard]] NiPoint3 GetActivatorPosition() const noexcept;
/**
* Sets the spawn position for the activator of this quickbuild
* @param value the spawn position to set for the activator
*/
void SetActivatorPosition(NiPoint3 value);
void SetActivatorPosition(NiPoint3 value) noexcept;
/**
* 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
*/
float GetResetTime();
[[nodiscard]] float GetResetTime() const noexcept;
/**
* Sets the time it takes for the quickbuild to reset after being built
* @param value the reset time to set
*/
void SetResetTime(float value);
void SetResetTime(float value) noexcept;
/**
* Returns the time it takes to complete the quickbuild
* @return the time it takes to complete the quickbuild
*/
float GetCompleteTime();
[[nodiscard]] float GetCompleteTime() const noexcept;
/**
* Sets the time it takes to complete the quickbuild
* @param value the completion time to set
*/
void SetCompleteTime(float value);
void SetCompleteTime(float value) noexcept;
/**
* Returns the imagination that's taken when completing the quickbuild
* @return the imagination that's taken when completing the quickbuild
*/
int GetTakeImagination();
[[nodiscard]] int GetTakeImagination() const noexcept;
/**
* Sets the imagination that's taken when completing the quickbuild
* @param value the imagination deduction to set
*/
void SetTakeImagination(int value);
void SetTakeImagination(int value) noexcept;
/**
* Returns if the quickbuild can be interrupted, currently unused
* @return if the quickbuild can be interrupted
*/
bool GetInterruptible();
[[nodiscard]] bool GetInterruptible() const noexcept;
/**
* 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);
void SetInterruptible(bool value) noexcept;
/**
* Returns whether or not this entity contains a built-in activator
* @return whether or not this entity contains a built-in activator
*/
bool GetSelfActivator();
[[nodiscard]] bool GetSelfActivator() const noexcept;
/**
* 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);
void SetSelfActivator(bool value) noexcept;
/**
* Currently unused
*/
std::vector<int> GetCustomModules();
[[nodiscard]] std::vector<int> GetCustomModules() const noexcept;
/**
* Currently unused
*/
void SetCustomModules(std::vector<int> value);
void SetCustomModules(std::vector<int> value) noexcept;
/**
* Returns the activity ID for participating in this quickbuild
* @return the activity ID for participating in this quickbuild
*/
int GetActivityId();
[[nodiscard]] int GetActivityId() const noexcept;
/**
* Sets the activity ID for participating in this quickbuild
* @param value the activity ID to set
*/
void SetActivityId(int value);
void SetActivityId(int value) noexcept;
/**
* Currently unused
*/
int GetPostImaginationCost();
[[nodiscard]] int GetPostImaginationCost() const noexcept;
/**
* Currently unused
*/
void SetPostImaginationCost(int value);
void SetPostImaginationCost(int value) noexcept;
/**
* 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
*/
float GetTimeBeforeSmash();
[[nodiscard]] float GetTimeBeforeSmash() const noexcept;
/**
* Sets the time it takes for an incomplete quickbuild to be smashed automatically
* @param value the time to set
*/
void SetTimeBeforeSmash(float value);
void SetTimeBeforeSmash(float value) noexcept;
/**
* Returns the current quickbuild state
* @return the current quickbuild state
*/
eQuickBuildState GetState();
[[nodiscard]] eQuickBuildState GetState() const noexcept;
/**
* Returns the player that is currently building this quickbuild
* @return the player that is currently building this quickbuild
*/
Entity* GetBuilder() const;
[[nodiscard]] 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
*/
bool GetRepositionPlayer() const;
[[nodiscard]] bool GetRepositionPlayer() const noexcept;
/**
* 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);
void SetRepositionPlayer(bool value) noexcept;
/**
* Adds a callback that is called when the quickbuild is completed