Basic wood chopping

This commit is contained in:
2023-12-10 11:08:40 +01:00
parent b410867902
commit 11832ec1cc
10 changed files with 224 additions and 45 deletions

View File

@@ -146,6 +146,28 @@ 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);
typedef struct HarvestTask {
ecs_entity_t entity;
} HarvestTask;
extern ECS_COMPONENT_DECLARE(HarvestTask);
typedef struct WorkerTask {
enum {
HARVEST,
BUILD,
} type;
ecs_entity_t target;
//struct WorkerTask *next;
} WorkerTask;
void initComponentIDs(ecs_world_t *ecs);