From f954a04c79fe2197af1fa50c7b375c90e0c83de0 Mon Sep 17 00:00:00 2001 From: Tabby <41929769+tabby-cat-nya@users.noreply.github.com> Date: Sat, 17 Jan 2026 18:06:34 +1100 Subject: [PATCH] minor changes --- README.md | 2 ++ items/ups_item.tres | 2 +- scenes/credits.tscn | 16 +++++++++++++--- scenes/ending.gd | 16 +++++----------- scenes/ending.tscn | 17 ++++++++++++++--- scenes/menu.gd | 14 ++++++++++++++ scenes/menu.tscn | 19 ++++++++++++++++--- tooltip.gd | 4 +++- 8 files changed, 68 insertions(+), 22 deletions(-) diff --git a/README.md b/README.md index 88f159e..ed2e111 100644 --- a/README.md +++ b/README.md @@ -43,6 +43,8 @@ Submission day: Jan 19th 8AM - [x] disable loot button if no time - [x] show percentage chances for scavenging - [x] trash slto +- [x] onyl display sell value if > 0 +- [x] link menu to credits screen # Maintain motivation by setting milestones and showing progress when you reach them! 1. [x] Gettign a random assortment of loot from the ewaste bin diff --git a/items/ups_item.tres b/items/ups_item.tres index a767740..1fc251b 100644 --- a/items/ups_item.tres +++ b/items/ups_item.tres @@ -6,7 +6,7 @@ [resource] script = ExtResource("3_d6fvv") -item_name = "Uninterruptible power supply" +item_name = "Uninterruptible Power Supply" icon = ExtResource("2_pugmu") custom_panel_style = ExtResource("1_pugmu") bin_chance = 0 diff --git a/scenes/credits.tscn b/scenes/credits.tscn index 0548032..fabc250 100644 --- a/scenes/credits.tscn +++ b/scenes/credits.tscn @@ -12,23 +12,26 @@ [sub_resource type="Resource" id="Resource_7lgdl"] script = ExtResource("6_7lgdl") -item_name = "Unlimited_Gaming (Kane)" +item_name = "Unlimited_Gaming" icon = ExtResource("5_ih6pn") custom_panel_style = ExtResource("5_ooihk") +buy_value = 0 metadata/_custom_type_script = "uid://dccraom7a7e8d" [sub_resource type="Resource" id="Resource_qbfqv"] script = ExtResource("6_7lgdl") -item_name = "Maxie" +item_name = "Spacey" icon = ExtResource("8_7lgdl") custom_panel_style = ExtResource("7_ih6pn") +buy_value = 0 metadata/_custom_type_script = "uid://dccraom7a7e8d" [sub_resource type="Resource" id="Resource_x5q3x"] script = ExtResource("6_7lgdl") -item_name = "Unlimited_Gaming (Kane)" +item_name = "Unlimited_Gaming" icon = ExtResource("5_ih6pn") custom_panel_style = ExtResource("7_ih6pn") +buy_value = 0 metadata/_custom_type_script = "uid://dccraom7a7e8d" [sub_resource type="Resource" id="Resource_nmdnh"] @@ -36,6 +39,7 @@ script = ExtResource("6_7lgdl") item_name = "Spantle" icon = ExtResource("9_c6kru") custom_panel_style = ExtResource("7_ih6pn") +buy_value = 0 metadata/_custom_type_script = "uid://dccraom7a7e8d" [node name="Credits" type="Control"] @@ -182,3 +186,9 @@ text = "[center]Icons[/center][ul] [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]" fit_content = true + +[node name="MenuButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] +layout_mode = 2 +text = "Back to Menu" + +[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/MenuButton" to="." method="_on_menu_button_pressed"] diff --git a/scenes/ending.gd b/scenes/ending.gd index 632598a..6857745 100644 --- a/scenes/ending.gd +++ b/scenes/ending.gd @@ -32,14 +32,8 @@ func _process(delta: float) -> void: func _on_reset_button_pressed() -> void: - PlayerInventory.money = 0 - PlayerInventory.botnet_servers = 0 - PlayerInventory.inventory_panel.empty_grid() - Clock.days_left = 6 - Clock.time_left = 200 - 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") + get_tree().change_scene_to_file("res://scenes/menu.tscn") + + +func _on_credits_button_pressed() -> void: + get_tree().change_scene_to_file("res://scenes/credits.tscn") diff --git a/scenes/ending.tscn b/scenes/ending.tscn index 2b34617..a09cc00 100644 --- a/scenes/ending.tscn +++ b/scenes/ending.tscn @@ -84,8 +84,19 @@ bbcode_enabled = true text = "[wave][color=orchid][center]Thanks for playing :3" fit_content = true -[node name="ResetButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "Play Again" -[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/ResetButton" to="." method="_on_reset_button_pressed"] +[node name="HomeButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer"] +layout_mode = 2 +size_flags_horizontal = 3 +text = "Return to Menu" + +[node name="CreditsButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer"] +modulate = Color(1, 0.44313726, 1, 1) +layout_mode = 2 +size_flags_horizontal = 3 +text = "View Credits" + +[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/HomeButton" to="." method="_on_reset_button_pressed"] +[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/CreditsButton" to="." method="_on_credits_button_pressed"] diff --git a/scenes/menu.gd b/scenes/menu.gd index da2f67c..a0bea95 100644 --- a/scenes/menu.gd +++ b/scenes/menu.gd @@ -14,8 +14,22 @@ func _process(delta: float) -> void: func _on_play_button_pressed() -> void: + PlayerInventory.money = 0 + PlayerInventory.botnet_servers = 0 + PlayerInventory.inventory_panel.empty_grid() + Clock.days_left = 6 + Clock.time_left = 200 + 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") + + +func _on_credits_button_pressed() -> void: + get_tree().change_scene_to_file("res://scenes/credits.tscn") + + +func _on_menu_button_pressed() -> void: + get_tree().change_scene_to_file("res://scenes/menu.tscn") diff --git a/scenes/menu.tscn b/scenes/menu.tscn index 9f99652..f4e8041 100644 --- a/scenes/menu.tscn +++ b/scenes/menu.tscn @@ -66,19 +66,30 @@ fit_content = true [node name="Label" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -text = "Your goal is to build a botnet of servers so you can take over the internet with catgirls. You have 7 days to loot the ewaste before building management realises what you're up to and you have to escape" +text = "Your goal is to build a botnet of devices so you can take over the internet with catgirls. You have 7 days to loot the ewaste before building management realises what you're up to and you have to escape" horizontal_alignment = 1 autowrap_mode = 2 [node name="HSeparator" type="HSeparator" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] layout_mode = 2 -[node name="PlayButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] +[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] +layout_mode = 2 + +[node name="PlayButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer"] modulate = Color(0, 1, 0, 1) layout_mode = 2 +size_flags_horizontal = 3 text = "Play!" +[node name="CreditsButton" type="Button" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer"] +modulate = Color(1, 0.44313726, 1, 1) +layout_mode = 2 +size_flags_horizontal = 3 +text = "View Credits" + [node name="RichTextLabel3" type="RichTextLabel" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] +visible = false layout_mode = 2 bbcode_enabled = true text = "[i]Credits[/i] @@ -89,6 +100,7 @@ Item Icons: (todo)" fit_content = true [node name="HSeparator2" type="HSeparator" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] +visible = false layout_mode = 2 [node name="Label2" type="Label" parent="MarginContainer/PanelContainer/MarginContainer/VBoxContainer"] @@ -96,4 +108,5 @@ layout_mode = 2 text = "tip: you can quickly move items between inventories with Shift+Click" horizontal_alignment = 1 -[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/PlayButton" to="." method="_on_play_button_pressed"] +[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/PlayButton" to="." method="_on_play_button_pressed"] +[connection signal="pressed" from="MarginContainer/PanelContainer/MarginContainer/VBoxContainer/HBoxContainer/CreditsButton" to="." method="_on_credits_button_pressed"] diff --git a/tooltip.gd b/tooltip.gd index 01e843c..828c1d2 100644 --- a/tooltip.gd +++ b/tooltip.gd @@ -15,7 +15,9 @@ func _process(delta: float) -> void: global_position = get_global_mouse_position() + Vector2(12,-6) func show_tip(item : ItemData, extra : String = ""): - tooltip_label.text = item.item_name + "\nSell Value: $"+str(floori(item.buy_value/float(2))) + tooltip_label.text = item.item_name + if item.buy_value > 0: + 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 extra != "":