Skip to content

Commit

Permalink
Avoid duplicate spells in inventory
Browse files Browse the repository at this point in the history
  • Loading branch information
konsumlamm committed Apr 16, 2024
1 parent 9f0f847 commit 8bb6c01
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/scripts/player.gd
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,8 @@ func _physics_process(delta):
game_over()

func give_spell_item(spell: SpellBook.Spells):
if spell in spell_inventory:
return
spell_inventory.append(spell)
ui.add_spell_item_panel(spell)

Expand Down

0 comments on commit 8bb6c01

Please sign in to comment.