Broken pos

This commit is contained in:
Rendo 2025-10-15 11:55:18 +05:00
commit 3af13d0a8b
24 changed files with 304 additions and 146 deletions

View file

@ -0,0 +1,19 @@
extends StructureBehaviour
@export var selected_recipe : Recipe
@onready var inventory : InOutInventory = get_parent().inventory
func _ready() -> void:
await get_tree().process_frame
switch_recipe(selected_recipe)
await get_tree().process_frame
for i in len(selected_recipe.ingridients):
inventory.input_array[i].filter = selected_recipe.ingridients[i].item
print(inventory.input_array[i].filter)
func switch_recipe(recipe: Recipe) -> void:
selected_recipe = recipe
inventory.input_capacity = len(selected_recipe.ingridients)
inventory.resize()
for i in len(selected_recipe.ingridients):
inventory.input_array[i].filter = selected_recipe.ingridients[i].item