diff --git a/assets/blankIcon.png b/assets/blankIcon.png new file mode 100644 index 0000000..34b0522 Binary files /dev/null and b/assets/blankIcon.png differ diff --git a/assets/blankIcon.png.import b/assets/blankIcon.png.import new file mode 100644 index 0000000..7f2feca --- /dev/null +++ b/assets/blankIcon.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://bbu7dofi4u038" +path="res://.godot/imported/blankIcon.png-8fc835676acf830316155cd070dc4a11.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/blankIcon.png" +dest_files=["res://.godot/imported/blankIcon.png-8fc835676acf830316155cd070dc4a11.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/assets/sellIcon.png b/assets/sellIcon.png new file mode 100644 index 0000000..0a524a4 Binary files /dev/null and b/assets/sellIcon.png differ diff --git a/assets/sellIcon.png.import b/assets/sellIcon.png.import new file mode 100644 index 0000000..f48f202 --- /dev/null +++ b/assets/sellIcon.png.import @@ -0,0 +1,40 @@ +[remap] + +importer="texture" +type="CompressedTexture2D" +uid="uid://dokuqh6jq4eti" +path="res://.godot/imported/sellIcon.png-bbb1034de3ddd6ea52c144d6369cc78c.ctex" +metadata={ +"vram_texture": false +} + +[deps] + +source_file="res://assets/sellIcon.png" +dest_files=["res://.godot/imported/sellIcon.png-bbb1034de3ddd6ea52c144d6369cc78c.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/crafts/computer_craft.tres b/crafting/crafts/a1computer_craft.tres similarity index 100% rename from crafting/crafts/computer_craft.tres rename to crafting/crafts/a1computer_craft.tres diff --git a/crafting/crafts/laptop_craft.tres b/crafting/crafts/a2laptop_craft.tres similarity index 100% rename from crafting/crafts/laptop_craft.tres rename to crafting/crafts/a2laptop_craft.tres diff --git a/crafting/crafts/gaming_pc_craft.tres b/crafting/crafts/a3gaming_pc_craft.tres similarity index 100% rename from crafting/crafts/gaming_pc_craft.tres rename to crafting/crafts/a3gaming_pc_craft.tres diff --git a/crafting/crafts/server.tres b/crafting/crafts/a4server.tres similarity index 100% rename from crafting/crafts/server.tres rename to crafting/crafts/a4server.tres diff --git a/crafting/crafts/battery_craft.tres b/crafting/crafts/b1battery_craft.tres similarity index 100% rename from crafting/crafts/battery_craft.tres rename to crafting/crafts/b1battery_craft.tres diff --git a/crafting/crafts/large_psu_craft.tres b/crafting/crafts/b2large_psu_craft.tres similarity index 100% rename from crafting/crafts/large_psu_craft.tres rename to crafting/crafts/b2large_psu_craft.tres diff --git a/crafting/crafts/sdd_craft.tres b/crafting/crafts/b3sdd_craft.tres similarity index 100% rename from crafting/crafts/sdd_craft.tres rename to crafting/crafts/b3sdd_craft.tres diff --git a/crafting/crafts/nas_craft.tres b/crafting/crafts/c1nas_craft.tres similarity index 100% rename from crafting/crafts/nas_craft.tres rename to crafting/crafts/c1nas_craft.tres diff --git a/crafting/crafts/ups_craft.tres b/crafting/crafts/c2ups_craft.tres similarity index 100% rename from crafting/crafts/ups_craft.tres rename to crafting/crafts/c2ups_craft.tres diff --git a/demo_scene.gd b/demo_scene.gd index 3071c04..d88e98e 100644 --- a/demo_scene.gd +++ b/demo_scene.gd @@ -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) diff --git a/inv_system/botnet/botnet_panel.tscn b/inv_system/botnet/botnet_panel.tscn index cc95883..075c0ec 100644 --- a/inv_system/botnet/botnet_panel.tscn +++ b/inv_system/botnet/botnet_panel.tscn @@ -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 diff --git a/inv_system/item_data.gd b/inv_system/item_data.gd index cdc9601..d79da92 100644 --- a/inv_system/item_data.gd +++ b/inv_system/item_data.gd @@ -10,3 +10,5 @@ class_name ItemData @export var botnet_power : int = 0 @export var can_buy : bool = false @export var description : String = "" +@export var rarity : String = "" +@export var sell_icon : bool = false diff --git a/inv_system/item_slot.gd b/inv_system/item_slot.gd index 77eea5c..41edfda 100644 --- a/inv_system/item_slot.gd +++ b/inv_system/item_slot.gd @@ -4,6 +4,8 @@ class_name ItemSlot @export var icon : TextureRect @export var item: ItemData @export var label : Label +@export var botnet_icon : Control +@export var sell_icon : Control var type : String var block_taking : bool = false const DEFAULT = preload("uid://hgjmkwj0dbqr") @@ -17,6 +19,8 @@ func update_ui(): if not item: icon.texture = null label.text = "" + sell_icon.visible = false + botnet_icon.visible = false add_theme_stylebox_override("panel",DEFAULT) return @@ -28,6 +32,8 @@ func update_ui(): icon.texture = item.icon #tooltip_text = item.item_name label.text = item.value + botnet_icon.visible = item.botnet_power > 0 + sell_icon.visible = item.sell_icon diff --git a/inv_system/item_slot.tscn b/inv_system/item_slot.tscn index dc4d714..96c0497 100644 --- a/inv_system/item_slot.tscn +++ b/inv_system/item_slot.tscn @@ -1,19 +1,23 @@ -[gd_scene load_steps=5 format=3 uid="uid://dgqs20xf7l8c"] +[gd_scene load_steps=7 format=3 uid="uid://dgqs20xf7l8c"] [ext_resource type="Script" uid="uid://cpd04flfh5nlc" path="res://inv_system/item_slot.gd" id="1_m11ft"] [ext_resource type="StyleBox" uid="uid://hgjmkwj0dbqr" path="res://inv_system/item_panels/default.tres" id="1_mkcpq"] [ext_resource type="Texture2D" uid="uid://b7jp850fqpa0j" path="res://icon.svg" id="3_0tnt0"] +[ext_resource type="Texture2D" uid="uid://bbu7dofi4u038" path="res://assets/blankIcon.png" id="4_0tnt0"] +[ext_resource type="Texture2D" uid="uid://dokuqh6jq4eti" path="res://assets/sellIcon.png" id="5_eh2fu"] [sub_resource type="LabelSettings" id="LabelSettings_ab1u2"] outline_size = 5 outline_color = Color(0, 0, 0, 1) -[node name="ItemSlot" type="Panel" node_paths=PackedStringArray("icon", "label")] +[node name="ItemSlot" type="Panel" node_paths=PackedStringArray("icon", "label", "botnet_icon", "sell_icon")] custom_minimum_size = Vector2(50, 50) theme_override_styles/panel = ExtResource("1_mkcpq") script = ExtResource("1_m11ft") icon = NodePath("Icon") label = NodePath("Icon/Label") +botnet_icon = NodePath("icons/botnet_power") +sell_icon = NodePath("icons/sell_only") [node name="Icon" type="TextureRect" parent="."] layout_mode = 1 @@ -46,5 +50,31 @@ text = "120 GB" label_settings = SubResource("LabelSettings_ab1u2") horizontal_alignment = 2 +[node name="icons" type="HBoxContainer" parent="."] +layout_mode = 1 +anchors_preset = 1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -24.0 +offset_bottom = 10.0 +grow_horizontal = 0 +alignment = 2 + +[node name="botnet_power" type="TextureRect" parent="icons"] +texture_filter = 1 +custom_minimum_size = Vector2(16, 16) +layout_mode = 2 +texture = ExtResource("4_0tnt0") +expand_mode = 1 +stretch_mode = 4 + +[node name="sell_only" type="TextureRect" parent="icons"] +texture_filter = 1 +custom_minimum_size = Vector2(16, 16) +layout_mode = 2 +texture = ExtResource("5_eh2fu") +expand_mode = 1 +stretch_mode = 4 + [connection signal="mouse_entered" from="." to="." method="_on_mouse_entered"] [connection signal="mouse_exited" from="." to="." method="_on_mouse_exited"] diff --git a/inv_system/player_inventory.tscn b/inv_system/player_inventory.tscn index 18fc9fc..8c54898 100644 --- a/inv_system/player_inventory.tscn +++ b/inv_system/player_inventory.tscn @@ -383,7 +383,8 @@ self_modulate = Color(1, 0, 0.23137255, 0.6039216) layout_mode = 0 offset_left = 207.0 offset_right = 363.0 -offset_bottom = 112.0 +offset_bottom = 141.0 +mouse_filter = 2 texture = ExtResource("8_icm48") expand_mode = 1 @@ -392,7 +393,7 @@ layout_mode = 0 offset_left = 39.0 offset_top = 10.0 offset_right = 144.0 -offset_bottom = 99.0 +offset_bottom = 129.0 text = "View your salvaging recipes here" horizontal_alignment = 1 vertical_alignment = 1 diff --git a/items/battery.tres b/items/battery.tres index d3d50b0..beb135a 100644 --- a/items/battery.tres +++ b/items/battery.tres @@ -10,4 +10,5 @@ icon = ExtResource("1_i7fpe") bin_chance = 2 buy_value = 50 can_buy = true +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/broken_laptop.tres b/items/broken_laptop.tres index 77efce9..7f90690 100644 --- a/items/broken_laptop.tres +++ b/items/broken_laptop.tres @@ -11,4 +11,5 @@ icon = ExtResource("1_k071h") custom_panel_style = ExtResource("1_8brb6") bin_chance = 7 buy_value = 2 +rarity = "Broken" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/computer.tres b/items/computer.tres index f6accf6..eb1cb07 100644 --- a/items/computer.tres +++ b/items/computer.tres @@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_x7wm3") bin_chance = 0 buy_value = 500 botnet_power = 2 +rarity = "Rare" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/cpu.tres b/items/cpu.tres index b37a77d..641a89e 100644 --- a/items/cpu.tres +++ b/items/cpu.tres @@ -9,4 +9,5 @@ item_name = "CPU" icon = ExtResource("1_mh86d") buy_value = 80 can_buy = true +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/disc_item.tres b/items/disc_item.tres index c9feb9d..5dc3b02 100644 --- a/items/disc_item.tres +++ b/items/disc_item.tres @@ -11,4 +11,6 @@ icon = ExtResource("2_v2wmo") custom_panel_style = ExtResource("1_lhfs3") bin_chance = 0 buy_value = 600 +rarity = "Epic" +sell_icon = true metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/dvd_drive.tres b/items/dvd_drive.tres index bb27293..ae97e4e 100644 --- a/items/dvd_drive.tres +++ b/items/dvd_drive.tres @@ -9,4 +9,5 @@ item_name = "Optical Drive" icon = ExtResource("1_kdwp1") buy_value = 35 can_buy = true +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/gaming_computer.tres b/items/gaming_computer.tres index df48ab7..4427f4a 100644 --- a/items/gaming_computer.tres +++ b/items/gaming_computer.tres @@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_j1gmi") bin_chance = 0 buy_value = 1500 botnet_power = 4 +rarity = "Epic" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/gpu.tres b/items/gpu.tres index a375ef3..6b4aef7 100644 --- a/items/gpu.tres +++ b/items/gpu.tres @@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_jiyv5") bin_chance = 3 buy_value = 500 can_buy = true +rarity = "Epic" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/hdd_item.tres b/items/hdd_item.tres index df3bb1f..d013b7b 100644 --- a/items/hdd_item.tres +++ b/items/hdd_item.tres @@ -9,4 +9,5 @@ item_name = "Hard Disk Drive" icon = ExtResource("1_8xwf0") buy_value = 60 can_buy = true +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/laptop.tres b/items/laptop.tres index 46aabbb..70c7294 100644 --- a/items/laptop.tres +++ b/items/laptop.tres @@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_xyf87") bin_chance = 0 buy_value = 850 botnet_power = 3 +rarity = "Rare" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/large_psu_item.tres b/items/large_psu_item.tres index ecba18e..1a38176 100644 --- a/items/large_psu_item.tres +++ b/items/large_psu_item.tres @@ -9,4 +9,5 @@ item_name = "Large Power Supply Unit" icon = ExtResource("1_rjw1c") buy_value = 80 can_buy = true +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/nas_item.tres b/items/nas_item.tres index 8cf1926..49262ef 100644 --- a/items/nas_item.tres +++ b/items/nas_item.tres @@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_wtpx3") bin_chance = 0 buy_value = 600 botnet_power = 2 +rarity = "Rare" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/plastic.tres b/items/plastic.tres index dea3a82..3eefc21 100644 --- a/items/plastic.tres +++ b/items/plastic.tres @@ -8,4 +8,5 @@ script = ExtResource("2_31pxd") item_name = "Plastic Scrap" icon = ExtResource("1_2haha") can_buy = true +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/plastic_block.tres b/items/plastic_block.tres index 705419a..d031029 100644 --- a/items/plastic_block.tres +++ b/items/plastic_block.tres @@ -11,4 +11,5 @@ icon = ExtResource("1_ad3tn") custom_panel_style = ExtResource("1_ecsjn") bin_chance = 0 buy_value = 60 +rarity = "Uncommon" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/power_cell.tres b/items/power_cell.tres index 6d7d031..2baa1bf 100644 --- a/items/power_cell.tres +++ b/items/power_cell.tres @@ -7,4 +7,5 @@ script = ExtResource("2_4u113") item_name = "Power Cell" icon = ExtResource("1_lh7dq") +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/ram_item.tres b/items/ram_item.tres index 3e28325..c293056 100644 --- a/items/ram_item.tres +++ b/items/ram_item.tres @@ -9,4 +9,5 @@ item_name = "Ram Stick" icon = ExtResource("1_bfuag") buy_value = 80 can_buy = true +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/server.tres b/items/server.tres index d26fb20..705ffd3 100644 --- a/items/server.tres +++ b/items/server.tres @@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_70din") bin_chance = 0 buy_value = 3000 botnet_power = 11 +rarity = "Legendary" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/small_psu_item.tres b/items/small_psu_item.tres index 5a31bd5..a339387 100644 --- a/items/small_psu_item.tres +++ b/items/small_psu_item.tres @@ -9,4 +9,5 @@ item_name = "Small Power Supply Unit" icon = ExtResource("1_62foo") buy_value = 20 can_buy = true +rarity = "Common" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/ssd_item.tres b/items/ssd_item.tres index fc3d4ff..eb4eb28 100644 --- a/items/ssd_item.tres +++ b/items/ssd_item.tres @@ -12,4 +12,5 @@ custom_panel_style = ExtResource("1_kwg8r") bin_chance = 3 buy_value = 140 can_buy = true +rarity = "Rare" metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/items/ups_item.tres b/items/ups_item.tres index 1fc251b..ee47d2f 100644 --- a/items/ups_item.tres +++ b/items/ups_item.tres @@ -11,4 +11,6 @@ icon = ExtResource("2_pugmu") custom_panel_style = ExtResource("1_pugmu") bin_chance = 0 buy_value = 400 +rarity = "Rare" +sell_icon = true metadata/_custom_type_script = "uid://dccraom7a7e8d" diff --git a/scenes/credits.tscn b/scenes/credits.tscn index 42124b0..30e2c08 100644 --- a/scenes/credits.tscn +++ b/scenes/credits.tscn @@ -394,4 +394,5 @@ fit_content = true layout_mode = 2 text = "Back to Menu" +[connection signal="meta_clicked" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/ScrollContainer/VBoxContainer/other" to="." method="_on_other_meta_clicked"] [connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/MenuButton" to="." method="_on_menu_button_pressed"] diff --git a/scenes/ewaste.tscn b/scenes/ewaste.tscn index fe257bd..d414eb8 100644 --- a/scenes/ewaste.tscn +++ b/scenes/ewaste.tscn @@ -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"] diff --git a/scenes/manager/locations panel.tscn b/scenes/manager/locations panel.tscn index dd5d8f1..c7cc53d 100644 --- a/scenes/manager/locations panel.tscn +++ b/scenes/manager/locations panel.tscn @@ -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"] diff --git a/scenes/menu.gd b/scenes/menu.gd index ed0a044..985d255 100644 --- a/scenes/menu.gd +++ b/scenes/menu.gd @@ -34,3 +34,7 @@ func _on_credits_button_pressed() -> void: func _on_menu_button_pressed() -> void: get_tree().change_scene_to_file("res://scenes/menu.tscn") + + +func _on_other_meta_clicked(meta: Variant) -> void: + OS.shell_open(str(meta)) diff --git a/scenes/workshop.gd b/scenes/workshop.gd index bae5b14..50d930b 100644 --- a/scenes/workshop.gd +++ b/scenes/workshop.gd @@ -12,8 +12,8 @@ func _ready() -> void: # Called every frame. 'delta' is the elapsed time since the previous frame. func _process(delta: float) -> void: - Locations.block_moving = crafting_inv.filled_slots() > 0 - Locations.block_moving = trash_inv.filled_slots() > 0 + Locations.block_moving = crafting_inv.filled_slots() > 0 or trash_inv.filled_slots() > 0 + #if crafting_inv.filled_slots() > 0: #ewaste_button.disabled = true #computer_button.disabled = true diff --git a/tooltip.gd b/tooltip.gd index f02b16d..3907e47 100644 --- a/tooltip.gd +++ b/tooltip.gd @@ -3,6 +3,8 @@ extends PanelContainer @export var tooltip_label : RichTextLabel @export var exdata_box : VBoxContainer @export var exdata_label : Label +@export var rarity_label : Label +@export var rarity_colors : Dictionary[String,Color] # Called when the node enters the scene tree for the first time. func _ready() -> void: @@ -22,6 +24,13 @@ func show_tip(item : ItemData, extra : String = ""): tooltip_label.text += "\nSell Value: $"+str(floori(item.buy_value/float(2))) if item.botnet_power > 0: tooltip_label.text += "\n[color=orchid]Botnet Power: " + str(item.botnet_power) +"[/color]" + if item.rarity != "": + rarity_label.show() + rarity_label.text = item.rarity + if rarity_colors.has(item.rarity): + rarity_label.self_modulate = rarity_colors.get(item.rarity) + else: + rarity_label.hide() if extra != "": exdata_box.show() exdata_label.text = extra diff --git a/tooltip.tscn b/tooltip.tscn index 81c277e..b8244fd 100644 --- a/tooltip.tscn +++ b/tooltip.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=3 format=3 uid="uid://sb2wq874p37j"] +[gd_scene load_steps=6 format=3 uid="uid://sb2wq874p37j"] [ext_resource type="Script" uid="uid://cbta38dhunndc" path="res://tooltip.gd" id="1_gwequ"] @@ -17,7 +17,16 @@ corner_radius_top_right = 3 corner_radius_bottom_right = 3 corner_radius_bottom_left = 3 -[node name="Tooltip" type="PanelContainer" node_paths=PackedStringArray("tooltip_label", "exdata_box", "exdata_label")] +[sub_resource type="StyleBoxEmpty" id="StyleBoxEmpty_gwequ"] +content_margin_right = 5.0 + +[sub_resource type="FontVariation" id="FontVariation_gwequ"] +variation_transform = Transform2D(1, 0.35, 0, 1, 0, 0) + +[sub_resource type="LabelSettings" id="LabelSettings_oxk8h"] +font = SubResource("FontVariation_gwequ") + +[node name="Tooltip" type="PanelContainer" node_paths=PackedStringArray("tooltip_label", "exdata_box", "exdata_label", "rarity_label")] z_index = 7 offset_right = 95.0 offset_bottom = 31.0 @@ -29,6 +38,14 @@ script = ExtResource("1_gwequ") tooltip_label = NodePath("VBoxContainer/Label") exdata_box = NodePath("VBoxContainer/Extradata") exdata_label = NodePath("VBoxContainer/Extradata/Label") +rarity_label = NodePath("VBoxContainer/rarity") +rarity_colors = Dictionary[String, Color]({ +"Common": Color(1, 1, 1, 1), +"Epic": Color(0.8087111, 0.40824994, 0.9999972, 1), +"Legendary": Color(1, 0.7529412, 0, 1), +"Rare": Color(0.38142374, 0.9132181, 0.9999998, 1), +"Uncommon": Color(0.59956974, 1, 0.59689647, 1) +}) [node name="VBoxContainer" type="VBoxContainer" parent="."] layout_mode = 2 @@ -52,3 +69,10 @@ layout_mode = 2 [node name="Label" type="Label" parent="VBoxContainer/Extradata"] layout_mode = 2 text = "Extra data does here" + +[node name="rarity" type="Label" parent="VBoxContainer"] +layout_mode = 2 +theme_override_styles/normal = SubResource("StyleBoxEmpty_gwequ") +text = "fdsfdsf" +label_settings = SubResource("LabelSettings_oxk8h") +horizontal_alignment = 2