Expand fish catalog and add bait system
This commit is contained in:
parent
43f57e56a0
commit
954042fd1d
134 changed files with 3134 additions and 127 deletions
|
|
@ -1,4 +1,4 @@
|
|||
[gd_resource type="Resource" script_class="ItemCatalog" load_steps=9 format=3]
|
||||
[gd_resource type="Resource" script_class="ItemCatalog" load_steps=10 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://items/item_catalog.gd" id="1_script"]
|
||||
[ext_resource type="Resource" path="res://items/catalog/basic_fishing_rod.tres" id="2_rod"]
|
||||
|
|
@ -8,7 +8,8 @@
|
|||
[ext_resource type="Resource" path="res://items/catalog/fish_finder.tres" id="6_finder"]
|
||||
[ext_resource type="Resource" path="res://items/catalog/cooler_expansion.tres" id="7_cooler"]
|
||||
[ext_resource type="Resource" path="res://items/catalog/art_kit.tres" id="8_art_kit"]
|
||||
[ext_resource type="Resource" path="res://items/catalog/worms.tres" id="9_worms"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_script")
|
||||
items = [ExtResource("2_rod"), ExtResource("3_coffee"), ExtResource("4_energy"), ExtResource("5_snack"), ExtResource("6_finder"), ExtResource("7_cooler"), ExtResource("8_art_kit")]
|
||||
items = [ExtResource("2_rod"), ExtResource("3_coffee"), ExtResource("4_energy"), ExtResource("5_snack"), ExtResource("6_finder"), ExtResource("7_cooler"), ExtResource("8_art_kit"), ExtResource("9_worms")]
|
||||
|
|
|
|||
14
items/catalog/worms.tres
Normal file
14
items/catalog/worms.tres
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
[gd_resource type="Resource" script_class="ItemData" load_steps=2 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://items/item_data.gd" id="1"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1")
|
||||
item_id = &"worms"
|
||||
display_name = "worms"
|
||||
description = "common bait. fills your tacklebox at the fishing shop."
|
||||
category = 2
|
||||
bait_tags = Array[StringName]([&"worm"])
|
||||
stackable = true
|
||||
max_stack = 10
|
||||
hotbar_allowed = false
|
||||
|
|
@ -16,6 +16,7 @@ enum Category {
|
|||
@export var display_name: String
|
||||
@export_multiline var description: String
|
||||
@export var category: Category = Category.UTILITY
|
||||
@export var bait_tags: Array[StringName] = []
|
||||
@export var icon: Texture2D
|
||||
@export var stackable: bool = false
|
||||
@export_range(1, 999, 1) var max_stack: int = 1
|
||||
|
|
@ -35,3 +36,7 @@ func is_valid() -> bool:
|
|||
|
||||
func get_category_name() -> String:
|
||||
return Category.keys()[category].to_lower()
|
||||
|
||||
|
||||
func is_bait() -> bool:
|
||||
return category == Category.BAIT and not bait_tags.is_empty()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue