RustHacker/scenes/workshop.gd

31 lines
882 B
GDScript3
Raw Permalink Normal View History

2026-01-11 17:38:55 +11:00
extends Control
@export var ewaste_button : Button
@export var computer_button : Button
@export var crafting_inv : Inventory
2026-01-23 14:33:24 +11:00
@export var trash_inv : Inventory
2026-01-11 17:38:55 +11:00
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
pass # Replace with function body.
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(delta: float) -> void:
2026-01-23 16:52:07 +11:00
Locations.block_moving = crafting_inv.filled_slots() > 0 or trash_inv.filled_slots() > 0
2026-01-17 13:42:34 +11:00
#if crafting_inv.filled_slots() > 0:
#ewaste_button.disabled = true
#computer_button.disabled = true
#else:
#ewaste_button.disabled = false
#computer_button.disabled = false
2026-01-11 17:38:55 +11:00
func _on_goto_ewaste_pressed() -> void:
get_tree().change_scene_to_file("res://scenes/ewaste.tscn")
func _on_goto_computer_pressed() -> void:
2026-01-14 19:00:40 +11:00
get_tree().change_scene_to_file("res://scenes/room.tscn")