crafting system and improveemnts to mousetweaks
This commit is contained in:
parent
64d6e72407
commit
ccb15800a3
6 changed files with 45 additions and 5 deletions
|
|
@ -1,5 +1,8 @@
|
|||
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:
|
||||
|
|
@ -8,7 +11,12 @@ func _ready() -> void:
|
|||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
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:
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
[ext_resource type="Script" uid="uid://bla0gy2tlqwe1" path="res://scenes/workshop.gd" id="1_g1tdj"]
|
||||
[ext_resource type="PackedScene" uid="uid://f06ym5ujhdsc" path="res://inv_system/crafting_panel.tscn" id="2_wwo6w"]
|
||||
|
||||
[node name="Workshop" type="Control"]
|
||||
[node name="Workshop" type="Control" node_paths=PackedStringArray("ewaste_button", "computer_button", "crafting_inv")]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
|
|
@ -13,6 +13,9 @@ grow_horizontal = 2
|
|||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
script = ExtResource("1_g1tdj")
|
||||
ewaste_button = NodePath("GotoEwaste")
|
||||
computer_button = NodePath("GotoComputer")
|
||||
crafting_inv = NodePath("CraftingPanel")
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="."]
|
||||
layout_mode = 1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue