Change Storage to tag (since we have global storage)

This commit is contained in:
2023-12-29 14:59:40 +01:00
parent 681080f3ed
commit 5190c86316
4 changed files with 12 additions and 22 deletions

View File

@@ -163,10 +163,6 @@ extern ECS_COMPONENT_DECLARE(UnitAI);
extern ECS_TAG_DECLARE(Selectable);
extern ECS_TAG_DECLARE(Selected);
// Unit can:
// - Attack
extern ECS_TAG_DECLARE(Unit);
// Worker can:
// - Harvest
// - Build
@@ -183,19 +179,15 @@ typedef struct Worker {
} Worker;
extern ECS_COMPONENT_DECLARE(Worker);
// Unit can:
// - Attack
extern ECS_TAG_DECLARE(Unit);
extern ECS_TAG_DECLARE(Storage);
extern ECS_TAG_DECLARE(Harvestable);
extern ECS_TAG_DECLARE(Buildable);
extern ECS_TAG_DECLARE(Workable);
extern ECS_TAG_DECLARE(Attackable);
typedef struct Storage {
int capacity[RES_COUNT];
int amount[RES_COUNT];
int reserved[RES_COUNT];
int pending[RES_COUNT];
} Storage;
extern ECS_COMPONENT_DECLARE(Storage);
void initComponentIDs(ecs_world_t *ecs);