This commit is contained in:
Tabby 2026-01-18 02:41:09 +11:00
parent 356b0a92e6
commit 902024fc3f
19 changed files with 272 additions and 10 deletions

View file

@ -182,6 +182,7 @@ text = "[center]Icons[/center][ul]
[url=https://www.flaticon.com/free-icon/renovation_2825738]Rennovation Icon by Freepik[/url]
[url=https://www.flaticon.com/free-icon/home_25694]Home Icon by Dave Gandy[/url]
[url=https://www.flaticon.com/free-icon/home_25694]Volume Icon by Bharat Icons[/url]
[url=https://kenney.nl/assets/input-prompts]Input Glyphs by Kenny[/url]
[/ul][center]Items[/center][ul]
[url=https://www.umart.com.au/product/corsair-cx750-series-750w-80-bronze-non-modular-atx-power-supply-cp-9020279-au-77539]Large Power Supply[/url]
[url=https://sanmarcoscomputers.com/laptop-screen-repair/]Broken Laptop[/url]
@ -199,7 +200,10 @@ text = "[center]Icons[/center][ul]
[url=https://www.advantech.com/emt/products/atx-power-supply/sub_2d9aae24-dfb2-4741-bec5-62dca5bc9cd3]Small Power Supply[/url]
[url=https://www.ebay.com.au/itm/394942125788]SSD[/url]
[url=https://www.fingers.co.in/computer-peripherals/power-protection-ups/fr--1250lcd]UPS[/url]
[url=https://simple.wikipedia.org/wiki/Compact_disc]Disc[/url]"
[url=https://simple.wikipedia.org/wiki/Compact_disc]Disc[/url]
"
fit_content = true
[node name="MenuButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]

View file

@ -8,6 +8,7 @@ var block_moving = false
@export var room_button : Button
var current_location : Location
@export var move_blocker_panel : PanelContainer
@export var selection_indicator : Panel
enum Location{
ewaste,
@ -42,18 +43,24 @@ func _process(delta: float) -> void:
room_button.self_modulate = normal_color
func goto_ewaste():
selection_indicator.reparent(ewaste_button)
selection_indicator.position = Vector2(0,0)
if current_location == Location.ewaste:
return
current_location = Location.ewaste
get_tree().change_scene_to_file("res://scenes/ewaste.tscn")
func goto_workshop():
if current_location == Location.workshop:
return
selection_indicator.reparent(workshop_button)
selection_indicator.position = Vector2(0,0)
#if current_location == Location.workshop:
#return
current_location = Location.workshop
get_tree().change_scene_to_file("res://scenes/workshop.tscn")
func goto_room():
selection_indicator.reparent(room_button)
selection_indicator.position = Vector2(0,0)
if current_location == Location.room:
return
current_location = Location.room

View file

@ -1,4 +1,4 @@
[gd_scene load_steps=7 format=3 uid="uid://b5dh55o5mgima"]
[gd_scene load_steps=8 format=3 uid="uid://b5dh55o5mgima"]
[ext_resource type="Script" uid="uid://bxymsudka4nnb" path="res://scenes/manager/location_manager.gd" id="1_o5d0c"]
[ext_resource type="Texture2D" uid="uid://m10v3leibbil" path="res://assets/icons/bin.png" id="2_qjxm7"]
@ -18,7 +18,24 @@ corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[node name="LocationManager" type="Control" node_paths=PackedStringArray("ewaste_button", "workshop_button", "room_button", "move_blocker_panel")]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qjxm7"]
content_margin_left = 0.0
content_margin_top = 0.0
content_margin_right = 0.0
content_margin_bottom = 0.0
bg_color = Color(0.101960786, 0.101960786, 0.101960786, 0)
border_width_left = 3
border_width_top = 3
border_width_right = 3
border_width_bottom = 3
border_color = Color(1, 1, 0, 1)
corner_radius_top_left = 3
corner_radius_top_right = 3
corner_radius_bottom_right = 3
corner_radius_bottom_left = 3
corner_detail = 5
[node name="LocationManager" type="Control" node_paths=PackedStringArray("ewaste_button", "workshop_button", "room_button", "move_blocker_panel", "selection_indicator")]
z_index = 3
layout_mode = 3
anchors_preset = 15
@ -34,6 +51,7 @@ ewaste_button = NodePath("PanelContainer/VBoxContainer/MoveEwaste")
workshop_button = NodePath("PanelContainer/VBoxContainer/MoveWorkshop")
room_button = NodePath("PanelContainer/VBoxContainer/MoveHome")
move_blocker_panel = NodePath("Move blocker")
selection_indicator = NodePath("PanelContainer/VBoxContainer/MoveWorkshop/Selected")
[node name="PanelContainer" type="PanelContainer" parent="."]
layout_mode = 0
@ -54,11 +72,22 @@ icon = ExtResource("2_qjxm7")
layout_mode = 2
icon = ExtResource("3_1ogtx")
[node name="Selected" type="Panel" parent="PanelContainer/VBoxContainer/MoveWorkshop"]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_qjxm7")
[node name="MoveHome" type="Button" parent="PanelContainer/VBoxContainer"]
layout_mode = 2
icon = ExtResource("4_5p1uq")
[node name="Move blocker" type="PanelContainer" parent="."]
visible = false
layout_mode = 0
offset_left = 603.0
offset_top = 165.0

View file

@ -23,8 +23,9 @@ func _on_play_button_pressed() -> void:
PlayerInventory.show()
Clock.show()
Locations.show()
Locations.current_location = Locations.Location.workshop
get_tree().change_scene_to_file("res://scenes/workshop.tscn")
Locations.goto_workshop()
#Locations.current_location = Locations.Location.workshop
#get_tree().change_scene_to_file("res://scenes/workshop.tscn")
func _on_credits_button_pressed() -> void:

View file

@ -1,7 +1,8 @@
[gd_scene load_steps=3 format=3 uid="uid://dxr1ergmn3ij7"]
[gd_scene load_steps=4 format=3 uid="uid://dxr1ergmn3ij7"]
[ext_resource type="Script" uid="uid://4c4k3o0jnmdk" path="res://scenes/menu.gd" id="1_vjb58"]
[ext_resource type="Texture2D" uid="uid://b1rs6epjar6mj" path="res://assets/menu.png" id="2_con2f"]
[ext_resource type="Texture2D" uid="uid://bx7x5ufcp3nmt" path="res://assets/logo/game_name.png" id="3_con2f"]
[node name="Menu" type="Control"]
layout_mode = 3
@ -52,7 +53,15 @@ theme_override_constants/margin_bottom = 5
layout_mode = 2
alignment = 1
[node name="TextureRect" type="TextureRect" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
custom_minimum_size = Vector2(0, 189.09)
layout_mode = 2
texture = ExtResource("3_con2f")
expand_mode = 1
stretch_mode = 5
[node name="RichTextLabel" type="RichTextLabel" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"]
visible = false
layout_mode = 2
bbcode_enabled = true
text = "[center][font_size=50][wave](title pending)"