crafting working!
This commit is contained in:
parent
bc657be1ab
commit
c6a6171a81
2 changed files with 12 additions and 0 deletions
|
|
@ -9,4 +9,5 @@
|
||||||
[resource]
|
[resource]
|
||||||
script = ExtResource("2_2p7jb")
|
script = ExtResource("2_2p7jb")
|
||||||
ingredients = Array[ExtResource("1_ayiw2")]([ExtResource("2_egxug"), ExtResource("4_tkhhn"), ExtResource("3_ccdvw"), null, null, null, null, null, null])
|
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"
|
metadata/_custom_type_script = "uid://b4iu5xrdf0evs"
|
||||||
|
|
|
||||||
|
|
@ -92,4 +92,15 @@ func style_none():
|
||||||
|
|
||||||
|
|
||||||
func _on_action_button_pressed() -> void:
|
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.
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
func empty_grid():
|
||||||
|
for slot in slots:
|
||||||
|
slot.item = null
|
||||||
|
slot.update_ui()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue