mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-01-09 06:17:10 +00:00
Split out unrelated changes to CleanupRoundup branch
This commit is contained in:
parent
b3dd1d3d4c
commit
74d8a5b167
@ -10,6 +10,7 @@
|
|||||||
#include "Database.h"
|
#include "Database.h"
|
||||||
#include "eConnectionType.h"
|
#include "eConnectionType.h"
|
||||||
#include "eChatInternalMessageType.h"
|
#include "eChatInternalMessageType.h"
|
||||||
|
#include "eGameMasterLevel.h"
|
||||||
#include "ChatPackets.h"
|
#include "ChatPackets.h"
|
||||||
#include "dConfig.h"
|
#include "dConfig.h"
|
||||||
|
|
||||||
@ -20,6 +21,14 @@ void PlayerContainer::Initialize() {
|
|||||||
GeneralUtils::TryParse<uint32_t>(Game::config->GetValue("max_number_of_friends")).value_or(m_MaxNumberOfFriends);
|
GeneralUtils::TryParse<uint32_t>(Game::config->GetValue("max_number_of_friends")).value_or(m_MaxNumberOfFriends);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
PlayerContainer::~PlayerContainer() {
|
||||||
|
m_Players.clear();
|
||||||
|
}
|
||||||
|
|
||||||
|
PlayerData::PlayerData() {
|
||||||
|
gmLevel = eGameMasterLevel::CIVILIAN;
|
||||||
|
}
|
||||||
|
|
||||||
TeamData::TeamData() {
|
TeamData::TeamData() {
|
||||||
lootFlag = Game::config->GetValue("default_team_loot") == "0" ? 0 : 1;
|
lootFlag = Game::config->GetValue("default_team_loot") == "0" ? 0 : 1;
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,14 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include <map>
|
#include <map>
|
||||||
#include "dCommonVars.h"
|
#include "dCommonVars.h"
|
||||||
#include "eGameMasterLevel.h"
|
|
||||||
#include "RakString.h"
|
#include "RakString.h"
|
||||||
#include <vector>
|
#include <vector>
|
||||||
#include "Game.h"
|
#include "Game.h"
|
||||||
#include "dServer.h"
|
#include "dServer.h"
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
|
||||||
|
enum class eGameMasterLevel : uint8_t;
|
||||||
|
|
||||||
struct IgnoreData {
|
struct IgnoreData {
|
||||||
IgnoreData(const std::string& name, const LWOOBJID& id) : playerName(name), playerId(id) {}
|
IgnoreData(const std::string& name, const LWOOBJID& id) : playerName(name), playerId(id) {}
|
||||||
inline bool operator==(const std::string& other) const noexcept {
|
inline bool operator==(const std::string& other) const noexcept {
|
||||||
@ -23,6 +24,7 @@ struct IgnoreData {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct PlayerData {
|
struct PlayerData {
|
||||||
|
PlayerData();
|
||||||
operator bool() const noexcept {
|
operator bool() const noexcept {
|
||||||
return playerID != LWOOBJID_EMPTY;
|
return playerID != LWOOBJID_EMPTY;
|
||||||
}
|
}
|
||||||
@ -43,7 +45,7 @@ struct PlayerData {
|
|||||||
std::string playerName;
|
std::string playerName;
|
||||||
std::vector<FriendData> friends;
|
std::vector<FriendData> friends;
|
||||||
std::vector<IgnoreData> ignoredPlayers;
|
std::vector<IgnoreData> ignoredPlayers;
|
||||||
eGameMasterLevel gmLevel = eGameMasterLevel::CIVILIAN;
|
eGameMasterLevel gmLevel;
|
||||||
bool isFTP = false;
|
bool isFTP = false;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -59,6 +61,8 @@ struct TeamData {
|
|||||||
|
|
||||||
class PlayerContainer {
|
class PlayerContainer {
|
||||||
public:
|
public:
|
||||||
|
~PlayerContainer();
|
||||||
|
|
||||||
void Initialize();
|
void Initialize();
|
||||||
void InsertPlayer(Packet* packet);
|
void InsertPlayer(Packet* packet);
|
||||||
void RemovePlayer(Packet* packet);
|
void RemovePlayer(Packet* packet);
|
||||||
|
@ -162,7 +162,7 @@ public:
|
|||||||
return new LDFData<T>(key, value);
|
return new LDFData<T>(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline static const T Default = {};
|
inline static T Default = {};
|
||||||
};
|
};
|
||||||
|
|
||||||
// LDF Types
|
// LDF Types
|
||||||
|
@ -39,49 +39,49 @@ constexpr uint32_t lowFrameDelta = FRAMES_TO_MS(lowFramerate);
|
|||||||
|
|
||||||
//=========== TYPEDEFS ==========
|
//=========== TYPEDEFS ==========
|
||||||
|
|
||||||
using LOT = int32_t; //!< A LOT
|
typedef int32_t LOT; //!< A LOT
|
||||||
using LWOOBJID = int64_t; //!< An object ID (should be unsigned actually but ok)
|
typedef int64_t LWOOBJID; //!< An object ID (should be unsigned actually but ok)
|
||||||
using TSkillID = int32_t; //!< A skill ID
|
typedef int32_t TSkillID; //!< A skill ID
|
||||||
using LWOCLONEID = uint32_t; //!< Used for Clone IDs
|
typedef uint32_t LWOCLONEID; //!< Used for Clone IDs
|
||||||
using LWOMAPID = uint16_t; //!< Used for Map IDs
|
typedef uint16_t LWOMAPID; //!< Used for Map IDs
|
||||||
using LWOINSTANCEID = uint16_t; //!< Used for Instance IDs
|
typedef uint16_t LWOINSTANCEID; //!< Used for Instance IDs
|
||||||
using PROPERTYCLONELIST = uint32_t; //!< Used for Property Clone IDs
|
typedef uint32_t PROPERTYCLONELIST; //!< Used for Property Clone IDs
|
||||||
using StripId = uint32_t;
|
typedef uint32_t StripId;
|
||||||
|
|
||||||
constexpr LWOOBJID LWOOBJID_EMPTY = 0; //!< An empty object ID
|
const LWOOBJID LWOOBJID_EMPTY = 0; //!< An empty object ID
|
||||||
constexpr LOT LOT_NULL = -1; //!< A null LOT
|
const LOT LOT_NULL = -1; //!< A null LOT
|
||||||
constexpr int32_t LOOTTYPE_NONE = 0; //!< No loot type available
|
const int32_t LOOTTYPE_NONE = 0; //!< No loot type available
|
||||||
constexpr float SECONDARY_PRIORITY = 1.0f; //!< Secondary Priority
|
const float SECONDARY_PRIORITY = 1.0f; //!< Secondary Priority
|
||||||
constexpr uint32_t INVENTORY_MAX = 9999999; //!< The Maximum Inventory Size
|
const uint32_t INVENTORY_MAX = 9999999; //!< The Maximum Inventory Size
|
||||||
constexpr LWOCLONEID LWOCLONEID_INVALID = -1; //!< Invalid LWOCLONEID
|
const uint32_t LWOCLONEID_INVALID = -1; //!< Invalid LWOCLONEID
|
||||||
constexpr LWOINSTANCEID LWOINSTANCEID_INVALID = -1; //!< Invalid LWOINSTANCEID
|
const uint16_t LWOINSTANCEID_INVALID = -1; //!< Invalid LWOINSTANCEID
|
||||||
constexpr LWOMAPID LWOMAPID_INVALID = -1; //!< Invalid LWOMAPID
|
const uint16_t LWOMAPID_INVALID = -1; //!< Invalid LWOMAPID
|
||||||
constexpr uint64_t LWOZONEID_INVALID = 0; //!< Invalid LWOZONEID
|
const uint64_t LWOZONEID_INVALID = 0; //!< Invalid LWOZONEID
|
||||||
|
|
||||||
constexpr float PI = 3.14159f;
|
const float PI = 3.14159f;
|
||||||
|
|
||||||
//============ STRUCTS ==============
|
//============ STRUCTS ==============
|
||||||
|
|
||||||
struct LWOSCENEID {
|
struct LWOSCENEID {
|
||||||
public:
|
public:
|
||||||
constexpr LWOSCENEID() noexcept { m_sceneID = -1; m_layerID = 0; }
|
LWOSCENEID() { m_sceneID = -1; m_layerID = 0; }
|
||||||
constexpr LWOSCENEID(int sceneID) noexcept { m_sceneID = sceneID; m_layerID = 0; }
|
LWOSCENEID(int sceneID) { m_sceneID = sceneID; m_layerID = 0; }
|
||||||
constexpr LWOSCENEID(int sceneID, unsigned int layerID) noexcept { m_sceneID = sceneID; m_layerID = layerID; }
|
LWOSCENEID(int sceneID, unsigned int layerID) { m_sceneID = sceneID; m_layerID = layerID; }
|
||||||
|
|
||||||
constexpr LWOSCENEID& operator=(const LWOSCENEID& rhs) noexcept { m_sceneID = rhs.m_sceneID; m_layerID = rhs.m_layerID; return *this; }
|
LWOSCENEID& operator=(const LWOSCENEID& rhs) { m_sceneID = rhs.m_sceneID; m_layerID = rhs.m_layerID; return *this; }
|
||||||
constexpr LWOSCENEID& operator=(const int rhs) noexcept { m_sceneID = rhs; m_layerID = 0; return *this; }
|
LWOSCENEID& operator=(const int rhs) { m_sceneID = rhs; m_layerID = 0; return *this; }
|
||||||
|
|
||||||
constexpr bool operator<(const LWOSCENEID& rhs) const noexcept { return (m_sceneID < rhs.m_sceneID || (m_sceneID == rhs.m_sceneID && m_layerID < rhs.m_layerID)); }
|
bool operator<(const LWOSCENEID& rhs) const { return (m_sceneID < rhs.m_sceneID || (m_sceneID == rhs.m_sceneID && m_layerID < rhs.m_layerID)); }
|
||||||
constexpr bool operator<(const int rhs) const noexcept { return m_sceneID < rhs; }
|
bool operator<(const int rhs) const { return m_sceneID < rhs; }
|
||||||
|
|
||||||
constexpr bool operator==(const LWOSCENEID& rhs) const noexcept { return (m_sceneID == rhs.m_sceneID && m_layerID == rhs.m_layerID); }
|
bool operator==(const LWOSCENEID& rhs) const { return (m_sceneID == rhs.m_sceneID && m_layerID == rhs.m_layerID); }
|
||||||
constexpr bool operator==(const int rhs) const noexcept { return m_sceneID == rhs; }
|
bool operator==(const int rhs) const { return m_sceneID == rhs; }
|
||||||
|
|
||||||
constexpr int GetSceneID() const noexcept { return m_sceneID; }
|
const int GetSceneID() const { return m_sceneID; }
|
||||||
constexpr unsigned int GetLayerID() const noexcept { return m_layerID; }
|
const unsigned int GetLayerID() const { return m_layerID; }
|
||||||
|
|
||||||
constexpr void SetSceneID(const int sceneID) noexcept { m_sceneID = sceneID; }
|
void SetSceneID(const int sceneID) { m_sceneID = sceneID; }
|
||||||
constexpr void SetLayerID(const unsigned int layerID) noexcept { m_layerID = layerID; }
|
void SetLayerID(const unsigned int layerID) { m_layerID = layerID; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
int m_sceneID;
|
int m_sceneID;
|
||||||
@ -90,14 +90,14 @@ private:
|
|||||||
|
|
||||||
struct LWOZONEID {
|
struct LWOZONEID {
|
||||||
public:
|
public:
|
||||||
constexpr const LWOMAPID& GetMapID() const noexcept { return m_MapID; }
|
const LWOMAPID& GetMapID() const { return m_MapID; }
|
||||||
constexpr const LWOINSTANCEID& GetInstanceID() const noexcept { return m_InstanceID; }
|
const LWOINSTANCEID& GetInstanceID() const { return m_InstanceID; }
|
||||||
constexpr const LWOCLONEID& GetCloneID() const noexcept { return m_CloneID; }
|
const LWOCLONEID& GetCloneID() const { return m_CloneID; }
|
||||||
|
|
||||||
//In order: def constr, constr, assign op
|
//In order: def constr, constr, assign op
|
||||||
constexpr LWOZONEID() noexcept { m_MapID = LWOMAPID_INVALID; m_InstanceID = LWOINSTANCEID_INVALID; m_CloneID = LWOCLONEID_INVALID; }
|
LWOZONEID() { m_MapID = LWOMAPID_INVALID; m_InstanceID = LWOINSTANCEID_INVALID; m_CloneID = LWOCLONEID_INVALID; }
|
||||||
constexpr LWOZONEID(const LWOMAPID& mapID, const LWOINSTANCEID& instanceID, const LWOCLONEID& cloneID) noexcept { m_MapID = mapID; m_InstanceID = instanceID; m_CloneID = cloneID; }
|
LWOZONEID(const LWOMAPID& mapID, const LWOINSTANCEID& instanceID, const LWOCLONEID& cloneID) { m_MapID = mapID; m_InstanceID = instanceID; m_CloneID = cloneID; }
|
||||||
constexpr LWOZONEID(const LWOZONEID& replacement) noexcept { *this = replacement; }
|
LWOZONEID(const LWOZONEID& replacement) { *this = replacement; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
LWOMAPID m_MapID; //1000 for VE, 1100 for AG, etc...
|
LWOMAPID m_MapID; //1000 for VE, 1100 for AG, etc...
|
||||||
@ -105,20 +105,20 @@ private:
|
|||||||
LWOCLONEID m_CloneID; //To differentiate between "your property" and "my property". Always 0 for non-prop worlds.
|
LWOCLONEID m_CloneID; //To differentiate between "your property" and "my property". Always 0 for non-prop worlds.
|
||||||
};
|
};
|
||||||
|
|
||||||
constexpr LWOSCENEID LWOSCENEID_INVALID = -1;
|
const LWOSCENEID LWOSCENEID_INVALID = -1;
|
||||||
|
|
||||||
struct LWONameValue {
|
struct LWONameValue {
|
||||||
uint32_t length = 0; //!< The length of the name
|
uint32_t length = 0; //!< The length of the name
|
||||||
std::u16string name; //!< The name
|
std::u16string name; //!< The name
|
||||||
|
|
||||||
LWONameValue() = default;
|
LWONameValue(void) {}
|
||||||
|
|
||||||
LWONameValue(const std::u16string& name) {
|
LWONameValue(const std::u16string& name) {
|
||||||
this->name = name;
|
this->name = name;
|
||||||
this->length = static_cast<uint32_t>(name.length());
|
this->length = static_cast<uint32_t>(name.length());
|
||||||
}
|
}
|
||||||
|
|
||||||
~LWONameValue() = default;
|
~LWONameValue(void) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
struct FriendData {
|
struct FriendData {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#include "CppScripts.h"
|
#include "CppScripts.h"
|
||||||
|
|
||||||
QuickBuildComponent::QuickBuildComponent(Entity* entity) : Component{ entity } {
|
QuickBuildComponent::QuickBuildComponent(Entity* entity) : Component(entity) {
|
||||||
std::u16string checkPreconditions = entity->GetVar<std::u16string>(u"CheckPrecondition");
|
std::u16string checkPreconditions = entity->GetVar<std::u16string>(u"CheckPrecondition");
|
||||||
|
|
||||||
if (!checkPreconditions.empty()) {
|
if (!checkPreconditions.empty()) {
|
||||||
@ -283,47 +283,47 @@ void QuickBuildComponent::DespawnActivator() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Entity* QuickBuildComponent::GetActivator() const {
|
Entity* QuickBuildComponent::GetActivator() {
|
||||||
return Game::entityManager->GetEntity(m_ActivatorId);
|
return Game::entityManager->GetEntity(m_ActivatorId);
|
||||||
}
|
}
|
||||||
|
|
||||||
NiPoint3 QuickBuildComponent::GetActivatorPosition() const noexcept {
|
NiPoint3 QuickBuildComponent::GetActivatorPosition() {
|
||||||
return m_ActivatorPosition;
|
return m_ActivatorPosition;
|
||||||
}
|
}
|
||||||
|
|
||||||
float QuickBuildComponent::GetResetTime() const noexcept {
|
float QuickBuildComponent::GetResetTime() {
|
||||||
return m_ResetTime;
|
return m_ResetTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
float QuickBuildComponent::GetCompleteTime() const noexcept {
|
float QuickBuildComponent::GetCompleteTime() {
|
||||||
return m_CompleteTime;
|
return m_CompleteTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
int QuickBuildComponent::GetTakeImagination() const noexcept {
|
int QuickBuildComponent::GetTakeImagination() {
|
||||||
return m_TakeImagination;
|
return m_TakeImagination;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QuickBuildComponent::GetInterruptible() const noexcept {
|
bool QuickBuildComponent::GetInterruptible() {
|
||||||
return m_Interruptible;
|
return m_Interruptible;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QuickBuildComponent::GetSelfActivator() const noexcept {
|
bool QuickBuildComponent::GetSelfActivator() {
|
||||||
return m_SelfActivator;
|
return m_SelfActivator;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<int> QuickBuildComponent::GetCustomModules() const noexcept {
|
std::vector<int> QuickBuildComponent::GetCustomModules() {
|
||||||
return m_CustomModules;
|
return m_CustomModules;
|
||||||
}
|
}
|
||||||
|
|
||||||
int QuickBuildComponent::GetActivityId() const noexcept {
|
int QuickBuildComponent::GetActivityId() {
|
||||||
return m_ActivityId;
|
return m_ActivityId;
|
||||||
}
|
}
|
||||||
|
|
||||||
int QuickBuildComponent::GetPostImaginationCost() const noexcept {
|
int QuickBuildComponent::GetPostImaginationCost() {
|
||||||
return m_PostImaginationCost;
|
return m_PostImaginationCost;
|
||||||
}
|
}
|
||||||
|
|
||||||
float QuickBuildComponent::GetTimeBeforeSmash() const noexcept {
|
float QuickBuildComponent::GetTimeBeforeSmash() {
|
||||||
return m_TimeBeforeSmash;
|
return m_TimeBeforeSmash;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -337,19 +337,19 @@ Entity* QuickBuildComponent::GetBuilder() const {
|
|||||||
return builder;
|
return builder;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool QuickBuildComponent::GetRepositionPlayer() const noexcept {
|
bool QuickBuildComponent::GetRepositionPlayer() const {
|
||||||
return m_RepositionPlayer;
|
return m_RepositionPlayer;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetActivatorPosition(NiPoint3 value) noexcept {
|
void QuickBuildComponent::SetActivatorPosition(NiPoint3 value) {
|
||||||
m_ActivatorPosition = value;
|
m_ActivatorPosition = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetResetTime(float value) noexcept {
|
void QuickBuildComponent::SetResetTime(float value) {
|
||||||
m_ResetTime = value;
|
m_ResetTime = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetCompleteTime(float value) noexcept {
|
void QuickBuildComponent::SetCompleteTime(float value) {
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
m_CompleteTime = 4.5f;
|
m_CompleteTime = 4.5f;
|
||||||
} else {
|
} 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;
|
m_TakeImagination = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetInterruptible(bool value) noexcept {
|
void QuickBuildComponent::SetInterruptible(bool value) {
|
||||||
m_Interruptible = value;
|
m_Interruptible = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetSelfActivator(bool value) noexcept {
|
void QuickBuildComponent::SetSelfActivator(bool value) {
|
||||||
m_SelfActivator = value;
|
m_SelfActivator = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetCustomModules(std::vector<int> value) noexcept {
|
void QuickBuildComponent::SetCustomModules(std::vector<int> value) {
|
||||||
m_CustomModules = value;
|
m_CustomModules = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetActivityId(int value) noexcept {
|
void QuickBuildComponent::SetActivityId(int value) {
|
||||||
m_ActivityId = value;
|
m_ActivityId = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetPostImaginationCost(int value) noexcept {
|
void QuickBuildComponent::SetPostImaginationCost(int value) {
|
||||||
m_PostImaginationCost = value;
|
m_PostImaginationCost = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
void QuickBuildComponent::SetTimeBeforeSmash(float value) noexcept {
|
void QuickBuildComponent::SetTimeBeforeSmash(float value) {
|
||||||
if (value < 0) {
|
if (value < 0) {
|
||||||
m_TimeBeforeSmash = 10.0f;
|
m_TimeBeforeSmash = 10.0f;
|
||||||
} else {
|
} 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;
|
m_RepositionPlayer = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -50,124 +50,124 @@ public:
|
|||||||
* Returns the entity that acts as the activator for this quickbuild
|
* Returns the entity that acts as the activator for this quickbuild
|
||||||
* @return 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
|
* Returns the spawn position of the activator for this quickbuild, if any
|
||||||
* @return 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
|
* Sets the spawn position for the activator of this quickbuild
|
||||||
* @param value the spawn position to set for the activator
|
* @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
|
* 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
|
* @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
|
* Sets the time it takes for the quickbuild to reset after being built
|
||||||
* @param value the reset time to set
|
* @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
|
* Returns the time it takes to complete the quickbuild
|
||||||
* @return 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
|
* Sets the time it takes to complete the quickbuild
|
||||||
* @param value the completion time to set
|
* @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
|
* Returns the imagination that's taken when completing the quickbuild
|
||||||
* @return 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
|
* Sets the imagination that's taken when completing the quickbuild
|
||||||
* @param value the imagination deduction to set
|
* @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
|
* Returns if the quickbuild can be interrupted, currently unused
|
||||||
* @return if the quickbuild can be interrupted
|
* @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
|
* Sets whether or not the quickbuild can be interrupted, currently unused
|
||||||
* @param value true if the quickbuild may be interrupted, false otherwise
|
* @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
|
* Returns whether or not this entity contains a built-in activator
|
||||||
* @return 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
|
* Sets whether or not this entity contains a built-in activator. If set to false this will spawn activators on
|
||||||
* each new quickbuild.
|
* each new quickbuild.
|
||||||
* @param value whether or not this entity contains a built-in activator
|
* @param value whether or not this entity contains a built-in activator
|
||||||
*/
|
*/
|
||||||
void SetSelfActivator(bool value) noexcept;
|
void SetSelfActivator(bool value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently unused
|
* Currently unused
|
||||||
*/
|
*/
|
||||||
[[nodiscard]] std::vector<int> GetCustomModules() const noexcept;
|
std::vector<int> GetCustomModules();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently unused
|
* Currently unused
|
||||||
*/
|
*/
|
||||||
void SetCustomModules(std::vector<int> value) noexcept;
|
void SetCustomModules(std::vector<int> value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the activity ID for participating in this quickbuild
|
* Returns the activity ID for participating in this quickbuild
|
||||||
* @return 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
|
* Sets the activity ID for participating in this quickbuild
|
||||||
* @param value the activity ID to set
|
* @param value the activity ID to set
|
||||||
*/
|
*/
|
||||||
void SetActivityId(int value) noexcept;
|
void SetActivityId(int value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently unused
|
* Currently unused
|
||||||
*/
|
*/
|
||||||
[[nodiscard]] int GetPostImaginationCost() const noexcept;
|
int GetPostImaginationCost();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Currently unused
|
* Currently unused
|
||||||
*/
|
*/
|
||||||
void SetPostImaginationCost(int value) noexcept;
|
void SetPostImaginationCost(int value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the time it takes for an incomplete quickbuild to be smashed automatically
|
* 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
|
* @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
|
* Sets the time it takes for an incomplete quickbuild to be smashed automatically
|
||||||
* @param value the time to set
|
* @param value the time to set
|
||||||
*/
|
*/
|
||||||
void SetTimeBeforeSmash(float value) noexcept;
|
void SetTimeBeforeSmash(float value);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the current quickbuild state
|
* Returns the current quickbuild state
|
||||||
@ -179,19 +179,19 @@ public:
|
|||||||
* Returns the player that is currently building this quickbuild
|
* Returns the player that is currently building this quickbuild
|
||||||
* @return 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
|
* Returns whether or not the player is repositioned when initiating the quickbuild
|
||||||
* @return 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
|
* 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
|
* @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
|
* Adds a callback that is called when the quickbuild is completed
|
||||||
|
Loading…
Reference in New Issue
Block a user