tavel location labels, botne tplanel change, ewaste loot bubble

This commit is contained in:
Tabby 2026-01-23 15:51:36 +11:00
parent d0d1ccdf50
commit a48d4f15c0
5 changed files with 55 additions and 10 deletions

View file

@ -2,10 +2,13 @@ extends Control
@export var bin_inventory : Inventory
@export var loot_button : Button
@export var loot_bubble : Control
#@export var loot_pool : Array[ItemData]
# Called when the node enters the scene tree for the first time.
func _ready() -> void:
if Clock.time_left < 200 or Clock.days_left < 6:
loot_bubble.hide()
pass # Replace with function body.
@ -16,6 +19,7 @@ func _process(delta: float) -> void:
func _on_loot_button_pressed() -> void:
loot_bubble.hide()
if Clock.has_time(10):
if bin_inventory.add_item(pick_random_item()):
Clock.use_time(10)

View file

@ -60,7 +60,7 @@ horizontal_alignment = 1
[node name="Button" type="Button" parent="MarginContainer/VBoxContainer"]
layout_mode = 2
text = "Install Device"
text = "Install Device (cannot return)"
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
layout_mode = 2

View file

@ -369,6 +369,7 @@ layout_mode = 0
offset_left = 207.0
offset_right = 363.0
offset_bottom = 141.0
mouse_filter = 2
texture = ExtResource("8_icm48")
expand_mode = 1

View file

@ -1,11 +1,12 @@
[gd_scene load_steps=5 format=3 uid="uid://dsfal3m4siap2"]
[gd_scene load_steps=6 format=3 uid="uid://dsfal3m4siap2"]
[ext_resource type="Script" uid="uid://c6oycdae5wvjf" path="res://inv_system/inventory.gd" id="1_6uqi0"]
[ext_resource type="Texture2D" uid="uid://dj487wauiay6i" path="res://assets/ewase bins.png" id="1_g14j6"]
[ext_resource type="Script" uid="uid://dal8g1ce37r3w" path="res://demo_scene.gd" id="1_vbegm"]
[ext_resource type="Texture2D" uid="uid://v01a44neaam6" path="res://assets/bubble.png" id="5_k36n4"]
[ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="7_xersf"]
[node name="ewaste" type="Control" node_paths=PackedStringArray("bin_inventory", "loot_button")]
[node name="ewaste" type="Control" node_paths=PackedStringArray("bin_inventory", "loot_button", "loot_bubble")]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
@ -16,6 +17,7 @@ mouse_filter = 2
script = ExtResource("1_vbegm")
bin_inventory = NodePath("BinPanel")
loot_button = NodePath("LootButton")
loot_bubble = NodePath("lootBubble")
[node name="TextureRect" type="TextureRect" parent="."]
z_index = -3
@ -136,6 +138,29 @@ grow_horizontal = 2
grow_vertical = 2
text = "Return to workshop"
[node name="lootBubble" type="TextureRect" parent="."]
self_modulate = Color(1, 0, 0.23137255, 0.6039216)
layout_mode = 0
offset_left = 762.0
offset_top = 196.0
offset_right = 998.0
offset_bottom = 286.0
mouse_filter = 2
texture = ExtResource("5_k36n4")
[node name="Label" type="Label" parent="lootBubble"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
offset_top = 7.0
offset_bottom = -26.0
grow_horizontal = 2
grow_vertical = 2
text = "Click to get items!"
horizontal_alignment = 1
vertical_alignment = 1
[connection signal="pressed" from="BinPanel/MarginContainer/VBoxContainer/Delete" to="." method="_on_delete_pressed"]
[connection signal="pressed" from="LootButton" to="." method="_on_loot_button_pressed"]
[connection signal="pressed" from="ReturnButton" to="." method="_on_return_button_pressed"]

View file

@ -55,22 +55,33 @@ selection_indicator = NodePath("PanelContainer/VBoxContainer/MoveWorkshop/Select
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 0
offset_left = 615.0
offset_top = 175.0
offset_right = 687.0
offset_bottom = 399.0
offset_left = 608.0
offset_top = 120.0
offset_right = 693.0
offset_bottom = 419.0
theme_override_styles/panel = SubResource("StyleBoxFlat_dc45l")
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
layout_mode = 2
[node name="MoveEwaste" type="Button" parent="PanelContainer/VBoxContainer"]
custom_minimum_size = Vector2(74, 97)
layout_mode = 2
theme_override_constants/h_separation = 194
text = "ewaste"
icon = ExtResource("2_qjxm7")
icon_alignment = 1
vertical_icon_alignment = 0
expand_icon = true
[node name="MoveWorkshop" type="Button" parent="PanelContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 97)
layout_mode = 2
text = "workshop"
icon = ExtResource("3_1ogtx")
icon_alignment = 1
vertical_icon_alignment = 0
expand_icon = true
[node name="Selected" type="Panel" parent="PanelContainer/VBoxContainer/MoveWorkshop"]
layout_mode = 1
@ -83,16 +94,20 @@ mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_qjxm7")
[node name="MoveHome" type="Button" parent="PanelContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 97)
layout_mode = 2
text = "home"
icon = ExtResource("4_5p1uq")
icon_alignment = 1
vertical_icon_alignment = 0
expand_icon = true
[node name="Move blocker" type="PanelContainer" parent="."]
visible = false
layout_mode = 0
offset_left = 603.0
offset_top = 165.0
offset_top = 113.0
offset_right = 699.0
offset_bottom = 409.0
offset_bottom = 426.0
theme_override_styles/panel = ExtResource("5_qjxm7")
[node name="Label" type="Label" parent="Move blocker"]