From 79caba208f6a7af93b9e1cf9af31a6c8946bfccf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Madar=C3=A1sz?= Date: Sun, 16 Oct 2022 15:01:14 +0200 Subject: [PATCH] fix producer item count again --- code/foundation/src/systems/modules/system_producer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/foundation/src/systems/modules/system_producer.c b/code/foundation/src/systems/modules/system_producer.c index d1cba7b..178f5b7 100644 --- a/code/foundation/src/systems/modules/system_producer.c +++ b/code/foundation/src/systems/modules/system_producer.c @@ -29,7 +29,6 @@ void ProduceItems(ecs_iter_t *it) { const Ingredient *ing = 0; if ((ing = ecs_get_if(it->world, item_slot_ent, Ingredient))) { if (ing->producer == d->asset) { - item->quantity--; if (item->quantity <= 0) { item_despawn(item_slot_ent); storage[i].items[j] = 0; @@ -37,6 +36,7 @@ void ProduceItems(ecs_iter_t *it) { producer[i].processed_item = ing->product; producer[i].process_time = game_time() + game_rules.furnace_cook_time; } + item->quantity--; } } }