type fix
This commit is contained in:
@@ -5,7 +5,6 @@
|
||||
#include "flecs.h"
|
||||
|
||||
#include "Types/Item.hpp"
|
||||
#include "Types/Filter.h"
|
||||
#include "Util/SharedBuffer.h"
|
||||
#include "Util/Span.h"
|
||||
|
||||
@@ -14,12 +13,12 @@ struct InventoryT
|
||||
{
|
||||
struct InventoryMeta
|
||||
{
|
||||
IntegralType MaxSize{ std::numerics_limits<IntegralType>::max() };
|
||||
IntegralType MaxSize{ std::numeric_limits<IntegralType>::max() };
|
||||
};
|
||||
|
||||
public:
|
||||
InventoryT() = default;
|
||||
InventoryT(size_t itemAmount) { Slots = { static_cast<int>(items.size()), InventoryMeta{} }; }
|
||||
InventoryT(size_t itemAmount) { Slots = { itemAmount, InventoryMeta{} }; }
|
||||
|
||||
public:
|
||||
IntegralType GetItemsAmount(uint16_t id) const { Assert(id); return Slots[id]; }
|
||||
@@ -70,9 +69,9 @@ typedef Inventory64 WorldInventory;
|
||||
struct FixedInventoryEntry
|
||||
{
|
||||
FixedInventoryEntry() = default;
|
||||
FixedInventoryEntry(Item item, uint16_t amount, uint16_t maxAmount) : Item{ item }, Amount{ amount }, MaxAmount{ maxAmount } {};
|
||||
FixedInventoryEntry(Item item, uint16_t amount, uint16_t maxAmount) : ItemInfo{ item }, Amount{ amount }, MaxAmount{ maxAmount } {};
|
||||
|
||||
Item Item{};
|
||||
Item ItemInfo{};
|
||||
uint16_t Amount{};
|
||||
uint16_t MaxAmount{std::numeric_limits<uint16_t>::max()};
|
||||
};
|
||||
@@ -116,12 +115,12 @@ struct InventoryAreaOfEffect
|
||||
{
|
||||
InventoryAreaOfEffect(bool isCircle, uint8_t size)
|
||||
: IsCircle{ isCircle }
|
||||
, Size{ size }
|
||||
, ShapeSize{ size }
|
||||
{
|
||||
}
|
||||
|
||||
uint8_t IsCircle : 1;
|
||||
uint8_t Size : 7;
|
||||
uint8_t ShapeSize : 7;
|
||||
};
|
||||
static_assert(sizeof(InventoryAreaOfEffect) == 1);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user