mirror of
https://github.com/Steffo99/hella-farm.git
synced 2024-11-21 15:44:23 +00:00
Make _on_sacrifice_changed
more efficient
This commit is contained in:
parent
872ce5673f
commit
75c3096b31
1 changed files with 4 additions and 4 deletions
|
@ -58,11 +58,11 @@ func _ready() -> void:
|
|||
refresh_recipes()
|
||||
|
||||
func _on_sacrifice_changed(_entity: Node2D) -> void:
|
||||
var entities: Array[Node2D] = []
|
||||
entities.assign(
|
||||
stones.map(func(stone): return stone.entity)
|
||||
)
|
||||
for recipe in recipes:
|
||||
var entities: Array[Node2D] = []
|
||||
entities.assign(
|
||||
stones.map(func(stone): return stone.entity)
|
||||
)
|
||||
if recipe.do_match(entities):
|
||||
break
|
||||
|
||||
|
|
Loading…
Reference in a new issue