RustHacker/shop/meowbay.gd

24 lines
719 B
GDScript3
Raw Permalink Normal View History

2026-01-14 19:00:40 +11:00
extends PanelContainer
@export var listing_grid : GridContainer
2026-01-17 13:42:34 +11:00
@export var block_buy : Control
2026-01-14 19:00:40 +11:00
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
#RecipeManager.recipes_loaded.connect(make_listings)
make_listings()
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
2026-01-17 13:42:34 +11:00
block_buy.visible = PlayerInventory.inventory_panel.empty_spots() <= 0
2026-01-14 19:00:40 +11:00
func make_listings():
2026-01-14 22:15:18 +11:00
#print("building meowbay")
2026-01-14 19:00:40 +11:00
for item in RecipeManager.items:
if item.can_buy:
var new_listing = load("res://shop/listing.tscn").instantiate()
new_listing.prepare(item)
listing_grid.add_child(new_listing)