Merge branch 'main' into accumulation-mode
This commit is contained in:
commit
618a10abf6
46 changed files with 241 additions and 18 deletions
BIN
assets/blankIcon.png
Normal file
BIN
assets/blankIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 447 B |
40
assets/blankIcon.png.import
Normal file
40
assets/blankIcon.png.import
Normal file
|
|
@ -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
|
||||
BIN
assets/sellIcon.png
Normal file
BIN
assets/sellIcon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 445 B |
40
assets/sellIcon.png.import
Normal file
40
assets/sellIcon.png.import
Normal file
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -7,4 +7,5 @@
|
|||
script = ExtResource("2_4u113")
|
||||
item_name = "Power Cell"
|
||||
icon = ExtResource("1_lh7dq")
|
||||
rarity = "Common"
|
||||
metadata/_custom_type_script = "uid://dccraom7a7e8d"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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"]
|
||||
|
|
|
|||
|
|
@ -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))
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
28
tooltip.tscn
28
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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue