started scavenging book
This commit is contained in:
parent
4f899c13f9
commit
c952938134
5 changed files with 78 additions and 3 deletions
18
crafting/recipe book/scavengeBook.gd
Normal file
18
crafting/recipe book/scavengeBook.gd
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
extends PanelContainer
|
||||
|
||||
@export var grid : GridContainer
|
||||
|
||||
# Called when the node enters the scene tree for the first time.
|
||||
func _ready() -> void:
|
||||
RecipeManager.recipes_loaded.connect(scavs_ready)
|
||||
|
||||
|
||||
# Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
func _process(delta: float) -> void:
|
||||
pass
|
||||
|
||||
func scavs_ready():
|
||||
for scav in RecipeManager.scavenge_recipes:
|
||||
# TODO: create an item slot with the scav recipie icon, bock dragging
|
||||
# show details about scavenge results in tooltip?
|
||||
pass
|
||||
1
crafting/recipe book/scavengeBook.gd.uid
Normal file
1
crafting/recipe book/scavengeBook.gd.uid
Normal file
|
|
@ -0,0 +1 @@
|
|||
uid://drm5jfhadys7l
|
||||
|
|
@ -43,7 +43,7 @@ func load_recipes():
|
|||
if (file_name.get_extension() == "remap"):
|
||||
file_name = file_name.replace('.remap', '')
|
||||
print(crafts_dir + file_name)
|
||||
craft_recipes.append(load(scavenges_dir + file_name) as ScavengeRecipe)
|
||||
scavenge_recipes.append(load(scavenges_dir + file_name) as ScavengeRecipe)
|
||||
file_name = dir.get_next()
|
||||
|
||||
recipes_loaded.emit()
|
||||
|
|
|
|||
32
crafting/scavenges/gpu_scav.tres
Normal file
32
crafting/scavenges/gpu_scav.tres
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
[gd_resource type="Resource" script_class="ScavengeRecipe" load_steps=10 format=3 uid="uid://b75dli4mcy0ua"]
|
||||
|
||||
[ext_resource type="Resource" uid="uid://oc57emfpcnm0" path="res://items/gpu.tres" id="1_t0fjb"]
|
||||
[ext_resource type="Script" uid="uid://oa5rlx6ttwuj" path="res://crafting/rollableLoot.gd" id="2_n1ajs"]
|
||||
[ext_resource type="Resource" uid="uid://cnr1k8seffsxb" path="res://items/plastic.tres" id="3_t0fjb"]
|
||||
[ext_resource type="Resource" uid="uid://bufa63unuppu5" path="res://items/cpu.tres" id="4_3aoas"]
|
||||
[ext_resource type="Script" uid="uid://boqr1fowaqmt0" path="res://crafting/scavenge_recipe.gd" id="4_bmsvv"]
|
||||
[ext_resource type="Resource" uid="uid://c2wbqelme8vy1" path="res://items/ram_item.tres" id="5_fut73"]
|
||||
|
||||
[sub_resource type="Resource" id="Resource_wkxe4"]
|
||||
script = ExtResource("2_n1ajs")
|
||||
item = ExtResource("3_t0fjb")
|
||||
chance = 4
|
||||
metadata/_custom_type_script = "uid://oa5rlx6ttwuj"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_aq2uy"]
|
||||
script = ExtResource("2_n1ajs")
|
||||
item = ExtResource("4_3aoas")
|
||||
chance = 1
|
||||
metadata/_custom_type_script = "uid://oa5rlx6ttwuj"
|
||||
|
||||
[sub_resource type="Resource" id="Resource_7lonm"]
|
||||
script = ExtResource("2_n1ajs")
|
||||
item = ExtResource("5_fut73")
|
||||
chance = 1
|
||||
metadata/_custom_type_script = "uid://oa5rlx6ttwuj"
|
||||
|
||||
[resource]
|
||||
script = ExtResource("4_bmsvv")
|
||||
input = ExtResource("1_t0fjb")
|
||||
loot_pool = Array[ExtResource("2_n1ajs")]([SubResource("Resource_wkxe4"), SubResource("Resource_aq2uy"), SubResource("Resource_7lonm")])
|
||||
metadata/_custom_type_script = "uid://boqr1fowaqmt0"
|
||||
|
|
@ -1,9 +1,10 @@
|
|||
[gd_scene load_steps=7 format=3 uid="uid://bkhg56q71vsjv"]
|
||||
[gd_scene load_steps=9 format=3 uid="uid://bkhg56q71vsjv"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://jxkjnscuxcyi" path="res://inv_system/player_inventory.gd" id="1_vk2kx"]
|
||||
[ext_resource type="Script" uid="uid://c6oycdae5wvjf" path="res://inv_system/inventory.gd" id="2_hk4hx"]
|
||||
[ext_resource type="PackedScene" uid="uid://dgqs20xf7l8c" path="res://inv_system/item_slot.tscn" id="3_8qgtd"]
|
||||
[ext_resource type="Script" uid="uid://chxgum3v3d1o7" path="res://crafting/recipe book/recipie_book.gd" id="4_bdgfq"]
|
||||
[ext_resource type="Script" uid="uid://drm5jfhadys7l" path="res://crafting/recipe book/scavengeBook.gd" id="5_bdgfq"]
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_2jtfh"]
|
||||
content_margin_left = 0.0
|
||||
|
|
@ -29,6 +30,18 @@ corner_radius_bottom_right = 3
|
|||
corner_radius_bottom_left = 3
|
||||
corner_detail = 5
|
||||
|
||||
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8qgtd"]
|
||||
content_margin_left = 0.0
|
||||
content_margin_top = 0.0
|
||||
content_margin_right = 0.0
|
||||
content_margin_bottom = 0.0
|
||||
bg_color = Color(0.6, 0.6, 0.6, 0)
|
||||
corner_radius_top_left = 3
|
||||
corner_radius_top_right = 3
|
||||
corner_radius_bottom_right = 3
|
||||
corner_radius_bottom_left = 3
|
||||
corner_detail = 5
|
||||
|
||||
[node name="PlayerInventory" type="Control" node_paths=PackedStringArray("inventory_panel", "button")]
|
||||
z_index = 2
|
||||
layout_mode = 3
|
||||
|
|
@ -58,7 +71,7 @@ offset_left = 83.0
|
|||
offset_top = 67.0
|
||||
offset_right = 431.0
|
||||
offset_bottom = 544.0
|
||||
current_tab = 1
|
||||
current_tab = 2
|
||||
|
||||
[node name="Inventory" type="PanelContainer" parent="TabContainer" node_paths=PackedStringArray("grid", "inv_label")]
|
||||
visible = false
|
||||
|
|
@ -185,6 +198,7 @@ layout_mode = 2
|
|||
layout_mode = 2
|
||||
|
||||
[node name="Recipie Book" type="PanelContainer" parent="TabContainer" node_paths=PackedStringArray("vbox")]
|
||||
visible = false
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_icm48")
|
||||
script = ExtResource("4_bdgfq")
|
||||
|
|
@ -207,4 +221,14 @@ layout_mode = 2
|
|||
size_flags_horizontal = 3
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Scavenge" type="PanelContainer" parent="TabContainer"]
|
||||
layout_mode = 2
|
||||
theme_override_styles/panel = SubResource("StyleBoxFlat_8qgtd")
|
||||
script = ExtResource("5_bdgfq")
|
||||
metadata/_tab_index = 2
|
||||
|
||||
[node name="GridContainer" type="GridContainer" parent="TabContainer/Scavenge"]
|
||||
layout_mode = 2
|
||||
columns = 5
|
||||
|
||||
[connection signal="pressed" from="Button" to="." method="_on_button_pressed"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue