player: add check before unequipping gear

This commit is contained in:
Jeremy Baxter 2026-01-24 12:41:10 +13:00
parent 73fe669f57
commit cda93d8177

View file

@ -65,6 +65,7 @@ func die():
# strip gears
for gear in $Backpack.get_children():
gear.queue_free()
if has_node("Pivot/Container/Gear"):
$Pivot/Container/Gear.unequip(self)
$Pivot/Container/Gear.queue_free()