Add freshwater habitats and saltwater tide ribbons
This commit is contained in:
parent
53fdc9ef21
commit
69b7969e25
40 changed files with 1323 additions and 148 deletions
|
|
@ -16,6 +16,8 @@ enum Rarity {
|
|||
|
||||
@export var id: StringName
|
||||
@export var display_name: String
|
||||
@export_flags("Fresh Water", "Salt Water")
|
||||
var allowed_water_types: int = WaterType.ALL_FISHABLE_MASK
|
||||
@export var rarity: Rarity = Rarity.COMMON
|
||||
@export_range(0.0, 1000.0, 0.01) var base_catch_weight: float = 1.0
|
||||
@export var catch_profile: CatchDifficultyProfileType
|
||||
|
|
@ -47,6 +49,18 @@ func is_selectable() -> bool:
|
|||
)
|
||||
|
||||
|
||||
func is_allowed_in_water(type: WaterType.Type) -> bool:
|
||||
return (allowed_water_types & WaterType.mask_for(type)) != 0
|
||||
|
||||
|
||||
func get_primary_water_type() -> WaterType.Type:
|
||||
if allowed_water_types & WaterType.FRESH_WATER_MASK:
|
||||
return WaterType.Type.FRESH_WATER
|
||||
if allowed_water_types & WaterType.SALT_WATER_MASK:
|
||||
return WaterType.Type.SALT_WATER
|
||||
return WaterType.Type.OTHER
|
||||
|
||||
|
||||
func get_minimum_weight() -> float:
|
||||
return maxf(weight_min_lb, 0.01)
|
||||
|
||||
|
|
|
|||
|
|
@ -39,6 +39,8 @@ func select_fish(
|
|||
for fish: FishDataType in pool.candidates:
|
||||
if fish == null or not fish.is_selectable():
|
||||
continue
|
||||
if not fish.is_allowed_in_water(context.water_type):
|
||||
continue
|
||||
if fish.availability != null and not fish.availability.is_available(context):
|
||||
continue
|
||||
var final_weight: float = fish.base_catch_weight
|
||||
|
|
|
|||
9
fish/pools/starter_ocean_pool.tres
Normal file
9
fish/pools/starter_ocean_pool.tres
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
[gd_resource type="Resource" load_steps=4 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"]
|
||||
[ext_resource type="Resource" path="res://fish/species/bass/bass.tres" id="2_bass"]
|
||||
[ext_resource type="Resource" path="res://fish/species/sunfish/sunfish.tres" id="3_sunfish"]
|
||||
|
||||
[resource]
|
||||
script = ExtResource("1_pool")
|
||||
candidates = [ExtResource("2_bass"), ExtResource("3_sunfish")]
|
||||
|
|
@ -1,10 +1,8 @@
|
|||
[gd_resource type="Resource" load_steps=10 format=3]
|
||||
[gd_resource type="Resource" load_steps=8 format=3]
|
||||
|
||||
[ext_resource type="Script" path="res://fish/fish_pool.gd" id="1_pool"]
|
||||
[ext_resource type="Resource" path="res://fish/species/bluegill/bluegill.tres" id="2_bluegill"]
|
||||
[ext_resource type="Resource" path="res://fish/species/bass/bass.tres" id="3_bass"]
|
||||
[ext_resource type="Resource" path="res://fish/species/carp/carp.tres" id="4_carp"]
|
||||
[ext_resource type="Resource" path="res://fish/species/sunfish/sunfish.tres" id="5_sunfish"]
|
||||
[ext_resource type="Resource" path="res://fish/species/catfish_blue/catfish_blue.tres" id="6_catfish_blue"]
|
||||
[ext_resource type="Resource" path="res://fish/species/catfish_channel/catfish_channel.tres" id="7_catfish_channel"]
|
||||
[ext_resource type="Resource" path="res://fish/species/catfish_flathead/catfish_flathead.tres" id="8_catfish_flathead"]
|
||||
|
|
@ -12,4 +10,4 @@
|
|||
|
||||
[resource]
|
||||
script = ExtResource("1_pool")
|
||||
candidates = [ExtResource("2_bluegill"), ExtResource("3_bass"), ExtResource("4_carp"), ExtResource("5_sunfish"), ExtResource("6_catfish_blue"), ExtResource("7_catfish_channel"), ExtResource("8_catfish_flathead"), ExtResource("9_catfish_white")]
|
||||
candidates = [ExtResource("2_bluegill"), ExtResource("4_carp"), ExtResource("6_catfish_blue"), ExtResource("7_catfish_channel"), ExtResource("8_catfish_flathead"), ExtResource("9_catfish_white")]
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ preferred_bait_weight_multiplier = 1.4
|
|||
script = ExtResource("1_fish_data")
|
||||
id = &"bass"
|
||||
display_name = "striped bass"
|
||||
allowed_water_types = 2
|
||||
rarity = 1
|
||||
base_catch_weight = 4.0
|
||||
catch_profile = ExtResource("2_profile")
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
script = ExtResource("1_fish_data")
|
||||
id = &"bluegill"
|
||||
display_name = "bluegill"
|
||||
allowed_water_types = 1
|
||||
rarity = 0
|
||||
base_catch_weight = 10.0
|
||||
catch_profile = ExtResource("2_profile")
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ preferred_bait_weight_multiplier = 1.5
|
|||
script = ExtResource("1_fish_data")
|
||||
id = &"carp"
|
||||
display_name = "common carp"
|
||||
allowed_water_types = 1
|
||||
rarity = 2
|
||||
base_catch_weight = 1.5
|
||||
catch_profile = ExtResource("2_profile")
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ preferred_bait_weight_multiplier = 1.35
|
|||
script = ExtResource("1_fish_data")
|
||||
id = &"catfish_blue"
|
||||
display_name = "blue catfish"
|
||||
allowed_water_types = 1
|
||||
rarity = 1
|
||||
base_catch_weight = 1.25
|
||||
catch_profile = ExtResource("2_profile")
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ preferred_bait_weight_multiplier = 1.35
|
|||
script = ExtResource("1_fish_data")
|
||||
id = &"catfish_channel"
|
||||
display_name = "channel catfish"
|
||||
allowed_water_types = 1
|
||||
rarity = 0
|
||||
base_catch_weight = 2.0
|
||||
catch_profile = ExtResource("2_profile")
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ preferred_bait_weight_multiplier = 1.35
|
|||
script = ExtResource("1_fish_data")
|
||||
id = &"catfish_flathead"
|
||||
display_name = "flathead catfish"
|
||||
allowed_water_types = 1
|
||||
rarity = 1
|
||||
base_catch_weight = 1.0
|
||||
catch_profile = ExtResource("2_profile")
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ preferred_bait_weight_multiplier = 1.35
|
|||
script = ExtResource("1_fish_data")
|
||||
id = &"catfish_white"
|
||||
display_name = "white catfish"
|
||||
allowed_water_types = 1
|
||||
rarity = 0
|
||||
base_catch_weight = 2.0
|
||||
catch_profile = ExtResource("2_profile")
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@
|
|||
script = ExtResource("1_fish_data")
|
||||
id = &"sunfish"
|
||||
display_name = "sunfish"
|
||||
allowed_water_types = 2
|
||||
rarity = 0
|
||||
base_catch_weight = 7.0
|
||||
catch_profile = ExtResource("2_profile")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue