Scale coastal crab spawning by habitat
This commit is contained in:
parent
d8bf59bca0
commit
0158b0215f
9 changed files with 261 additions and 59 deletions
|
|
@ -55,6 +55,17 @@ func _validate_catalog_statuses() -> void:
|
|||
assert(is_equal_approx(brown.minimum_respawn_spacing_seconds, 180.0))
|
||||
assert(brown.required_tool_id == &"crab_net")
|
||||
assert(is_equal_approx(brown.minimum_surface_y, -0.44))
|
||||
assert(
|
||||
brown.surface_water_relation
|
||||
== GatherableData.SurfaceWaterRelation.ABOVE_SALT_WATER
|
||||
)
|
||||
assert(is_equal_approx(
|
||||
brown.surface_population_per_100_square_meters,
|
||||
0.15,
|
||||
))
|
||||
assert(brown.maximum_surface_population == 24)
|
||||
assert(brown.target_population_for_surface_area(100.0) == 2)
|
||||
assert(brown.target_population_for_surface_area(7500.0) == 12)
|
||||
assert(FishCatalog.get_fish_by_id(&"crab_brown") == brown.catch_data)
|
||||
assert(not brown.catch_data.is_fishable())
|
||||
var clam: GatherableData = Gatherables.get_entry(&"clam_manila")
|
||||
|
|
@ -86,11 +97,27 @@ func _validate_catalog_statuses() -> void:
|
|||
assert(FishCatalog.get_fish_by_id(&"beetle_stag_common") == beetle.catch_data)
|
||||
assert(not beetle.catch_data.is_fishable())
|
||||
|
||||
for type_id: StringName in [
|
||||
&"crab_ghost",
|
||||
&"crab_blue",
|
||||
&"crab_dungeness",
|
||||
]:
|
||||
var blue: GatherableData = Gatherables.get_entry(&"crab_blue")
|
||||
assert(blue != null and blue.is_available())
|
||||
assert(blue.catch_data.active)
|
||||
assert(blue.is_available(CalendarSeasonType.Season.SUMMER))
|
||||
assert(blue.is_available(CalendarSeasonType.Season.FALL))
|
||||
assert(not blue.is_available(CalendarSeasonType.Season.WINTER))
|
||||
assert(
|
||||
blue.surface_water_relation
|
||||
== GatherableData.SurfaceWaterRelation.BELOW_SALT_WATER
|
||||
)
|
||||
assert(is_equal_approx(
|
||||
blue.surface_population_per_100_square_meters,
|
||||
0.4,
|
||||
))
|
||||
assert(blue.maximum_surface_population == 16)
|
||||
assert(blue.target_population_for_surface_area(100.0) == 4)
|
||||
assert(blue.target_population_for_surface_area(2250.0) == 9)
|
||||
assert(FishCatalog.get_fish_by_id(&"crab_blue") == blue.catch_data)
|
||||
assert(not blue.catch_data.is_fishable())
|
||||
|
||||
for type_id: StringName in [&"crab_ghost", &"crab_dungeness"]:
|
||||
var entry: GatherableData = Gatherables.get_entry(type_id)
|
||||
assert(entry != null)
|
||||
assert(entry.is_valid())
|
||||
|
|
@ -109,8 +136,9 @@ func _validate_catalog_statuses() -> void:
|
|||
)
|
||||
|
||||
var available: Array[GatherableData] = Gatherables.get_available_entries()
|
||||
assert(available.size() == 3)
|
||||
assert(available.size() == 4)
|
||||
assert(available.has(brown))
|
||||
assert(available.has(blue))
|
||||
assert(available.has(clam))
|
||||
assert(available.has(beetle))
|
||||
var winter_available: Array[GatherableData] = (
|
||||
|
|
@ -118,6 +146,7 @@ func _validate_catalog_statuses() -> void:
|
|||
)
|
||||
assert(winter_available.has(brown))
|
||||
assert(winter_available.has(clam))
|
||||
assert(not winter_available.has(blue))
|
||||
assert(not winter_available.has(beetle))
|
||||
var rng := RandomNumberGenerator.new()
|
||||
rng.seed = 24680
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue