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