1
Fork 0
mirror of https://github.com/Steffo99/swear-jar.git synced 2024-11-22 15:44:21 +00:00

Fix shop ui

This commit is contained in:
Steffo 2023-10-02 23:26:21 +02:00
parent 13d4b814dc
commit 1c35d5fcd1
Signed by: steffo
GPG key ID: 2A24051445686895

View file

@ -36,6 +36,7 @@ func _on_any_purchase_begin(what: Node):
if not what is PurchasableItem: if not what is PurchasableItem:
push_error("Purchase began outside a PurchasableItem") push_error("Purchase began outside a PurchasableItem")
return return
delete_button.disabled = true
if what.item_scene: if what.item_scene:
ghost_requested.emit(what.item_scene, what.item_icon) ghost_requested.emit(what.item_scene, what.item_icon)
purchase_begin.emit(what) purchase_begin.emit(what)
@ -45,6 +46,7 @@ func _on_any_purchase_cancel(what: Node):
if not what is PurchasableItem: if not what is PurchasableItem:
push_error("Purchase cancelled outside a PurchasableItem") push_error("Purchase cancelled outside a PurchasableItem")
return return
delete_button.disabled = false
purchase_cancel.emit(what) purchase_cancel.emit(what)
set_all_can_buy(true, what) set_all_can_buy(true, what)
@ -54,6 +56,7 @@ func _on_any_purchase_success(what: Node):
return return
if what.item_scene: if what.item_scene:
ghost_materialize.emit() ghost_materialize.emit()
delete_button.disabled = false
purchase_success.emit(what) purchase_success.emit(what)
set_all_can_buy(true, what) set_all_can_buy(true, what)