From 4a9193e54999c017770bfe61d785440862cec79e Mon Sep 17 00:00:00 2001 From: Tabby <41929769+tabby-cat-nya@users.noreply.github.com> Date: Sat, 17 Jan 2026 13:42:34 +1100 Subject: [PATCH] fixing bugs meow --- README.md | 21 ++++--- assets/icons/bin.png | Bin 0 -> 1447 bytes assets/icons/bin.png.import | 40 +++++++++++++ assets/icons/home.png | Bin 0 -> 1424 bytes assets/icons/home.png.import | 40 +++++++++++++ assets/icons/workshop.png | Bin 0 -> 1948 bytes assets/icons/workshop.png.import | 40 +++++++++++++ crafting/recipe book/recipe_card.tscn | 22 ++++++- demo_scene.gd | 7 ++- inv_system/inventory.gd | 7 +++ items/gpu.tres | 2 +- project.godot | 1 + scenes/ending.gd | 2 + scenes/ewaste.tscn | 20 ++++--- scenes/manager/locationManager.tscn | 9 --- scenes/manager/location_manager.gd | 60 +++++++++++++++++++ scenes/manager/location_manager.gd.uid | 1 + scenes/manager/locations panel.tscn | 77 +++++++++++++++++++++++++ scenes/manager/nuhuh stylebox.tres | 13 +++++ scenes/menu.gd | 2 + scenes/menu.tscn | 2 +- scenes/room.gd | 2 +- scenes/room.tscn | 23 +++++++- scenes/workshop.gd | 13 +++-- scenes/workshop.tscn | 2 + shop/meowbay.gd | 3 +- time_system/clock.gd | 1 + 27 files changed, 370 insertions(+), 40 deletions(-) create mode 100644 assets/icons/bin.png create mode 100644 assets/icons/bin.png.import create mode 100644 assets/icons/home.png create mode 100644 assets/icons/home.png.import create mode 100644 assets/icons/workshop.png create mode 100644 assets/icons/workshop.png.import delete mode 100644 scenes/manager/locationManager.tscn create mode 100644 scenes/manager/location_manager.gd create mode 100644 scenes/manager/location_manager.gd.uid create mode 100644 scenes/manager/locations panel.tscn create mode 100644 scenes/manager/nuhuh stylebox.tres diff --git a/README.md b/README.md index 4fc5255..2943547 100644 --- a/README.md +++ b/README.md @@ -26,19 +26,20 @@ Submission day: Jan 19th 8AM ## Bugs / Fixes -- [ ] Add Sarantis to playtesters list +- [x] Add Sarantis to playtesters list - [ ] Volume slider for music -- [ ] Change GOU rarity border to epic +- [x] Change GPU rarity border to epic - [ ] Refresh sell (and botnet) button when changes to next day - [ ] Improve tooltips - sell value, botnet value, scavengable?, flavour text -- [ ] Make location buttons static / icons - 3 buttons -- [ ] Leaving ewaste prevent item loss - "are you sure?" +- [x] Make location buttons static / icons - 3 buttons +- [-] Leaving ewaste prevent item loss - "are you sure?" - [ ] Improve visibility of book tabs - [ ] Prominent shift+click - [ ] make all images square to fix hitbox -- [ ] block buying if inventory full -- [ ] reduce days by 1 -- [ ] better border between recipes +- [x] block buying if inventory full +- [x] reduce days by 1 +- [x] better border between recipes +- [x] disable loot button if no time # Maintain motivation by setting milestones and showing progress when you reach them! 1. [x] Gettign a random assortment of loot from the ewaste bin @@ -64,3 +65,9 @@ Submission day: Jan 19th 8AM - [x] cpu, gpu - [x] pc / laptop - [ ] + +## Attribution +### Icons +https://www.flaticon.com/free-icon/home_25694?term=home&page=1&position=2&origin=tag&related_id=25694 +https://www.flaticon.com/free-icon/renovation_2825738?term=workshop&page=1&position=90&origin=search&related_id=2825738 +https://www.flaticon.com/free-icon/bin_484611?term=bin&page=1&position=4&origin=search&related_id=484611 diff --git a/assets/icons/bin.png b/assets/icons/bin.png new file mode 100644 index 0000000000000000000000000000000000000000..c377cdfadf3de5c4da365fc75f08cbd10ebd30f6 GIT binary patch literal 1447 zcmZ8hdowLue2)Vi`MWG!h%@GPyQLY;=$bF-j;Ulv2qh zj$30Rmke^r=CZj=Q`Ta15^-wKOKPDEZNU~QgAGD+{rTv?s+Hyv{(U2 z1_{v)9?|TGz~~si69Itb7ZM&#c5!giG9y#S6v{cYNUM`x$^mq>S?6@Ayrg}KBKurlIX=RxWonEjZd7#mBfn|CL1I!jF#;KyJy?CEZ?zrVTG z7mBCjQ%zILV$;vzSg6R-^F;>ylm?}(4))r_1Pnc%XU!w7Lnw=f!)Fbg+>_91u5~QM zx=Uz^wpz98ym-^QbfTbjWGTOZIWV|g-R020+S0v5m&1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t literal 0 HcmV?d00001 diff --git a/assets/icons/workshop.png.import b/assets/icons/workshop.png.import new file mode 100644 index 0000000..3ecd660 --- /dev/null +++ b/assets/icons/workshop.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bqnjkty8ofuw4" +path="res://.godot/imported/workshop.png-b82df1bb3024db0c54c687ecc4268776.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/icons/workshop.png" +dest_files=["res://.godot/imported/workshop.png-b82df1bb3024db0c54c687ecc4268776.ctex"] + +[params] + +compress/mode=0 +compress/high_quality=false +compress/lossy_quality=0.7 +compress/uastc_level=0 +compress/rdo_quality_loss=0.0 +compress/hdr_compression=1 +compress/normal_map=0 +compress/channel_pack=0 +mipmaps/generate=false +mipmaps/limit=-1 +roughness/mode=0 +roughness/src_normal="" +process/channel_remap/red=0 +process/channel_remap/green=1 +process/channel_remap/blue=2 +process/channel_remap/alpha=3 +process/fix_alpha_border=true +process/premult_alpha=false +process/normal_map_invert_y=false +process/hdr_as_srgb=false +process/hdr_clamp_exposure=false +process/size_limit=0 +detect_3d/compress_to=1 diff --git a/crafting/recipe book/recipe_card.tscn b/crafting/recipe book/recipe_card.tscn index 9894664..96dd1b7 100644 --- a/crafting/recipe book/recipe_card.tscn +++ b/crafting/recipe book/recipe_card.tscn @@ -1,13 +1,31 @@ -[gd_scene load_steps=5 format=3 uid="uid://btenxre8yvynx"] +[gd_scene load_steps=6 format=3 uid="uid://btenxre8yvynx"] [ext_resource type="Script" uid="uid://mvqohkfd6whc" path="res://crafting/recipe book/recipe_card.gd" id="1_8t2l7"] [ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="1_ebtwo"] [ext_resource type="Texture2D" uid="uid://cu18nhutsu0ov" path="res://assets/craftarrow.png" id="3_qstsn"] +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_qstsn"] +content_margin_left = 5.0 +content_margin_top = 5.0 +content_margin_right = 5.0 +content_margin_bottom = 5.0 +bg_color = Color(0.1, 0.1, 0.1, 0.6) +border_width_left = 2 +border_width_top = 2 +border_width_right = 2 +border_width_bottom = 2 +border_blend = true +corner_radius_top_left = 3 +corner_radius_top_right = 3 +corner_radius_bottom_right = 3 +corner_radius_bottom_left = 3 +corner_detail = 5 + [sub_resource type="LabelSettings" id="LabelSettings_qstsn"] -font_size = 10 +font_size = 8 [node name="Recipe Card" type="PanelContainer" node_paths=PackedStringArray("grid_container", "output_slot", "output_label")] +theme_override_styles/panel = SubResource("StyleBoxFlat_qstsn") script = ExtResource("1_8t2l7") grid_container = NodePath("HBoxContainer/GridContainer") output_slot = NodePath("HBoxContainer/VBoxContainer/ItemSlot10") diff --git a/demo_scene.gd b/demo_scene.gd index 542e1b3..3071c04 100644 --- a/demo_scene.gd +++ b/demo_scene.gd @@ -11,7 +11,8 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: - pass + Locations.block_moving = bin_inventory.filled_slots() > 0 + loot_button.disabled = not Clock.has_time(10) func _on_loot_button_pressed() -> void: @@ -50,3 +51,7 @@ func pick_random_item() -> ItemData: func _on_return_button_pressed() -> void: get_tree().change_scene_to_file("res://scenes/workshop.tscn") + + +func _on_delete_pressed() -> void: + bin_inventory.empty_grid() diff --git a/inv_system/inventory.gd b/inv_system/inventory.gd index 0838438..029a0f6 100644 --- a/inv_system/inventory.gd +++ b/inv_system/inventory.gd @@ -53,6 +53,13 @@ func filled_slots() -> int: count += 1 return count +func empty_spots() -> int: + var count : int = 0 + for slot in slots: + if not slot.item: + count += 1 + return count + func empty_grid(): for slot in slots: slot.item = null diff --git a/items/gpu.tres b/items/gpu.tres index 8359e65..a375ef3 100644 --- a/items/gpu.tres +++ b/items/gpu.tres @@ -1,6 +1,6 @@ [gd_resource type="Resource" script_class="ItemData" load_steps=4 format=3 uid="uid://oc57emfpcnm0"] -[ext_resource type="StyleBox" uid="uid://dcnrpkhjhp4tk" path="res://inv_system/item_panels/rare.tres" id="1_jiyv5"] +[ext_resource type="StyleBox" uid="uid://c563rid4b4fho" path="res://inv_system/item_panels/epic.tres" id="1_jiyv5"] [ext_resource type="Texture2D" uid="uid://8qvirlis0y5t" path="res://assets/item images/gpu.png" id="1_p14l2"] [ext_resource type="Script" uid="uid://dccraom7a7e8d" path="res://inv_system/item_data.gd" id="2_jiyv5"] diff --git a/project.godot b/project.godot index 6b7de0d..ef3cee4 100644 --- a/project.godot +++ b/project.godot @@ -22,6 +22,7 @@ PlayerInventory="*res://inv_system/player_inventory.tscn" Clock="*res://time_system/clock.tscn" MouseTweaks="*res://mouseTweaks.gd" RecipeManager="*res://crafting/recipeManager.gd" +Locations="*res://scenes/manager/locations panel.tscn" [display] diff --git a/scenes/ending.gd b/scenes/ending.gd index bbae5e0..632598a 100644 --- a/scenes/ending.gd +++ b/scenes/ending.gd @@ -40,4 +40,6 @@ func _on_reset_button_pressed() -> void: PlayerInventory.botnet.clear() PlayerInventory.show() Clock.show() + Locations.show() + Locations.current_location = Locations.Location.workshop get_tree().change_scene_to_file("res://scenes/workshop.tscn") diff --git a/scenes/ewaste.tscn b/scenes/ewaste.tscn index 16ae523..97af554 100644 --- a/scenes/ewaste.tscn +++ b/scenes/ewaste.tscn @@ -1,13 +1,10 @@ -[gd_scene load_steps=6 format=3 uid="uid://dsfal3m4siap2"] +[gd_scene load_steps=5 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="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="7_xersf"] -[sub_resource type="LabelSettings" id="LabelSettings_00tp4"] -font_color = Color(1, 0, 0, 0.5764706) - [node name="ewaste" type="Control" node_paths=PackedStringArray("bin_inventory", "loot_button")] layout_mode = 3 anchors_preset = 15 @@ -38,7 +35,7 @@ layout_mode = 0 offset_left = 751.0 offset_top = 376.0 offset_right = 1027.0 -offset_bottom = 545.0 +offset_bottom = 576.0 script = ExtResource("1_6uqi0") inventory_name = "E-waste Recycling Bin" type = "Loot" @@ -98,11 +95,14 @@ layout_mode = 2 [node name="ItemSlot21" parent="BinPanel/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("7_xersf")] layout_mode = 2 -[node name="Label2" type="Label" parent="BinPanel/MarginContainer/VBoxContainer"] +[node name="HSeparator" type="HSeparator" parent="BinPanel/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "(Items left here will be destroyed)" -label_settings = SubResource("LabelSettings_00tp4") -horizontal_alignment = 1 +theme_override_constants/separation = 14 + +[node name="Delete" type="Button" parent="BinPanel/MarginContainer/VBoxContainer"] +modulate = Color(1, 0, 0, 1) +layout_mode = 2 +text = "Delete Items" [node name="LootButton" type="Button" parent="."] layout_mode = 1 @@ -121,6 +121,7 @@ text = "Loot E-waste bins! (Uses 10 time)" [node name="ReturnButton" type="Button" parent="."] +visible = false layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -135,5 +136,6 @@ grow_horizontal = 2 grow_vertical = 2 text = "Return to workshop" +[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"] diff --git a/scenes/manager/locationManager.tscn b/scenes/manager/locationManager.tscn deleted file mode 100644 index 9c56842..0000000 --- a/scenes/manager/locationManager.tscn +++ /dev/null @@ -1,9 +0,0 @@ -[gd_scene format=3 uid="uid://b5dh55o5mgima"] - -[node name="LocationManager" type="Control"] -layout_mode = 3 -anchors_preset = 15 -anchor_right = 1.0 -anchor_bottom = 1.0 -grow_horizontal = 2 -grow_vertical = 2 diff --git a/scenes/manager/location_manager.gd b/scenes/manager/location_manager.gd new file mode 100644 index 0000000..0081d18 --- /dev/null +++ b/scenes/manager/location_manager.gd @@ -0,0 +1,60 @@ +extends Control + +var block_moving = false +@export var normal_color : Color +@export var selected_color : Color +@export var ewaste_button : Button +@export var workshop_button: Button +@export var room_button : Button +var current_location : Location +@export var move_blocker_panel : PanelContainer + +enum Location{ + ewaste, + workshop, + room +} + +# Called when the node enters the scene tree for the first time. +func _ready() -> void: + hide() + current_location = Location.workshop + pass # Replace with function body. + + +# Called every frame. 'delta' is the elapsed time since the previous frame. +func _process(delta: float) -> void: + move_blocker_panel.visible = block_moving + + if current_location == Location.ewaste: + ewaste_button.self_modulate = selected_color + else: + ewaste_button.self_modulate = normal_color + + if current_location == Location.workshop: + workshop_button.self_modulate = selected_color + else: + workshop_button.self_modulate = normal_color + + if current_location == Location.room: + room_button.self_modulate = selected_color + else: + room_button.self_modulate = normal_color + +func goto_ewaste(): + 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 + current_location = Location.workshop + get_tree().change_scene_to_file("res://scenes/workshop.tscn") + +func goto_room(): + if current_location == Location.room: + return + current_location = Location.room + get_tree().change_scene_to_file("res://scenes/room.tscn") diff --git a/scenes/manager/location_manager.gd.uid b/scenes/manager/location_manager.gd.uid new file mode 100644 index 0000000..10e8370 --- /dev/null +++ b/scenes/manager/location_manager.gd.uid @@ -0,0 +1 @@ +uid://bxymsudka4nnb diff --git a/scenes/manager/locations panel.tscn b/scenes/manager/locations panel.tscn new file mode 100644 index 0000000..3215595 --- /dev/null +++ b/scenes/manager/locations panel.tscn @@ -0,0 +1,77 @@ +[gd_scene load_steps=7 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"] +[ext_resource type="Texture2D" uid="uid://bqnjkty8ofuw4" path="res://assets/icons/workshop.png" id="3_1ogtx"] +[ext_resource type="Texture2D" uid="uid://c3ti7dy7kvfml" path="res://assets/icons/home.png" id="4_5p1uq"] +[ext_resource type="StyleBox" uid="uid://12bvcki7fqij" path="res://scenes/manager/nuhuh stylebox.tres" id="5_qjxm7"] + +[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_dc45l"] +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) +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")] +z_index = 3 +layout_mode = 3 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +mouse_filter = 2 +script = ExtResource("1_o5d0c") +normal_color = Color(1, 1, 1, 1) +selected_color = Color(1, 1, 0, 1) +ewaste_button = NodePath("PanelContainer/VBoxContainer/MoveEwaste") +workshop_button = NodePath("PanelContainer/VBoxContainer/MoveWorkshop") +room_button = NodePath("PanelContainer/VBoxContainer/MoveHome") +move_blocker_panel = NodePath("Move blocker") + +[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 +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"] +layout_mode = 2 +icon = ExtResource("2_qjxm7") + +[node name="MoveWorkshop" type="Button" parent="PanelContainer/VBoxContainer"] +layout_mode = 2 +icon = ExtResource("3_1ogtx") + +[node name="MoveHome" type="Button" parent="PanelContainer/VBoxContainer"] +layout_mode = 2 +icon = ExtResource("4_5p1uq") + +[node name="Move blocker" type="PanelContainer" parent="."] +layout_mode = 0 +offset_left = 603.0 +offset_top = 165.0 +offset_right = 699.0 +offset_bottom = 409.0 +theme_override_styles/panel = ExtResource("5_qjxm7") + +[node name="Label" type="Label" parent="Move blocker"] +layout_mode = 2 +text = "Cannot move" +horizontal_alignment = 1 +autowrap_mode = 2 + +[connection signal="pressed" from="PanelContainer/VBoxContainer/MoveEwaste" to="." method="goto_ewaste"] +[connection signal="pressed" from="PanelContainer/VBoxContainer/MoveWorkshop" to="." method="goto_workshop"] +[connection signal="pressed" from="PanelContainer/VBoxContainer/MoveHome" to="." method="goto_room"] diff --git a/scenes/manager/nuhuh stylebox.tres b/scenes/manager/nuhuh stylebox.tres new file mode 100644 index 0000000..8815d7c --- /dev/null +++ b/scenes/manager/nuhuh stylebox.tres @@ -0,0 +1,13 @@ +[gd_resource type="StyleBoxFlat" format=3 uid="uid://12bvcki7fqij"] + +[resource] +content_margin_left = 0.0 +content_margin_top = 0.0 +content_margin_right = 0.0 +content_margin_bottom = 0.0 +bg_color = Color(0.27669665, 0.036602646, 0.036598563, 0.7019608) +corner_radius_top_left = 3 +corner_radius_top_right = 3 +corner_radius_bottom_right = 3 +corner_radius_bottom_left = 3 +corner_detail = 5 diff --git a/scenes/menu.gd b/scenes/menu.gd index 446b7ea..da2f67c 100644 --- a/scenes/menu.gd +++ b/scenes/menu.gd @@ -16,4 +16,6 @@ func _process(delta: float) -> void: 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") diff --git a/scenes/menu.tscn b/scenes/menu.tscn index 75a2aee..512e43c 100644 --- a/scenes/menu.tscn +++ b/scenes/menu.tscn @@ -80,7 +80,7 @@ text = "Play!" [node name="RichTextLabel3" type="RichTextLabel" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 bbcode_enabled = true -text = "[i]Credits +text = "[i]Credits[/i] [ul]Soundtrack by Kane Playtesting: Maxie, Kane, Sarantis Octodemy's Inventory Tutorial diff --git a/scenes/room.gd b/scenes/room.gd index 91a48e5..e400499 100644 --- a/scenes/room.gd +++ b/scenes/room.gd @@ -11,7 +11,7 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: - workshop_button.disabled = sell_panel.filled_slots() > 0 or botnet_panel.filled_slots() > 0 + Locations.block_moving = sell_panel.filled_slots() > 0 or botnet_panel.filled_slots() > 0 pass diff --git a/scenes/room.tscn b/scenes/room.tscn index 641408d..018d685 100644 --- a/scenes/room.tscn +++ b/scenes/room.tscn @@ -1,9 +1,10 @@ -[gd_scene load_steps=6 format=3 uid="uid://cu2yyw3f2avub"] +[gd_scene load_steps=7 format=3 uid="uid://cu2yyw3f2avub"] [ext_resource type="Script" uid="uid://cq6xhdlib6c50" path="res://scenes/room.gd" id="1_8pqrt"] [ext_resource type="Texture2D" uid="uid://crdbk8wkw63k0" path="res://assets/computer.png" id="1_om4aa"] [ext_resource type="PackedScene" uid="uid://cqqpf7fca5nk1" path="res://inv_system/sell_panel.tscn" id="3_85yof"] [ext_resource type="Script" uid="uid://bxdc7rrd22mlr" path="res://shop/meowbay.gd" id="4_jxe34"] +[ext_resource type="StyleBox" uid="uid://12bvcki7fqij" path="res://scenes/manager/nuhuh stylebox.tres" id="5_jn645"] [ext_resource type="PackedScene" uid="uid://nfd41hcidmju" path="res://inv_system/botnet/botnet_panel.tscn" id="5_jxe34"] [node name="room" type="Control" node_paths=PackedStringArray("sell_panel", "botnet_panel", "workshop_button")] @@ -31,6 +32,7 @@ texture = ExtResource("1_om4aa") expand_mode = 3 [node name="GotoWorkshop" type="Button" parent="."] +visible = false layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -52,7 +54,7 @@ offset_top = 148.0 offset_right = 1143.0 offset_bottom = 270.00018 -[node name="meowbay" type="PanelContainer" parent="." node_paths=PackedStringArray("listing_grid")] +[node name="meowbay" type="PanelContainer" parent="." node_paths=PackedStringArray("listing_grid", "block_buy")] layout_mode = 0 offset_left = 790.0 offset_top = 291.46 @@ -60,6 +62,7 @@ offset_right = 1143.0 offset_bottom = 590.4607 script = ExtResource("4_jxe34") listing_grid = NodePath("ScrollContainer/VBoxContainer/listings") +block_buy = NodePath("block_buy") [node name="ScrollContainer" type="ScrollContainer" parent="meowbay"] layout_mode = 2 @@ -79,6 +82,22 @@ layout_mode = 2 size_flags_horizontal = 3 columns = 2 +[node name="block_buy" type="MarginContainer" parent="meowbay"] +layout_mode = 2 +theme_override_constants/margin_left = 10 +theme_override_constants/margin_top = 40 +theme_override_constants/margin_right = 10 +theme_override_constants/margin_bottom = 10 + +[node name="BlockBuying" type="PanelContainer" parent="meowbay/block_buy"] +layout_mode = 2 +theme_override_styles/panel = ExtResource("5_jn645") + +[node name="Label" type="Label" parent="meowbay/block_buy/BlockBuying"] +layout_mode = 2 +text = "Cannot buy: Inventory Full!" +horizontal_alignment = 1 + [node name="BotnetPanel" parent="." instance=ExtResource("5_jxe34")] layout_mode = 0 offset_left = 523.0 diff --git a/scenes/workshop.gd b/scenes/workshop.gd index e32bf2f..f46f546 100644 --- a/scenes/workshop.gd +++ b/scenes/workshop.gd @@ -11,12 +11,13 @@ func _ready() -> void: # 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 + Locations.block_moving = crafting_inv.filled_slots() > 0 + #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: diff --git a/scenes/workshop.tscn b/scenes/workshop.tscn index c885755..b630130 100644 --- a/scenes/workshop.tscn +++ b/scenes/workshop.tscn @@ -29,6 +29,7 @@ texture = ExtResource("1_d7fqo") expand_mode = 3 [node name="GotoEwaste" type="Button" parent="."] +visible = false layout_mode = 1 anchors_preset = 8 anchor_left = 0.5 @@ -44,6 +45,7 @@ grow_vertical = 2 text = "Go to ewaste bins" [node name="GotoComputer" type="Button" parent="."] +visible = false layout_mode = 0 offset_left = 602.0 offset_top = 344.0 diff --git a/shop/meowbay.gd b/shop/meowbay.gd index 3ffe36f..92b171d 100644 --- a/shop/meowbay.gd +++ b/shop/meowbay.gd @@ -1,6 +1,7 @@ extends PanelContainer @export var listing_grid : GridContainer +@export var block_buy : Control # Called when the node enters the scene tree for the first time. func _ready() -> void: @@ -11,7 +12,7 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: - pass + block_buy.visible = PlayerInventory.inventory_panel.empty_spots() <= 0 func make_listings(): #print("building meowbay") diff --git a/time_system/clock.gd b/time_system/clock.gd index 058043d..da20885 100644 --- a/time_system/clock.gd +++ b/time_system/clock.gd @@ -39,4 +39,5 @@ func _on_next_day_pressed() -> void: get_tree().change_scene_to_file("res://scenes/ending.tscn") PlayerInventory.hide() Clock.hide() + Locations.hide() pass