diff --git a/Scenes/Filament/filament.gd b/Scenes/Filament/filament.gd new file mode 100644 index 0000000..9fa9dc6 --- /dev/null +++ b/Scenes/Filament/filament.gd @@ -0,0 +1,10 @@ +extends Node + +var filament_data: FilamentData +var amount: float + + +func initialize_filament(data: FilamentData) -> void: + filament_data = data + amount = filament_data.amount + print("Filament added: ", filament_data.material) diff --git a/Scenes/Filament/filament.gd.uid b/Scenes/Filament/filament.gd.uid new file mode 100644 index 0000000..d4609a3 --- /dev/null +++ b/Scenes/Filament/filament.gd.uid @@ -0,0 +1 @@ +uid://saed3mn0c2cw diff --git a/Scenes/Filament/filament.tscn b/Scenes/Filament/filament.tscn new file mode 100644 index 0000000..afbebda --- /dev/null +++ b/Scenes/Filament/filament.tscn @@ -0,0 +1,6 @@ +[gd_scene format=3 uid="uid://ckjg1eynole7p"] + +[ext_resource type="Script" uid="uid://saed3mn0c2cw" path="res://Scenes/Filament/filament.gd" id="1_b0mke"] + +[node name="Filament" type="Node" unique_id=274664749] +script = ExtResource("1_b0mke") diff --git a/Scenes/Global/game_data.gd b/Scenes/Global/game_data.gd index 553cf7d..909f6a5 100644 --- a/Scenes/Global/game_data.gd +++ b/Scenes/Global/game_data.gd @@ -4,16 +4,16 @@ extends Node signal job_generated(job: Node) signal job_interact signal printer_bought(printer: Node) -signal filament_bought @warning_ignore("unused_signal") signal refresh_printer_dropdown signal notification_requested(message: String, color: String) # - Variables - Code managed var job_spawn_timer: Timer +var inventory: Node var jobs_array: Array[JobData] var current_job_count: int = 0 -var filaments_array: Array[FilamentData] +var filaments_array: Array[Node] # - Text colors var hex_white: String = '#ffffff' @@ -25,6 +25,8 @@ var hex_red: String = '#f87171' const JOB_CARD = preload("uid://dvfcie8hqcb0") const PRINTER = preload("uid://33ctlyrpibs3") const ALL_JOBS = preload("uid://buvi8m3atoavu") +const FILAMENT = preload("uid://ckjg1eynole7p") + # - Constants - Settings # Jobs @@ -36,7 +38,9 @@ func _ready() -> void: # Create timer for job spawning job_spawn_timer = Timer.new() + inventory = Node.new() add_child(job_spawn_timer) + add_child(inventory) job_spawn_timer.wait_time = JOB_SPAWN_WAIT job_spawn_timer.one_shot = false job_spawn_timer.timeout.connect(_on_job_spawn_timer_timeout) @@ -55,8 +59,10 @@ func _on_shop_printer_purchase_req(printer_data: PrinterData) -> void: func _on_shop_filament_purchase_req(filament_data: FilamentData) -> void: if PlayerData.try_purchase(filament_data.price): - filaments_array.append(filament_data) - filament_bought.emit() + var new_filament = FILAMENT.instantiate() + inventory.add_child(new_filament) + new_filament.initialize_filament(filament_data) + #filaments_array.append(new_filament) #endregion #region Job generation diff --git a/Scenes/Printer/printer.gd b/Scenes/Printer/printer.gd index 0d8e0e6..fe6e122 100644 --- a/Scenes/Printer/printer.gd +++ b/Scenes/Printer/printer.gd @@ -16,10 +16,9 @@ var printer_data: PrinterData var selected_job: JobData var selected_job_index: int -var selected_filament: FilamentData +var selected_filament: Node var selected_filament_index: int - var is_printing: bool = false var time_left: float @@ -170,15 +169,17 @@ func _on_sell_button_pressed() -> void: func _on_select_filament_pressed() -> void: select_filament.clear() - print('Click') - print(GameData.filaments_array.is_empty()) - if GameData.filaments_array.is_empty(): + var current_filaments = GameData.inventory.get_children() + + if current_filaments.is_empty(): select_filament.add_item("Out of filament") - #start_button.disabled = true + selected_filament = null else: - #start_button.disabled = false - for filament in GameData.filaments_array: - var item_text = '%s | %.2f g' % [filament.material, filament.amount] + for filament in current_filaments: + var data = filament.filament_data + var amount = filament.amount + + var item_text = '%s | %.2f g' % [data.material, amount] select_filament.add_item(item_text) var current_index = select_filament.item_count - 1 @@ -192,7 +193,7 @@ func _on_select_filament_item_selected(index: int) -> void: func _on_select_job_pressed() -> void: select_job.clear() - if PlayerData.jobs.is_empty() or GameData.filaments_array.is_empty(): + if PlayerData.jobs.is_empty(): # or GameData.filaments_array.is_empty(): select_job.add_item("No jobs accepted") start_button.disabled = true else: diff --git a/Scenes/UI/ui.gd b/Scenes/UI/ui.gd index fec1fc9..c68c329 100644 --- a/Scenes/UI/ui.gd +++ b/Scenes/UI/ui.gd @@ -2,10 +2,10 @@ extends Control @export var debug: bool = false -@onready var debug_xp: Button = $VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugXP -@onready var debug_money: Button = $VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugMoney -@onready var debug_button: Button = $VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugButton -@onready var jobs_tab_button: Button = $VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons/JobsTabButton +@onready var debug_xp: Button = $GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugXP +@onready var debug_money: Button = $GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugMoney +@onready var debug_button: Button = $GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugButton +@onready var jobs_tab_button: Button = $GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons/JobsTabButton const PRINTER = preload("uid://33ctlyrpibs3") diff --git a/Scenes/UI/ui.tscn b/Scenes/UI/ui.tscn index 93a9573..77d0e54 100644 --- a/Scenes/UI/ui.tscn +++ b/Scenes/UI/ui.tscn @@ -62,7 +62,7 @@ scale_amount_max = 5.0 color = Color(0.45585775, 0.45585775, 0.4558577, 1) color_ramp = SubResource("Gradient_7g6h4") -[node name="VBoxContainer" type="VBoxContainer" parent="." unique_id=1634044894] +[node name="GameArea" type="VBoxContainer" parent="." unique_id=1634044894] layout_mode = 1 anchors_preset = 15 anchor_right = 1.0 @@ -70,56 +70,56 @@ anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -[node name="TopBar" type="PanelContainer" parent="VBoxContainer" unique_id=96075233] +[node name="TopBar" type="PanelContainer" parent="GameArea" unique_id=96075233] layout_mode = 2 -[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/TopBar" unique_id=1068942919] +[node name="VBoxContainer" type="VBoxContainer" parent="GameArea/TopBar" unique_id=1068942919] layout_mode = 2 -[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/TopBar/VBoxContainer" unique_id=1261087154] +[node name="MarginContainer" type="MarginContainer" parent="GameArea/TopBar/VBoxContainer" unique_id=1261087154] layout_mode = 2 theme_override_constants/margin_left = 10 theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/TopBar/VBoxContainer/MarginContainer" unique_id=487881719] +[node name="HBoxContainer" type="HBoxContainer" parent="GameArea/TopBar/VBoxContainer/MarginContainer" unique_id=487881719] layout_mode = 2 alignment = 1 -[node name="Money" type="Label" parent="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=2146628247] +[node name="Money" type="Label" parent="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=2146628247] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 text = "Money: 0 €" -[node name="DebugMoney" type="Button" parent="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=601739475] +[node name="DebugMoney" type="Button" parent="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=601739475] layout_mode = 2 text = "Give 100€" -[node name="DebugXP" type="Button" parent="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=535993224] +[node name="DebugXP" type="Button" parent="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=535993224] layout_mode = 2 text = "Give xp" -[node name="Time" type="Label" parent="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=1503956629] +[node name="Time" type="Label" parent="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=1503956629] visible = false layout_mode = 2 size_flags_horizontal = 3 text = "Time: 12:00" horizontal_alignment = 1 -[node name="Level" type="Label" parent="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=1016279160] +[node name="Level" type="Label" parent="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=1016279160] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 text = "Level: 1" horizontal_alignment = 2 -[node name="DebugButton" type="Button" parent="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=255003152] +[node name="DebugButton" type="Button" parent="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer" unique_id=255003152] layout_mode = 2 text = "Debug" -[node name="Experience" type="ProgressBar" parent="VBoxContainer/TopBar/VBoxContainer" unique_id=38033766] +[node name="Experience" type="ProgressBar" parent="GameArea/TopBar/VBoxContainer" unique_id=38033766] unique_name_in_owner = true custom_minimum_size = Vector2(0, 5) layout_mode = 2 @@ -127,24 +127,24 @@ theme_override_styles/fill = SubResource("StyleBoxFlat_8fchy") value = 65.27 show_percentage = false -[node name="MainAreaMargin" type="MarginContainer" parent="VBoxContainer" unique_id=1858818142] +[node name="MainAreaMargin" type="MarginContainer" parent="GameArea" unique_id=1858818142] layout_mode = 2 size_flags_vertical = 3 theme_override_constants/margin_top = 5 -[node name="MainArea" type="HBoxContainer" parent="VBoxContainer/MainAreaMargin" unique_id=352001241] +[node name="MainArea" type="HBoxContainer" parent="GameArea/MainAreaMargin" unique_id=352001241] layout_mode = 2 size_flags_vertical = 3 -[node name="LeftColumn" type="VBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea" unique_id=497978034] +[node name="LeftColumn" type="VBoxContainer" parent="GameArea/MainAreaMargin/MainArea" unique_id=497978034] layout_mode = 2 size_flags_horizontal = 3 -[node name="MainMargin" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/LeftColumn" unique_id=1390444828] +[node name="MainMargin" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/LeftColumn" unique_id=1390444828] layout_mode = 2 size_flags_vertical = 3 -[node name="Header" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/LeftColumn/MainMargin" unique_id=674103883] +[node name="Header" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/LeftColumn/MainMargin" unique_id=674103883] visible = false layout_mode = 2 theme_override_constants/margin_left = 10 @@ -152,15 +152,15 @@ theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="Label" type="Label" parent="VBoxContainer/MainAreaMargin/MainArea/LeftColumn/MainMargin/Header" unique_id=1155403735] +[node name="Label" type="Label" parent="GameArea/MainAreaMargin/MainArea/LeftColumn/MainMargin/Header" unique_id=1155403735] layout_mode = 2 text = "Printers" -[node name="PrinterScroll" type="ScrollContainer" parent="VBoxContainer/MainAreaMargin/MainArea/LeftColumn/MainMargin" unique_id=1351903470] +[node name="PrinterScroll" type="ScrollContainer" parent="GameArea/MainAreaMargin/MainArea/LeftColumn/MainMargin" unique_id=1351903470] layout_mode = 2 horizontal_scroll_mode = 0 -[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/LeftColumn/MainMargin/PrinterScroll" unique_id=134445001] +[node name="MarginContainer" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/LeftColumn/MainMargin/PrinterScroll" unique_id=134445001] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -169,21 +169,21 @@ theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="PrinterContainer" type="VBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea/LeftColumn/MainMargin/PrinterScroll/MarginContainer" unique_id=374703275] +[node name="PrinterContainer" type="VBoxContainer" parent="GameArea/MainAreaMargin/MainArea/LeftColumn/MainMargin/PrinterScroll/MarginContainer" unique_id=374703275] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 theme_override_constants/separation = 8 -[node name="Printer" parent="VBoxContainer/MainAreaMargin/MainArea/LeftColumn/MainMargin/PrinterScroll/MarginContainer/PrinterContainer" unique_id=1372437203 instance_placeholder="res://Scenes/Printer/printer.tscn"] +[node name="Printer" parent="GameArea/MainAreaMargin/MainArea/LeftColumn/MainMargin/PrinterScroll/MarginContainer/PrinterContainer" unique_id=1372437203 instance_placeholder="res://Scenes/Printer/printer.tscn"] layout_mode = 2 -[node name="RightColumn" type="VBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea" unique_id=653054059] +[node name="RightColumn" type="VBoxContainer" parent="GameArea/MainAreaMargin/MainArea" unique_id=653054059] layout_mode = 2 size_flags_horizontal = 3 -[node name="TabSwitcher" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn" unique_id=1366955734] +[node name="TabSwitcher" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn" unique_id=1366955734] layout_mode = 2 theme_override_constants/margin_left = 10 theme_override_constants/margin_top = 10 @@ -191,42 +191,42 @@ theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 script = ExtResource("13_vqjbf") -[node name="TabButtons" type="HBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher" unique_id=454550378] +[node name="TabButtons" type="HBoxContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher" unique_id=454550378] layout_mode = 2 -[node name="JobsTabButton" type="Button" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons" unique_id=332022453] +[node name="JobsTabButton" type="Button" parent="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons" unique_id=332022453] layout_mode = 2 size_flags_horizontal = 3 text = "Jobs" -[node name="ShopTabButton" type="Button" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons" unique_id=748682284] +[node name="ShopTabButton" type="Button" parent="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons" unique_id=748682284] layout_mode = 2 size_flags_horizontal = 3 text = "Shop" -[node name="MenuTabButton" type="Button" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons" unique_id=1414728414] +[node name="MenuTabButton" type="Button" parent="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons" unique_id=1414728414] layout_mode = 2 size_flags_horizontal = 3 text = "Menu" -[node name="MainMargin" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn" unique_id=562508461] +[node name="MainMargin" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn" unique_id=562508461] layout_mode = 2 size_flags_vertical = 3 theme_override_constants/margin_left = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="JobsTab" type="PanelContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin" unique_id=859027615] +[node name="JobsTab" type="PanelContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin" unique_id=859027615] unique_name_in_owner = true visible = false layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_cqvjp") -[node name="JobScroll" type="ScrollContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/JobsTab" unique_id=1046443254] +[node name="JobScroll" type="ScrollContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/JobsTab" unique_id=1046443254] layout_mode = 2 horizontal_scroll_mode = 0 -[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/JobsTab/JobScroll" unique_id=708828708] +[node name="MarginContainer" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/JobsTab/JobScroll" unique_id=708828708] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -235,25 +235,25 @@ theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="JobContainer" type="VBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/JobsTab/JobScroll/MarginContainer" unique_id=1821891785] +[node name="JobContainer" type="VBoxContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/JobsTab/JobScroll/MarginContainer" unique_id=1821891785] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 theme_override_constants/separation = 8 -[node name="JobCard" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/JobsTab/JobScroll/MarginContainer/JobContainer" unique_id=1714388686 instance_placeholder="res://Scenes/Job/job_card.tscn"] +[node name="JobCard" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/JobsTab/JobScroll/MarginContainer/JobContainer" unique_id=1714388686 instance_placeholder="res://Scenes/Job/job_card.tscn"] layout_mode = 2 -[node name="ShopTab" type="PanelContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin" unique_id=23859514] +[node name="ShopTab" type="PanelContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin" unique_id=23859514] unique_name_in_owner = true layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxFlat_vqjbf") -[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab" unique_id=1098619767] +[node name="VBoxContainer" type="VBoxContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab" unique_id=1098619767] layout_mode = 2 -[node name="ShopTabSwitcher" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer" unique_id=40136169] +[node name="ShopTabSwitcher" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer" unique_id=40136169] layout_mode = 2 theme_override_constants/margin_left = 10 theme_override_constants/margin_top = 10 @@ -261,20 +261,20 @@ theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 script = ExtResource("14_vqjbf") -[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher" unique_id=1669205646] +[node name="HBoxContainer" type="HBoxContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher" unique_id=1669205646] layout_mode = 2 -[node name="PrintersButton" type="Button" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher/HBoxContainer" unique_id=96323903] +[node name="PrintersButton" type="Button" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher/HBoxContainer" unique_id=96323903] layout_mode = 2 size_flags_horizontal = 3 text = "Printers" -[node name="FilamentsButton" type="Button" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher/HBoxContainer" unique_id=659653173] +[node name="FilamentsButton" type="Button" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher/HBoxContainer" unique_id=659653173] layout_mode = 2 size_flags_horizontal = 3 text = "Filaments" -[node name="Printers" type="PanelContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer" unique_id=1896524960] +[node name="Printers" type="PanelContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer" unique_id=1896524960] unique_name_in_owner = true visible = false layout_mode = 2 @@ -283,11 +283,11 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_qru7b") script = ExtResource("15_vqjbf") printers_array = Array[ExtResource("16_rdojl")]([ExtResource("17_llrls"), ExtResource("18_8rt22"), ExtResource("19_1ohgd")]) -[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Printers" unique_id=1757920718] +[node name="ScrollContainer" type="ScrollContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Printers" unique_id=1757920718] layout_mode = 2 horizontal_scroll_mode = 0 -[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Printers/ScrollContainer" unique_id=64943590] +[node name="MarginContainer" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Printers/ScrollContainer" unique_id=64943590] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -296,13 +296,13 @@ theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="PrinterList" type="VBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Printers/ScrollContainer/MarginContainer" unique_id=474412195] +[node name="PrinterList" type="VBoxContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Printers/ScrollContainer/MarginContainer" unique_id=474412195] unique_name_in_owner = true layout_mode = 2 size_flags_horizontal = 3 theme_override_constants/separation = 8 -[node name="Filaments" type="PanelContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer" unique_id=1891341317] +[node name="Filaments" type="PanelContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer" unique_id=1891341317] unique_name_in_owner = true layout_mode = 2 size_flags_vertical = 3 @@ -310,11 +310,11 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_mmlst") script = ExtResource("9_mbl0m") filaments_array = Array[ExtResource("10_vy225")]([ExtResource("11_fy0us"), ExtResource("12_fy0us")]) -[node name="ScrollContainer" type="ScrollContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Filaments" unique_id=1087434821] +[node name="ScrollContainer" type="ScrollContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Filaments" unique_id=1087434821] layout_mode = 2 horizontal_scroll_mode = 0 -[node name="MarginContainer" type="MarginContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Filaments/ScrollContainer" unique_id=1350479691] +[node name="MarginContainer" type="MarginContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Filaments/ScrollContainer" unique_id=1350479691] layout_mode = 2 size_flags_horizontal = 3 size_flags_vertical = 3 @@ -323,12 +323,12 @@ theme_override_constants/margin_top = 10 theme_override_constants/margin_right = 10 theme_override_constants/margin_bottom = 10 -[node name="FilamentList" type="VBoxContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Filaments/ScrollContainer/MarginContainer" unique_id=1017092781] +[node name="FilamentList" type="VBoxContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/Filaments/ScrollContainer/MarginContainer" unique_id=1017092781] unique_name_in_owner = true layout_mode = 2 theme_override_constants/separation = 8 -[node name="MenuTab" type="PanelContainer" parent="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin" unique_id=526907583] +[node name="MenuTab" type="PanelContainer" parent="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin" unique_id=526907583] unique_name_in_owner = true visible = false layout_mode = 2 @@ -346,11 +346,14 @@ grow_vertical = 1 [node name="JobSpawner" type="Timer" parent="." unique_id=1696213535] autostart = true -[connection signal="pressed" from="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugMoney" to="." method="_on_debug_money_pressed"] -[connection signal="pressed" from="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugXP" to="." method="_on_debug_xp_pressed"] -[connection signal="pressed" from="VBoxContainer/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugButton" to="." method="_on_debug_button_pressed"] -[connection signal="pressed" from="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons/JobsTabButton" to="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher" method="_on_jobs_tab_button_pressed"] -[connection signal="pressed" from="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons/ShopTabButton" to="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher" method="_on_shop_tab_button_pressed"] -[connection signal="pressed" from="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons/MenuTabButton" to="VBoxContainer/MainAreaMargin/MainArea/RightColumn/TabSwitcher" method="_on_menu_tab_button_pressed"] -[connection signal="pressed" from="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher/HBoxContainer/PrintersButton" to="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher" method="_on_printers_button_pressed"] -[connection signal="pressed" from="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher/HBoxContainer/FilamentsButton" to="VBoxContainer/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher" method="_on_filaments_button_pressed"] +[node name="Inventory" type="Node" parent="." unique_id=459920508] +unique_name_in_owner = true + +[connection signal="pressed" from="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugMoney" to="." method="_on_debug_money_pressed"] +[connection signal="pressed" from="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugXP" to="." method="_on_debug_xp_pressed"] +[connection signal="pressed" from="GameArea/TopBar/VBoxContainer/MarginContainer/HBoxContainer/DebugButton" to="." method="_on_debug_button_pressed"] +[connection signal="pressed" from="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons/JobsTabButton" to="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher" method="_on_jobs_tab_button_pressed"] +[connection signal="pressed" from="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons/ShopTabButton" to="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher" method="_on_shop_tab_button_pressed"] +[connection signal="pressed" from="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher/TabButtons/MenuTabButton" to="GameArea/MainAreaMargin/MainArea/RightColumn/TabSwitcher" method="_on_menu_tab_button_pressed"] +[connection signal="pressed" from="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher/HBoxContainer/PrintersButton" to="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher" method="_on_printers_button_pressed"] +[connection signal="pressed" from="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher/HBoxContainer/FilamentsButton" to="GameArea/MainAreaMargin/MainArea/RightColumn/MainMargin/ShopTab/VBoxContainer/ShopTabSwitcher" method="_on_filaments_button_pressed"]