From 7e5603927ee09e96771ac4547836b4b04191ef6a Mon Sep 17 00:00:00 2001 From: Tabby <41929769+tabby-cat-nya@users.noreply.github.com> Date: Fri, 23 Jan 2026 15:38:28 +1100 Subject: [PATCH 1/2] accumulation test --- inv_system/player_inventory.tscn | 19 +++++++++++++++++-- inv_system/sell_panel.gd | 6 +++--- inv_system/sell_panel.tscn | 2 +- scenes/menu.gd | 2 +- scenes/room.tscn | 1 + time_system/clock.gd | 20 +++++++++++++++++++- time_system/clock.tscn | 29 +++++++++++++++++++++++------ 7 files changed, 65 insertions(+), 14 deletions(-) diff --git a/inv_system/player_inventory.tscn b/inv_system/player_inventory.tscn index 193ef20..18fc9fc 100644 --- a/inv_system/player_inventory.tscn +++ b/inv_system/player_inventory.tscn @@ -125,9 +125,9 @@ anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 offset_left = 241.0 -offset_top = 154.0 +offset_top = 111.0 offset_right = -635.0 -offset_bottom = -136.0 +offset_bottom = -126.0 grow_horizontal = 2 grow_vertical = 2 script = ExtResource("2_hk4hx") @@ -249,6 +249,21 @@ layout_mode = 2 [node name="ItemSlot30" parent="Inventory/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("3_8qgtd")] layout_mode = 2 +[node name="ItemSlot31" parent="Inventory/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("3_8qgtd")] +layout_mode = 2 + +[node name="ItemSlot32" parent="Inventory/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("3_8qgtd")] +layout_mode = 2 + +[node name="ItemSlot33" parent="Inventory/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("3_8qgtd")] +layout_mode = 2 + +[node name="ItemSlot34" parent="Inventory/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("3_8qgtd")] +layout_mode = 2 + +[node name="ItemSlot35" parent="Inventory/MarginContainer/VBoxContainer/ScrollContainer/GridContainer" instance=ExtResource("3_8qgtd")] +layout_mode = 2 + [node name="TabContainer" type="TabContainer" parent="."] layout_mode = 0 offset_left = 1.0 diff --git a/inv_system/sell_panel.gd b/inv_system/sell_panel.gd index ac3ff8e..99808bb 100644 --- a/inv_system/sell_panel.gd +++ b/inv_system/sell_panel.gd @@ -29,16 +29,16 @@ func calculate_sell_value(): else: sell_label.text = "Place an item" sell_button.disabled = true - if not Clock.has_time(15): + if not Clock.has_time(10): sell_button.disabled = true func _on_sell_button_pressed() -> void: - if slots[0].item and Clock.has_time(15): + if slots[0].item and Clock.has_time(10): var sell_value : int = floori(slots[0].item.buy_value / float(2)) slots[0].item = null slots[0].update_ui() PlayerInventory.money += sell_value - Clock.use_time(15) + Clock.use_time(10) calculate_sell_value() diff --git a/inv_system/sell_panel.tscn b/inv_system/sell_panel.tscn index 785b84d..b8c18a4 100644 --- a/inv_system/sell_panel.tscn +++ b/inv_system/sell_panel.tscn @@ -55,6 +55,6 @@ text = "1234" [node name="SellButton" type="Button" parent="MarginContainer/VBoxContainer"] layout_mode = 2 -text = "Sell! (Uses 15 time)" +text = "Sell! (Uses 10 time)" [connection signal="pressed" from="MarginContainer/VBoxContainer/SellButton" to="." method="_on_sell_button_pressed"] diff --git a/scenes/menu.gd b/scenes/menu.gd index 6828e5a..ed0a044 100644 --- a/scenes/menu.gd +++ b/scenes/menu.gd @@ -23,7 +23,7 @@ func _on_play_button_pressed() -> void: PlayerInventory.show() Clock.show() Locations.show() - Locations.goto_workshop() + Locations.goto_ewaste() #Locations.current_location = Locations.Location.workshop #get_tree().change_scene_to_file("res://scenes/workshop.tscn") diff --git a/scenes/room.tscn b/scenes/room.tscn index 018d685..d88c49a 100644 --- a/scenes/room.tscn +++ b/scenes/room.tscn @@ -99,6 +99,7 @@ text = "Cannot buy: Inventory Full!" horizontal_alignment = 1 [node name="BotnetPanel" parent="." instance=ExtResource("5_jxe34")] +visible = false layout_mode = 0 offset_left = 523.0 offset_top = 434.0 diff --git a/time_system/clock.gd b/time_system/clock.gd index b52201f..67758fb 100644 --- a/time_system/clock.gd +++ b/time_system/clock.gd @@ -18,6 +18,8 @@ var ending_text : String var power_vis : float = 0 +@export var accumlate_labebl :Label + # Called when the node enters the scene tree for the first time. func _ready() -> void: pass # Replace with function body. @@ -29,7 +31,7 @@ func _process(delta: float) -> void: timer_text.text = str(time_left) days_text.text = str(days_left) next_button.disabled = time_left > 10 - if days_left == 0: + if days_left <= 0: next_button.text = "End Game" else: next_button.text = "Proceed to next day ->" @@ -48,10 +50,15 @@ func use_time(time : float): func _on_next_day_pressed() -> void: + if days_left >= 1: + accumulate_botnet() days_left -= 1 time_left = 200 new_day.emit() + elif days_left == 0: + accumulate_botnet() + days_left = -1 else: get_tree().change_scene_to_file("res://scenes/ending.tscn") PlayerInventory.hide() @@ -59,7 +66,18 @@ func _on_next_day_pressed() -> void: Locations.hide() pass +func accumulate_botnet(): + for slot in PlayerInventory.inventory_panel.slots: + if slot.item: + PlayerInventory.botnet_servers += slot.item.botnet_power + func update_power(): + var active_power : int = 0 + for slot in PlayerInventory.inventory_panel.slots: + if slot.item: + active_power += slot.item.botnet_power + accumlate_labebl.text = "+" + str(active_power) + " next day" + var current_level : HackLevel var next_level : HackLevel for x in range(levels.size()): diff --git a/time_system/clock.tscn b/time_system/clock.tscn index 0f2b6c9..70a6b87 100644 --- a/time_system/clock.tscn +++ b/time_system/clock.tscn @@ -1,4 +1,4 @@ -[gd_scene load_steps=15 format=3 uid="uid://dpa3yvdrddtsh"] +[gd_scene load_steps=16 format=3 uid="uid://dpa3yvdrddtsh"] [ext_resource type="Texture2D" uid="uid://cvsibrbtuqfww" path="res://assets/ready_time.png" id="1_chnjs"] [ext_resource type="Script" uid="uid://c4y7w10si2q2p" path="res://time_system/clock.gd" id="1_m6rn1"] @@ -18,7 +18,7 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="Resource" id="Resource_m763i"] script = ExtResource("2_hjq5n") name = "UTS" -power = 10 +power = 50 color = Color(0.36701235, 0.9999997, 0.3376366, 1) ending_text = "You hack into the UTS administration servers and completely cancel the OSI saving thousands of classes, hundres of staff jobs and many key degrees!" metadata/_custom_type_script = "uid://md6s5hsjvnxc" @@ -26,7 +26,7 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="Resource" id="Resource_nhhwl"] script = ExtResource("2_hjq5n") name = "Microsoft" -power = 20 +power = 125 color = Color(0.36862746, 1, 1, 1) ending_text = "Your sizable botnet quickly cuts through the defenses of the Microsoft servers eliminating Copilot and stealing their source code so you can run any Windows program on linux " metadata/_custom_type_script = "uid://md6s5hsjvnxc" @@ -34,7 +34,7 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="Resource" id="Resource_023ps"] script = ExtResource("2_hjq5n") name = "X" -power = 40 +power = 200 color = Color(0.70184636, 0.4491853, 1, 1) ending_text = "You point your powerful botnet towards X (the everything app) and eviscerate the platform along with grok and elon musk, reducing them both to ashes" metadata/_custom_type_script = "uid://md6s5hsjvnxc" @@ -42,7 +42,7 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="Resource" id="Resource_cb2q0"] script = ExtResource("2_hjq5n") name = "US Goverment" -power = 65 +power = 300 color = Color(0.96814066, 0.8503548, 0, 1) ending_text = "With your mighty botnet you break into the US goverment servers and release every secret file aswell as reverse every transphobic, homophobic or otherwise bad law. Finally you turn all the White House automated defenses against Trump" metadata/_custom_type_script = "uid://md6s5hsjvnxc" @@ -50,7 +50,11 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="LabelSettings" id="LabelSettings_r3ygl"] font_size = 32 -[node name="Clock" type="Control" node_paths=PackedStringArray("bar", "timer_text", "days_text", "next_button", "current_target_label", "power_bar", "next_target_label")] +[sub_resource type="LabelSettings" id="LabelSettings_hjq5n"] +outline_size = 6 +outline_color = Color(0, 0, 0, 1) + +[node name="Clock" type="Control" node_paths=PackedStringArray("bar", "timer_text", "days_text", "next_button", "current_target_label", "power_bar", "next_target_label", "accumlate_labebl")] z_index = 2 layout_mode = 3 anchors_preset = 15 @@ -68,6 +72,7 @@ current_target_label = NodePath("PanelContainer/HBoxContainer/Hacking/Current Ta power_bar = NodePath("PanelContainer/HBoxContainer/Hacking/Power Bar") next_target_label = NodePath("PanelContainer/HBoxContainer/Hacking/Next Target") levels = Array[ExtResource("2_hjq5n")]([SubResource("Resource_hjq5n"), SubResource("Resource_m763i"), SubResource("Resource_nhhwl"), SubResource("Resource_023ps"), SubResource("Resource_cb2q0")]) +accumlate_labebl = NodePath("PanelContainer/HBoxContainer/Hacking/Power Bar/next day") [node name="PanelContainer" type="PanelContainer" parent="."] layout_mode = 1 @@ -166,6 +171,18 @@ texture_under = ExtResource("5_idmoy") texture_over = ExtResource("6_hjq5n") texture_progress = ExtResource("7_m763i") +[node name="next day" type="Label" parent="PanelContainer/HBoxContainer/Hacking/Power Bar"] +layout_mode = 1 +anchors_preset = 15 +anchor_right = 1.0 +anchor_bottom = 1.0 +grow_horizontal = 2 +grow_vertical = 2 +text = "+123 next day" +label_settings = SubResource("LabelSettings_hjq5n") +horizontal_alignment = 1 +vertical_alignment = 1 + [node name="Next Target" type="Label" parent="PanelContainer/HBoxContainer/Hacking"] layout_mode = 2 text = "10 Power to next target" From ed17ffec4ebb8666b7b8ad7ef3ad69cd57eda0ee Mon Sep 17 00:00:00 2001 From: Tabby <41929769+tabby-cat-nya@users.noreply.github.com> Date: Fri, 23 Jan 2026 17:34:30 +1100 Subject: [PATCH 2/2] goal changes --- time_system/clock.tscn | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/time_system/clock.tscn b/time_system/clock.tscn index 70a6b87..e823ad9 100644 --- a/time_system/clock.tscn +++ b/time_system/clock.tscn @@ -18,7 +18,7 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="Resource" id="Resource_m763i"] script = ExtResource("2_hjq5n") name = "UTS" -power = 50 +power = 40 color = Color(0.36701235, 0.9999997, 0.3376366, 1) ending_text = "You hack into the UTS administration servers and completely cancel the OSI saving thousands of classes, hundres of staff jobs and many key degrees!" metadata/_custom_type_script = "uid://md6s5hsjvnxc" @@ -26,7 +26,7 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="Resource" id="Resource_nhhwl"] script = ExtResource("2_hjq5n") name = "Microsoft" -power = 125 +power = 90 color = Color(0.36862746, 1, 1, 1) ending_text = "Your sizable botnet quickly cuts through the defenses of the Microsoft servers eliminating Copilot and stealing their source code so you can run any Windows program on linux " metadata/_custom_type_script = "uid://md6s5hsjvnxc" @@ -34,7 +34,7 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="Resource" id="Resource_023ps"] script = ExtResource("2_hjq5n") name = "X" -power = 200 +power = 150 color = Color(0.70184636, 0.4491853, 1, 1) ending_text = "You point your powerful botnet towards X (the everything app) and eviscerate the platform along with grok and elon musk, reducing them both to ashes" metadata/_custom_type_script = "uid://md6s5hsjvnxc" @@ -42,7 +42,7 @@ metadata/_custom_type_script = "uid://md6s5hsjvnxc" [sub_resource type="Resource" id="Resource_cb2q0"] script = ExtResource("2_hjq5n") name = "US Goverment" -power = 300 +power = 220 color = Color(0.96814066, 0.8503548, 0, 1) ending_text = "With your mighty botnet you break into the US goverment servers and release every secret file aswell as reverse every transphobic, homophobic or otherwise bad law. Finally you turn all the White House automated defenses against Trump" metadata/_custom_type_script = "uid://md6s5hsjvnxc"