Add data-driven fish selection and catch showcase
This commit is contained in:
parent
ae2f724fe2
commit
bd2768b676
39 changed files with 1226 additions and 58 deletions
20
fish/fish_catch.gd
Normal file
20
fish/fish_catch.gd
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
class_name FishCatch
|
||||
extends Resource
|
||||
|
||||
const FishDataType = preload("res://fish/fish_data.gd")
|
||||
|
||||
@export var fish: FishDataType
|
||||
@export var fish_id: StringName
|
||||
@export var weight_lb: float = 0.0
|
||||
@export var display_scale: float = 1.0
|
||||
|
||||
|
||||
func is_valid() -> bool:
|
||||
return (
|
||||
fish != null
|
||||
and not fish_id.is_empty()
|
||||
and fish.id == fish_id
|
||||
and weight_lb >= fish.get_minimum_weight()
|
||||
and weight_lb <= fish.get_maximum_weight()
|
||||
and display_scale > 0.0
|
||||
)
|
||||
Loading…
Add table
Add a link
Reference in a new issue