RustHacker/scenes/workshop.gd
2026-01-14 19:00:40 +11:00

27 lines
750 B
GDScript

extends Control
@export var ewaste_button : Button
@export var computer_button : Button
@export var crafting_inv : Inventory
# 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:
if crafting_inv.filled_slots() > 0:
ewaste_button.disabled = true
computer_button.disabled = true
else:
ewaste_button.disabled = false
computer_button.disabled = false
func _on_goto_ewaste_pressed() -> void:
get_tree().change_scene_to_file("res://scenes/ewaste.tscn")
func _on_goto_computer_pressed() -> void:
get_tree().change_scene_to_file("res://scenes/room.tscn")