Finish lerge refactor of systems
This commit is contained in:
parent
6d742e60db
commit
913d7df56d
36 changed files with 614 additions and 634 deletions
|
|
@ -8,15 +8,29 @@
|
|||
|
||||
class Actor;
|
||||
|
||||
typedef enum {
|
||||
ITEM_VALUE_BOOL = 0,
|
||||
ITEM_VALUE_UINT,
|
||||
ITEM_VALUE_NO_VALUE
|
||||
} item_value_type_t;
|
||||
|
||||
class ItemData
|
||||
{
|
||||
protected:
|
||||
QString name_;
|
||||
uint8_t value_;
|
||||
uint32_t itemId_;
|
||||
bool loaded_;
|
||||
bool hidden_;
|
||||
item_value_type_t type_;
|
||||
|
||||
public:
|
||||
ItemData(uint32_t itemIdIn = QRandomGenerator::global()->generate(), QString name = "Item", uint8_t value = 0);
|
||||
ItemData(uint32_t itemIdIn = QRandomGenerator::global()->generate(),
|
||||
QString name = "Item",
|
||||
uint8_t value = 0,
|
||||
bool loaded = false,
|
||||
bool hidden = false,
|
||||
item_value_type_t type = ITEM_VALUE_BOOL);
|
||||
|
||||
inline bool operator==(const ItemData& in) const
|
||||
{
|
||||
|
|
@ -29,8 +43,14 @@ public:
|
|||
|
||||
uint32_t id() const;
|
||||
|
||||
bool hasChanged(const ItemData& other);
|
||||
void setName(QString name);
|
||||
uint8_t getValue() const;
|
||||
bool getLoaded() const;
|
||||
void setLoaded(bool loaded);
|
||||
bool isHidden();
|
||||
void setHidden(bool hidden);
|
||||
item_value_type_t getValueType();
|
||||
virtual QString getName() const;
|
||||
virtual void store(QJsonObject& json);
|
||||
virtual void load(const QJsonObject& json, const bool preserve = false);
|
||||
|
|
@ -72,6 +92,7 @@ public:
|
|||
void setOverride(const bool in);
|
||||
bool getOverride();
|
||||
void informValue(uint8_t value);
|
||||
void mergeLoaded(Item& item);
|
||||
|
||||
virtual void store(QJsonObject& json);
|
||||
virtual void load(const QJsonObject& json, const bool preserve = false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue