feature complete prototype almost done!
This commit is contained in:
parent
93cc1a8c59
commit
af8662fd6a
21 changed files with 327 additions and 41 deletions
BIN
assets/item images/nas.png
Normal file
BIN
assets/item images/nas.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 207 KiB |
40
assets/item images/nas.png.import
Normal file
40
assets/item images/nas.png.import
Normal file
|
|
@ -0,0 +1,40 @@
|
||||||
|
[remap]
|
||||||
|
|
||||||
|
importer="texture"
|
||||||
|
type="CompressedTexture2D"
|
||||||
|
uid="uid://m68k8dqmcrfr"
|
||||||
|
path="res://.godot/imported/nas.png-c33eef426f0f6b83ab9f75c1e715898c.ctex"
|
||||||
|
metadata={
|
||||||
|
"vram_texture": false
|
||||||
|
}
|
||||||
|
|
||||||
|
[deps]
|
||||||
|
|
||||||
|
source_file="res://assets/item images/nas.png"
|
||||||
|
dest_files=["res://.godot/imported/nas.png-c33eef426f0f6b83ab9f75c1e715898c.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
|
||||||
12
crafting/crafts/nas_craft.tres
Normal file
12
crafting/crafts/nas_craft.tres
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[gd_resource type="Resource" script_class="CraftRecipe" load_steps=5 format=3 uid="uid://cb5qc8xwuao6q"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dccraom7a7e8d" path="res://inv_system/item_data.gd" id="1_lnsys"]
|
||||||
|
[ext_resource type="Resource" uid="uid://bepkdyf7dn1y0" path="res://items/hdd_item.tres" id="2_lnsys"]
|
||||||
|
[ext_resource type="Resource" uid="uid://3afonee3dw7" path="res://items/nas_item.tres" id="3_yoruj"]
|
||||||
|
[ext_resource type="Script" uid="uid://b4iu5xrdf0evs" path="res://crafting/craft_recipe.gd" id="4_6gc0q"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("4_6gc0q")
|
||||||
|
ingredients = Array[ExtResource("1_lnsys")]([ExtResource("2_lnsys"), ExtResource("2_lnsys"), ExtResource("2_lnsys"), ExtResource("2_lnsys"), ExtResource("2_lnsys"), null, null, null, null])
|
||||||
|
output = ExtResource("3_yoruj")
|
||||||
|
metadata/_custom_type_script = "uid://b4iu5xrdf0evs"
|
||||||
12
crafting/crafts/pastic_block_craft.tres
Normal file
12
crafting/crafts/pastic_block_craft.tres
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
[gd_resource type="Resource" script_class="CraftRecipe" load_steps=5 format=3 uid="uid://betkb8vbukp8g"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://dccraom7a7e8d" path="res://inv_system/item_data.gd" id="1_ex3qq"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cnr1k8seffsxb" path="res://items/plastic.tres" id="2_ex3qq"]
|
||||||
|
[ext_resource type="Resource" uid="uid://u5u51q8erbkf" path="res://items/plastic_block.tres" id="3_1qpj1"]
|
||||||
|
[ext_resource type="Script" uid="uid://b4iu5xrdf0evs" path="res://crafting/craft_recipe.gd" id="4_hrlxw"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("4_hrlxw")
|
||||||
|
ingredients = Array[ExtResource("1_ex3qq")]([ExtResource("2_ex3qq"), ExtResource("2_ex3qq"), ExtResource("2_ex3qq"), ExtResource("2_ex3qq"), ExtResource("2_ex3qq"), ExtResource("2_ex3qq"), null, null, null])
|
||||||
|
output = ExtResource("3_1qpj1")
|
||||||
|
metadata/_custom_type_script = "uid://b4iu5xrdf0evs"
|
||||||
26
crafting/scavenges/ssd_scav.tres
Normal file
26
crafting/scavenges/ssd_scav.tres
Normal file
|
|
@ -0,0 +1,26 @@
|
||||||
|
[gd_resource type="Resource" script_class="ScavengeRecipe" load_steps=8 format=3 uid="uid://dykc2b0ww7a8x"]
|
||||||
|
|
||||||
|
[ext_resource type="Resource" uid="uid://bjmledqi51eut" path="res://items/ssd_item.tres" id="1_eklgm"]
|
||||||
|
[ext_resource type="Script" uid="uid://oa5rlx6ttwuj" path="res://crafting/rollableLoot.gd" id="2_hitgd"]
|
||||||
|
[ext_resource type="Resource" uid="uid://cnr1k8seffsxb" path="res://items/plastic.tres" id="3_rrf34"]
|
||||||
|
[ext_resource type="Resource" uid="uid://c2wbqelme8vy1" path="res://items/ram_item.tres" id="5_4ss58"]
|
||||||
|
[ext_resource type="Script" uid="uid://boqr1fowaqmt0" path="res://crafting/scavenge_recipe.gd" id="6_wjfep"]
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_aq2uy"]
|
||||||
|
script = ExtResource("2_hitgd")
|
||||||
|
item = ExtResource("3_rrf34")
|
||||||
|
chance = 1
|
||||||
|
metadata/_custom_type_script = "uid://oa5rlx6ttwuj"
|
||||||
|
|
||||||
|
[sub_resource type="Resource" id="Resource_7lonm"]
|
||||||
|
script = ExtResource("2_hitgd")
|
||||||
|
item = ExtResource("5_4ss58")
|
||||||
|
chance = 1
|
||||||
|
metadata/_custom_type_script = "uid://oa5rlx6ttwuj"
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("6_wjfep")
|
||||||
|
input = ExtResource("1_eklgm")
|
||||||
|
rolls = 2
|
||||||
|
loot_pool = Array[ExtResource("2_hitgd")]([SubResource("Resource_aq2uy"), SubResource("Resource_7lonm")])
|
||||||
|
metadata/_custom_type_script = "uid://boqr1fowaqmt0"
|
||||||
39
inv_system/botnet/botnet_panel.gd
Normal file
39
inv_system/botnet/botnet_panel.gd
Normal file
|
|
@ -0,0 +1,39 @@
|
||||||
|
extends Inventory
|
||||||
|
|
||||||
|
@export var install_button : Button
|
||||||
|
@export var score_label : Label
|
||||||
|
|
||||||
|
# Called when the node enters the scene tree for the first time.
|
||||||
|
func _ready() -> void:
|
||||||
|
super()
|
||||||
|
check_server()
|
||||||
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
||||||
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
|
func _process(delta: float) -> void:
|
||||||
|
super(delta)
|
||||||
|
score_label.text = str(PlayerInventory.botnet_servers)
|
||||||
|
pass
|
||||||
|
|
||||||
|
func _notification(what: int) -> void:
|
||||||
|
super(what)
|
||||||
|
if what == Node.NOTIFICATION_DRAG_END:
|
||||||
|
check_server()
|
||||||
|
pass
|
||||||
|
|
||||||
|
func check_server():
|
||||||
|
if slots[0].item:
|
||||||
|
if slots[0].item.item_name == "Server":
|
||||||
|
install_button.disabled = false
|
||||||
|
else:
|
||||||
|
install_button.disabled = true
|
||||||
|
else:
|
||||||
|
install_button.disabled = true
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
func _on_button_pressed() -> void:
|
||||||
|
slots[0].item = null
|
||||||
|
slots[0].update_ui()
|
||||||
|
PlayerInventory.botnet_servers += 1
|
||||||
1
inv_system/botnet/botnet_panel.gd.uid
Normal file
1
inv_system/botnet/botnet_panel.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
uid://du0kijn4lh5kb
|
||||||
76
inv_system/botnet/botnet_panel.tscn
Normal file
76
inv_system/botnet/botnet_panel.tscn
Normal file
|
|
@ -0,0 +1,76 @@
|
||||||
|
[gd_scene load_steps=4 format=3 uid="uid://nfd41hcidmju"]
|
||||||
|
|
||||||
|
[ext_resource type="Script" uid="uid://du0kijn4lh5kb" path="res://inv_system/botnet/botnet_panel.gd" id="1_m02i1"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="2_ngfss"]
|
||||||
|
|
||||||
|
[sub_resource type="LabelSettings" id="LabelSettings_ti0ti"]
|
||||||
|
font_color = Color(1, 0.75686276, 0, 0.4745098)
|
||||||
|
|
||||||
|
[node name="InventoryPanel" type="PanelContainer" node_paths=PackedStringArray("install_button", "score_label", "slots", "grid", "inv_label")]
|
||||||
|
offset_left = 51.0
|
||||||
|
offset_top = 67.0
|
||||||
|
offset_right = 403.0
|
||||||
|
offset_bottom = 259.0
|
||||||
|
script = ExtResource("1_m02i1")
|
||||||
|
install_button = NodePath("MarginContainer/VBoxContainer/Button")
|
||||||
|
score_label = NodePath("MarginContainer/VBoxContainer/HBoxContainer2/Label2")
|
||||||
|
inventory_name = "Install in Botnet"
|
||||||
|
slots = [NodePath("MarginContainer/VBoxContainer/HBoxContainer/GridContainer/ItemSlot")]
|
||||||
|
type = "Install"
|
||||||
|
grid = NodePath("MarginContainer/VBoxContainer/HBoxContainer/GridContainer")
|
||||||
|
inv_label = NodePath("MarginContainer/VBoxContainer/Label")
|
||||||
|
|
||||||
|
[node name="MarginContainer" type="MarginContainer" parent="."]
|
||||||
|
layout_mode = 2
|
||||||
|
theme_override_constants/margin_left = 5
|
||||||
|
theme_override_constants/margin_top = 5
|
||||||
|
theme_override_constants/margin_right = 5
|
||||||
|
theme_override_constants/margin_bottom = 5
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Inventory 1"
|
||||||
|
|
||||||
|
[node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="GridContainer" type="GridContainer" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_vertical = 3
|
||||||
|
columns = 5
|
||||||
|
|
||||||
|
[node name="ItemSlot" parent="MarginContainer/VBoxContainer/HBoxContainer/GridContainer" instance=ExtResource("2_ngfss")]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
size_flags_horizontal = 3
|
||||||
|
text = "Add a completed server to your botnet, (your main goal!)"
|
||||||
|
autowrap_mode = 2
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "(this action cannot be undone)"
|
||||||
|
label_settings = SubResource("LabelSettings_ti0ti")
|
||||||
|
horizontal_alignment = 1
|
||||||
|
|
||||||
|
[node name="Button" type="Button" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Install completed server"
|
||||||
|
|
||||||
|
[node name="HBoxContainer2" type="HBoxContainer" parent="MarginContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
alignment = 1
|
||||||
|
|
||||||
|
[node name="Label" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Servers in your botnet:"
|
||||||
|
|
||||||
|
[node name="Label2" type="Label" parent="MarginContainer/VBoxContainer/HBoxContainer2"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "0"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/Button" to="." method="_on_button_pressed"]
|
||||||
|
|
@ -17,7 +17,7 @@ func _ready() -> void:
|
||||||
slot.type = type
|
slot.type = type
|
||||||
if type == "Inventory":
|
if type == "Inventory":
|
||||||
MouseTweaks.player_inventory = self
|
MouseTweaks.player_inventory = self
|
||||||
else:
|
elif type != "Install":
|
||||||
MouseTweaks.other_inventory = self
|
MouseTweaks.other_inventory = self
|
||||||
pass # Replace with function body.
|
pass # Replace with function body.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ extends Node
|
||||||
@export var button : Button
|
@export var button : Button
|
||||||
@export var money : int = 0
|
@export var money : int = 0
|
||||||
@export var money_label : Label
|
@export var money_label : Label
|
||||||
|
@export var botnet_servers : int = 0
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,16 @@ func calculate_sell_value():
|
||||||
else:
|
else:
|
||||||
sell_label.text = "Place an item"
|
sell_label.text = "Place an item"
|
||||||
sell_button.disabled = true
|
sell_button.disabled = true
|
||||||
|
if not Clock.has_time(15):
|
||||||
|
sell_button.disabled = true
|
||||||
|
|
||||||
|
|
||||||
func _on_sell_button_pressed() -> void:
|
func _on_sell_button_pressed() -> void:
|
||||||
if slots[0].item:
|
if slots[0].item and Clock.has_time(15):
|
||||||
var sell_value : int = floori(slots[0].item.buy_value / float(2))
|
var sell_value : int = floori(slots[0].item.buy_value / float(2))
|
||||||
slots[0].item = null
|
slots[0].item = null
|
||||||
slots[0].update_ui()
|
slots[0].update_ui()
|
||||||
PlayerInventory.money += sell_value
|
PlayerInventory.money += sell_value
|
||||||
|
Clock.use_time(15)
|
||||||
calculate_sell_value()
|
calculate_sell_value()
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,6 @@ text = "1234"
|
||||||
|
|
||||||
[node name="SellButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
[node name="SellButton" type="Button" parent="MarginContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Sell!"
|
text = "Sell! (Uses 15 time)"
|
||||||
|
|
||||||
[connection signal="pressed" from="MarginContainer/VBoxContainer/SellButton" to="." method="_on_sell_button_pressed"]
|
[connection signal="pressed" from="MarginContainer/VBoxContainer/SellButton" to="." method="_on_sell_button_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,6 @@ script = ExtResource("2_6iu4j")
|
||||||
item_name = "Battery"
|
item_name = "Battery"
|
||||||
icon = ExtResource("1_i7fpe")
|
icon = ExtResource("1_i7fpe")
|
||||||
bin_chance = 2
|
bin_chance = 2
|
||||||
buy_value = 25
|
buy_value = 50
|
||||||
can_buy = true
|
can_buy = true
|
||||||
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
||||||
|
|
|
||||||
14
items/nas_item.tres
Normal file
14
items/nas_item.tres
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[gd_resource type="Resource" script_class="ItemData" load_steps=4 format=3 uid="uid://3afonee3dw7"]
|
||||||
|
|
||||||
|
[ext_resource type="StyleBox" uid="uid://dcnrpkhjhp4tk" path="res://inv_system/item_panels/rare.tres" id="1_wtpx3"]
|
||||||
|
[ext_resource type="Texture2D" uid="uid://m68k8dqmcrfr" path="res://assets/item images/nas.png" id="2_wtpx3"]
|
||||||
|
[ext_resource type="Script" uid="uid://dccraom7a7e8d" path="res://inv_system/item_data.gd" id="3_tihsb"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("3_tihsb")
|
||||||
|
item_name = "NAS Box"
|
||||||
|
icon = ExtResource("2_wtpx3")
|
||||||
|
custom_panel_style = ExtResource("1_wtpx3")
|
||||||
|
bin_chance = 0
|
||||||
|
buy_value = 600
|
||||||
|
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
||||||
14
items/plastic_block.tres
Normal file
14
items/plastic_block.tres
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
[gd_resource type="Resource" script_class="ItemData" load_steps=4 format=3 uid="uid://u5u51q8erbkf"]
|
||||||
|
|
||||||
|
[ext_resource type="Texture2D" uid="uid://b7tii4smwcurc" path="res://assets/item images/plastic.png" id="1_ad3tn"]
|
||||||
|
[ext_resource type="StyleBox" uid="uid://ctni70631ksq7" path="res://inv_system/item_panels/uncommon.tres" id="1_ecsjn"]
|
||||||
|
[ext_resource type="Script" uid="uid://dccraom7a7e8d" path="res://inv_system/item_data.gd" id="2_ecsjn"]
|
||||||
|
|
||||||
|
[resource]
|
||||||
|
script = ExtResource("2_ecsjn")
|
||||||
|
item_name = "Block of Plastic"
|
||||||
|
icon = ExtResource("1_ad3tn")
|
||||||
|
custom_panel_style = ExtResource("1_ecsjn")
|
||||||
|
bin_chance = 0
|
||||||
|
buy_value = 60
|
||||||
|
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
||||||
|
|
@ -111,26 +111,28 @@ anchor_left = 0.5
|
||||||
anchor_top = 0.5
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 0.5
|
anchor_bottom = 0.5
|
||||||
offset_left = -74.0
|
offset_left = 245.0
|
||||||
offset_top = -15.5
|
offset_top = -32.0
|
||||||
offset_right = 74.0
|
offset_right = 393.0
|
||||||
offset_bottom = 15.5
|
offset_bottom = 22.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
text = "Loot E-waste bins!"
|
text = "Loot E-waste bins!
|
||||||
|
(Uses 10 time)"
|
||||||
|
|
||||||
[node name="ReturnButton" type="Button" parent="."]
|
[node name="ReturnButton" type="Button" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 7
|
anchors_preset = 8
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
anchor_top = 1.0
|
anchor_top = 0.5
|
||||||
anchor_right = 0.5
|
anchor_right = 0.5
|
||||||
anchor_bottom = 1.0
|
anchor_bottom = 0.5
|
||||||
offset_left = -81.0
|
offset_left = -81.0
|
||||||
offset_top = -31.0
|
offset_top = -15.5
|
||||||
offset_right = 81.0
|
offset_right = 81.0
|
||||||
|
offset_bottom = 15.5
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 0
|
grow_vertical = 2
|
||||||
text = "Return to workshop"
|
text = "Return to workshop"
|
||||||
|
|
||||||
[connection signal="pressed" from="LootButton" to="." method="_on_loot_button_pressed"]
|
[connection signal="pressed" from="LootButton" to="." method="_on_loot_button_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,8 @@
|
||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
|
@export var sell_panel : Inventory
|
||||||
|
@export var botnet_panel : Inventory
|
||||||
|
@export var workshop_button : Button
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
@ -8,6 +11,7 @@ func _ready() -> void:
|
||||||
|
|
||||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
|
workshop_button.disabled = sell_panel.filled_slots() > 0 or botnet_panel.filled_slots() > 0
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,11 +1,12 @@
|
||||||
[gd_scene load_steps=5 format=3 uid="uid://cu2yyw3f2avub"]
|
[gd_scene load_steps=6 format=3 uid="uid://cu2yyw3f2avub"]
|
||||||
|
|
||||||
[ext_resource type="Script" uid="uid://cq6xhdlib6c50" path="res://scenes/room.gd" id="1_8pqrt"]
|
[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="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="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="Script" uid="uid://bxdc7rrd22mlr" path="res://shop/meowbay.gd" id="4_jxe34"]
|
||||||
|
[ext_resource type="PackedScene" uid="uid://nfd41hcidmju" path="res://inv_system/botnet/botnet_panel.tscn" id="5_jxe34"]
|
||||||
|
|
||||||
[node name="room" type="Control"]
|
[node name="room" type="Control" node_paths=PackedStringArray("sell_panel", "botnet_panel", "workshop_button")]
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
|
|
@ -14,6 +15,9 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
script = ExtResource("1_8pqrt")
|
script = ExtResource("1_8pqrt")
|
||||||
|
sell_panel = NodePath("SellPanel")
|
||||||
|
botnet_panel = NodePath("BotnetPanel")
|
||||||
|
workshop_button = NodePath("GotoWorkshop")
|
||||||
|
|
||||||
[node name="TextureRect" type="TextureRect" parent="."]
|
[node name="TextureRect" type="TextureRect" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
@ -27,11 +31,18 @@ texture = ExtResource("1_om4aa")
|
||||||
expand_mode = 3
|
expand_mode = 3
|
||||||
|
|
||||||
[node name="GotoWorkshop" type="Button" parent="."]
|
[node name="GotoWorkshop" type="Button" parent="."]
|
||||||
layout_mode = 0
|
layout_mode = 1
|
||||||
offset_left = 508.0
|
anchors_preset = 8
|
||||||
offset_top = 591.0
|
anchor_left = 0.5
|
||||||
offset_right = 635.0
|
anchor_top = 0.5
|
||||||
offset_bottom = 622.0
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -63.5
|
||||||
|
offset_top = -15.5
|
||||||
|
offset_right = 63.5
|
||||||
|
offset_bottom = 15.5
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
text = "Goto workshop"
|
text = "Goto workshop"
|
||||||
|
|
||||||
[node name="SellPanel" parent="." instance=ExtResource("3_85yof")]
|
[node name="SellPanel" parent="." instance=ExtResource("3_85yof")]
|
||||||
|
|
@ -68,4 +79,11 @@ layout_mode = 2
|
||||||
size_flags_horizontal = 3
|
size_flags_horizontal = 3
|
||||||
columns = 2
|
columns = 2
|
||||||
|
|
||||||
|
[node name="BotnetPanel" parent="." instance=ExtResource("5_jxe34")]
|
||||||
|
layout_mode = 0
|
||||||
|
offset_left = 441.0
|
||||||
|
offset_top = 417.0
|
||||||
|
offset_right = 702.0
|
||||||
|
offset_bottom = 618.0
|
||||||
|
|
||||||
[connection signal="pressed" from="GotoWorkshop" to="." method="_on_goto_workshop_pressed"]
|
[connection signal="pressed" from="GotoWorkshop" to="." method="_on_goto_workshop_pressed"]
|
||||||
|
|
|
||||||
|
|
@ -29,19 +29,26 @@ texture = ExtResource("1_d7fqo")
|
||||||
expand_mode = 3
|
expand_mode = 3
|
||||||
|
|
||||||
[node name="GotoEwaste" type="Button" parent="."]
|
[node name="GotoEwaste" type="Button" parent="."]
|
||||||
layout_mode = 0
|
layout_mode = 1
|
||||||
offset_left = 611.0
|
anchors_preset = 8
|
||||||
offset_top = 469.0
|
anchor_left = 0.5
|
||||||
offset_right = 757.0
|
anchor_top = 0.5
|
||||||
offset_bottom = 500.0
|
anchor_right = 0.5
|
||||||
|
anchor_bottom = 0.5
|
||||||
|
offset_left = -73.0
|
||||||
|
offset_top = -57.0
|
||||||
|
offset_right = 73.0
|
||||||
|
offset_bottom = -26.0
|
||||||
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
text = "Go to ewaste bins"
|
text = "Go to ewaste bins"
|
||||||
|
|
||||||
[node name="GotoComputer" type="Button" parent="."]
|
[node name="GotoComputer" type="Button" parent="."]
|
||||||
layout_mode = 0
|
layout_mode = 0
|
||||||
offset_left = 614.0
|
offset_left = 500.0
|
||||||
offset_top = 522.0
|
offset_top = 328.0
|
||||||
offset_right = 760.0
|
offset_right = 646.0
|
||||||
offset_bottom = 553.0
|
offset_bottom = 359.0
|
||||||
text = "Go to room"
|
text = "Go to room"
|
||||||
|
|
||||||
[node name="CraftingPanel" parent="." instance=ExtResource("2_wwo6w")]
|
[node name="CraftingPanel" parent="." instance=ExtResource("2_wwo6w")]
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,11 @@
|
||||||
extends Control
|
extends Control
|
||||||
|
|
||||||
@export var days_left : float = 7
|
@export var days_left : int = 7
|
||||||
@export var time_left : int = 200
|
@export var time_left : int = 200
|
||||||
var starting_time : int = 200
|
var starting_time : int = 200
|
||||||
@export var bar : TextureProgressBar
|
@export var bar : TextureProgressBar
|
||||||
@export var timer_text : Label
|
@export var timer_text : Label
|
||||||
|
@export var days_text : Label
|
||||||
|
|
||||||
# Called when the node enters the scene tree for the first time.
|
# Called when the node enters the scene tree for the first time.
|
||||||
func _ready() -> void:
|
func _ready() -> void:
|
||||||
|
|
@ -15,9 +16,15 @@ func _ready() -> void:
|
||||||
func _process(delta: float) -> void:
|
func _process(delta: float) -> void:
|
||||||
bar.value = (starting_time-time_left)/float(starting_time)
|
bar.value = (starting_time-time_left)/float(starting_time)
|
||||||
timer_text.text = str(time_left)
|
timer_text.text = str(time_left)
|
||||||
|
days_text.text = str(days_left)
|
||||||
|
|
||||||
func has_time(time : float) -> bool:
|
func has_time(time : float) -> bool:
|
||||||
return time_left >= time
|
return time_left >= time
|
||||||
|
|
||||||
func use_time(time : float):
|
func use_time(time : float):
|
||||||
time_left -= time
|
time_left -= time
|
||||||
|
|
||||||
|
|
||||||
|
func _on_next_day_pressed() -> void:
|
||||||
|
days_left -= 1
|
||||||
|
time_left = 200
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@
|
||||||
[sub_resource type="LabelSettings" id="LabelSettings_r3ygl"]
|
[sub_resource type="LabelSettings" id="LabelSettings_r3ygl"]
|
||||||
font_size = 32
|
font_size = 32
|
||||||
|
|
||||||
[node name="Clock" type="Control" node_paths=PackedStringArray("bar", "timer_text")]
|
[node name="Clock" type="Control" node_paths=PackedStringArray("bar", "timer_text", "days_text")]
|
||||||
z_index = 2
|
z_index = 2
|
||||||
layout_mode = 3
|
layout_mode = 3
|
||||||
anchors_preset = 15
|
anchors_preset = 15
|
||||||
|
|
@ -18,8 +18,9 @@ grow_horizontal = 2
|
||||||
grow_vertical = 2
|
grow_vertical = 2
|
||||||
mouse_filter = 2
|
mouse_filter = 2
|
||||||
script = ExtResource("1_m6rn1")
|
script = ExtResource("1_m6rn1")
|
||||||
bar = NodePath("PanelContainer/HBoxContainer/TextureProgressBar")
|
bar = NodePath("PanelContainer/VBoxContainer/HBoxContainer/TextureProgressBar")
|
||||||
timer_text = NodePath("PanelContainer/HBoxContainer/TextureProgressBar/PanelContainer/Label")
|
timer_text = NodePath("PanelContainer/VBoxContainer/HBoxContainer/TextureProgressBar/PanelContainer/Label")
|
||||||
|
days_text = NodePath("PanelContainer/VBoxContainer/HBoxContainer/VBoxContainer/Label")
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="."]
|
[node name="PanelContainer" type="PanelContainer" parent="."]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
|
|
@ -31,24 +32,27 @@ offset_right = 20.0
|
||||||
offset_bottom = 40.0
|
offset_bottom = 40.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
|
|
||||||
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer"]
|
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
|
|
||||||
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/HBoxContainer"]
|
[node name="HBoxContainer" type="HBoxContainer" parent="PanelContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
|
||||||
|
[node name="VBoxContainer" type="VBoxContainer" parent="PanelContainer/VBoxContainer/HBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
alignment = 1
|
alignment = 1
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="PanelContainer/HBoxContainer/VBoxContainer"]
|
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "7"
|
text = "7"
|
||||||
label_settings = SubResource("LabelSettings_r3ygl")
|
label_settings = SubResource("LabelSettings_r3ygl")
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
|
|
||||||
[node name="Label2" type="Label" parent="PanelContainer/HBoxContainer/VBoxContainer"]
|
[node name="Label2" type="Label" parent="PanelContainer/VBoxContainer/HBoxContainer/VBoxContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
text = "Days Left"
|
text = "Days Left"
|
||||||
|
|
||||||
[node name="TextureProgressBar" type="TextureProgressBar" parent="PanelContainer/HBoxContainer"]
|
[node name="TextureProgressBar" type="TextureProgressBar" parent="PanelContainer/VBoxContainer/HBoxContainer"]
|
||||||
custom_minimum_size = Vector2(150, 73)
|
custom_minimum_size = Vector2(150, 73)
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
max_value = 1.0
|
max_value = 1.0
|
||||||
|
|
@ -62,7 +66,7 @@ texture_under = ExtResource("1_chnjs")
|
||||||
texture_over = ExtResource("2_m6rn1")
|
texture_over = ExtResource("2_m6rn1")
|
||||||
texture_progress = ExtResource("3_uyb5s")
|
texture_progress = ExtResource("3_uyb5s")
|
||||||
|
|
||||||
[node name="PanelContainer" type="PanelContainer" parent="PanelContainer/HBoxContainer/TextureProgressBar"]
|
[node name="PanelContainer" type="PanelContainer" parent="PanelContainer/VBoxContainer/HBoxContainer/TextureProgressBar"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 7
|
anchors_preset = 7
|
||||||
anchor_left = 0.5
|
anchor_left = 0.5
|
||||||
|
|
@ -75,9 +79,15 @@ offset_right = 16.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
grow_vertical = 0
|
grow_vertical = 0
|
||||||
|
|
||||||
[node name="Label" type="Label" parent="PanelContainer/HBoxContainer/TextureProgressBar/PanelContainer"]
|
[node name="Label" type="Label" parent="PanelContainer/VBoxContainer/HBoxContainer/TextureProgressBar/PanelContainer"]
|
||||||
layout_mode = 2
|
layout_mode = 2
|
||||||
size_flags_vertical = 8
|
size_flags_vertical = 8
|
||||||
text = "200"
|
text = "200"
|
||||||
horizontal_alignment = 1
|
horizontal_alignment = 1
|
||||||
vertical_alignment = 2
|
vertical_alignment = 2
|
||||||
|
|
||||||
|
[node name="NextDay" type="Button" parent="PanelContainer/VBoxContainer"]
|
||||||
|
layout_mode = 2
|
||||||
|
text = "Proceed to next day ->"
|
||||||
|
|
||||||
|
[connection signal="pressed" from="PanelContainer/VBoxContainer/NextDay" to="." method="_on_next_day_pressed"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue