crafting working!

This commit is contained in:
Tabby 2026-01-11 18:54:03 +11:00
parent bc657be1ab
commit c6a6171a81
2 changed files with 12 additions and 0 deletions

View file

@ -9,4 +9,5 @@
[resource]
script = ExtResource("2_2p7jb")
ingredients = Array[ExtResource("1_ayiw2")]([ExtResource("2_egxug"), ExtResource("4_tkhhn"), ExtResource("3_ccdvw"), null, null, null, null, null, null])
output = ExtResource("4_tkhhn")
metadata/_custom_type_script = "uid://b4iu5xrdf0evs"

View file

@ -92,4 +92,15 @@ func style_none():
func _on_action_button_pressed() -> void:
if not matched_recipe:
return
if matched_recipe is CraftRecipe:
var crafting : CraftRecipe = matched_recipe
empty_grid()
add_item(crafting.output)
pass # Replace with function body.
func empty_grid():
for slot in slots:
slot.item = null
slot.update_ui()