Scale coastal crab spawning by habitat
This commit is contained in:
parent
d8bf59bca0
commit
0158b0215f
9 changed files with 261 additions and 59 deletions
|
|
@ -40,39 +40,17 @@ const StarterRegionScene = preload(
|
|||
const SharedFishPlaceholder: Texture2D = preload(
|
||||
"res://art/exported/creatures/fish_placeholder.png"
|
||||
)
|
||||
const FINAL_CREATURE_TEXTURE_PATHS: Dictionary[StringName, String] = {
|
||||
&"bowfin": "res://art/exported/creatures/101.png",
|
||||
&"sturgeon_lake": "res://art/exported/creatures/102.png",
|
||||
&"gar_longnose": "res://art/exported/creatures/103.png",
|
||||
&"paddlefish": "res://art/exported/creatures/104.png",
|
||||
&"sturgeon_shovelnose": "res://art/exported/creatures/105.png",
|
||||
&"gar_spotted": "res://art/exported/creatures/106.png",
|
||||
&"lungfish_west_african": "res://art/exported/creatures/107.png",
|
||||
&"mudskipper_atlantic": "res://art/exported/creatures/201.png",
|
||||
&"flounder_winter": "res://art/exported/creatures/403.png",
|
||||
&"mackerel_atlantic": "res://art/exported/creatures/701.png",
|
||||
&"mackerel_chub": "res://art/exported/creatures/704.png",
|
||||
&"sand_lance_american": "res://art/exported/creatures/801.png",
|
||||
&"menhaden_atlantic": "res://art/exported/creatures/802.png",
|
||||
&"anchovy_european": "res://art/exported/creatures/805.png",
|
||||
&"sardine_european": "res://art/exported/creatures/806.png",
|
||||
&"anchovy_northern": "res://art/exported/creatures/808.png",
|
||||
&"crab_brown": "res://art/exported/creatures/3906.png",
|
||||
&"salmon_atlantic": "res://art/exported/creatures/4401.png",
|
||||
&"mahi_mahi": "res://art/exported/creatures/4701.png",
|
||||
&"clownfish_ocellaris": "res://art/exported/creatures/5702.png",
|
||||
&"chromis_blue_green": "res://art/exported/creatures/5901.png",
|
||||
&"hogfish": "res://art/exported/creatures/6103.png",
|
||||
&"mullet_striped": "res://art/exported/creatures/6804.png",
|
||||
&"sheepshead": "res://art/exported/creatures/6905.png",
|
||||
&"milkfish": "res://art/exported/creatures/7101.png",
|
||||
&"ladyfish": "res://art/exported/creatures/7403.png",
|
||||
&"tilapia_nile": "res://art/exported/creatures/7506.png",
|
||||
&"betta_siamese": "res://art/exported/creatures/7508.png",
|
||||
}
|
||||
const FINAL_CREATURE_CATALOG_NUMBERS: Array[int] = [
|
||||
101, 102, 103, 104, 105, 106, 107, 201, 403, 701, 704, 801,
|
||||
802, 805, 806, 808, 2502, 2504, 2505, 2508, 2601, 2801, 2802,
|
||||
2803, 2804, 2806, 2807, 3002, 3102, 3103, 3104, 3107, 3201,
|
||||
3401, 3902, 3906, 4101, 4401, 4701, 5001, 5702, 5901, 5902,
|
||||
5903, 5904, 6001, 6103, 6406, 6601, 6801, 6804, 6807, 6901,
|
||||
6902, 6904, 6905, 7101, 7403, 7506, 7508,
|
||||
]
|
||||
|
||||
const ACTIVE_CATALOG_COUNT: int = 313
|
||||
const INACTIVE_CATALOG_COUNT: int = 3
|
||||
const ACTIVE_CATALOG_COUNT: int = 314
|
||||
const INACTIVE_CATALOG_COUNT: int = 2
|
||||
const FISHING_SPECIES_COUNT: int = 310
|
||||
const GENERATED_POND_COUNT: int = 33
|
||||
const GENERATED_LAKE_COUNT: int = 20
|
||||
|
|
@ -235,10 +213,15 @@ func _validate_catalog_and_pools() -> void:
|
|||
else:
|
||||
inactive_count += 1
|
||||
assert(not fish.is_selectable())
|
||||
assert(fish.display_texture == null)
|
||||
if FINAL_CREATURE_TEXTURE_PATHS.has(fish.id):
|
||||
if fish.catalog_number not in FINAL_CREATURE_CATALOG_NUMBERS:
|
||||
assert(fish.display_texture == null)
|
||||
if fish.catalog_number in FINAL_CREATURE_CATALOG_NUMBERS:
|
||||
var expected_path := (
|
||||
"res://art/exported/creatures/%d.png"
|
||||
% fish.catalog_number
|
||||
)
|
||||
var expected_texture: Texture2D = load(
|
||||
FINAL_CREATURE_TEXTURE_PATHS[fish.id]
|
||||
expected_path
|
||||
) as Texture2D
|
||||
assert(expected_texture != null)
|
||||
assert(fish.display_texture == expected_texture)
|
||||
|
|
@ -246,14 +229,14 @@ func _validate_catalog_and_pools() -> void:
|
|||
if fish.collection_method == FishDataType.CollectionMethod.FISHING:
|
||||
fishing_count += 1
|
||||
assert(fish.active)
|
||||
if not FINAL_CREATURE_TEXTURE_PATHS.has(fish.id):
|
||||
if fish.catalog_number not in FINAL_CREATURE_CATALOG_NUMBERS:
|
||||
assert(fish.display_texture == SharedFishPlaceholder)
|
||||
placeholder_fishing_count += 1
|
||||
assert(active_count == ACTIVE_CATALOG_COUNT)
|
||||
assert(inactive_count == INACTIVE_CATALOG_COUNT)
|
||||
assert(fishing_count == FISHING_SPECIES_COUNT)
|
||||
assert(final_art_count == FINAL_CREATURE_TEXTURE_PATHS.size())
|
||||
assert(placeholder_fishing_count == 283)
|
||||
assert(final_art_count == FINAL_CREATURE_CATALOG_NUMBERS.size())
|
||||
assert(placeholder_fishing_count == 253)
|
||||
var chum: FishDataType = Catalog.get_fish_by_id(&"salmon_chum")
|
||||
assert(chum != null)
|
||||
assert(chum.get_season_text() == "fall")
|
||||
|
|
@ -291,7 +274,7 @@ func _validate_catalog_and_pools() -> void:
|
|||
) == chum
|
||||
)
|
||||
seasonal_collection.free()
|
||||
var inactive_fish: FishDataType = Catalog.get_fish_by_id(&"crab_blue")
|
||||
var inactive_fish: FishDataType = Catalog.get_fish_by_id(&"crab_dungeness")
|
||||
assert(inactive_fish != null and not inactive_fish.active)
|
||||
var inactive_pool := FishPoolType.new()
|
||||
inactive_pool.candidates = [inactive_fish]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue