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"
|
||||
Loading…
Add table
Add a link
Reference in a new issue