Limit how many workers can harvest the same resource

This commit is contained in:
2024-02-05 09:19:59 +01:00
parent ab0fef8ebf
commit d55ed29f97
11 changed files with 87 additions and 19 deletions

View File

@@ -4,7 +4,7 @@
#include "../sounds.h"
i32 harvestEvent(ecs_entity_t entity, HarvestEvent event) {
BZ_ASSERT(ecs_has_id(ECS, entity, Harvestable));
BZ_ASSERT(ecs_has_id(ECS, entity, ecs_id(Harvestable)));
BZ_ASSERT(ecs_has(ECS, entity, Resource));
ecs_set(ECS, entity, Easing, {