Add tuna, salmon, and round goby species

This commit is contained in:
Alexander Sellite 2026-08-03 15:44:45 -04:00
parent 325f718f99
commit 004324458d
42 changed files with 957 additions and 21 deletions

View file

@ -48,7 +48,7 @@ func _run() -> void:
as PlayerAssetReservationService
)
assert(player != null)
assert(catalog != null and catalog.candidates.size() == 8)
assert(catalog != null and catalog.candidates.size() == 19)
assert(sale_service != null)
assert(shop_service != null)
assert(session != null and session.is_host())

View file

@ -40,8 +40,22 @@ const CATFISH_IDS: Array[StringName] = [
const FRESH_WATER_IDS: Array[StringName] = [
&"bluegill", &"carp", &"catfish_blue", &"catfish_channel",
&"catfish_flathead", &"catfish_white",
&"goby_round",
]
const SALT_WATER_IDS: Array[StringName] = [
&"bass",
&"sunfish",
&"tuna_albacore",
&"tuna_bigeye",
&"tuna_bluefin",
&"tuna_skipjack",
&"tuna_yellowfin",
&"salmon_atlantic",
&"salmon_chum",
&"salmon_coho",
&"salmon_pink",
&"salmon_sockeye",
]
const SALT_WATER_IDS: Array[StringName] = [&"bass", &"sunfish"]
func _initialize() -> void:
@ -58,9 +72,9 @@ func _run() -> void:
func _validate_catalog_and_pools() -> void:
assert(Catalog.candidates.size() == 8)
assert(PondPool.candidates.size() == 6)
assert(OceanPool.candidates.size() == 2)
assert(Catalog.candidates.size() == 19)
assert(PondPool.candidates.size() == 7)
assert(OceanPool.candidates.size() == 12)
for fish_id: StringName in ORIGINAL_IDS:
var original_fish: FishDataType = Catalog.get_fish_by_id(fish_id)
assert(original_fish != null)
@ -104,6 +118,43 @@ func _validate_catalog_and_pools() -> void:
assert(fish.sell_value_min == int(values[4]))
assert(fish.sell_value_max == int(values[5]))
var expected_tuna_values: Dictionary[StringName, Array] = {
&"tuna_albacore": [2, 1.5, 10.0, 45.0, 12, 24],
&"tuna_bigeye": [3, 0.55, 20.0, 120.0, 22, 48],
&"tuna_bluefin": [4, 0.18, 30.0, 250.0, 35, 90],
&"tuna_skipjack": [1, 3.0, 5.0, 25.0, 8, 16],
&"tuna_yellowfin": [2, 1.0, 15.0, 80.0, 16, 36],
}
for fish_id: StringName in expected_tuna_values:
var fish: FishDataType = Catalog.get_fish_by_id(fish_id)
var values: Array = expected_tuna_values[fish_id]
assert(fish != null and fish.is_selectable())
assert(int(fish.rarity) == int(values[0]))
assert(is_equal_approx(fish.base_catch_weight, float(values[1])))
assert(is_equal_approx(fish.weight_min_lb, float(values[2])))
assert(is_equal_approx(fish.weight_max_lb, float(values[3])))
assert(fish.sell_value_min == int(values[4]))
assert(fish.sell_value_max == int(values[5]))
var expected_new_values: Dictionary[StringName, Array] = {
&"goby_round": [0, 8.0, 0.1, 0.6, 2, 3],
&"salmon_atlantic": [3, 0.65, 8.0, 40.0, 20, 42],
&"salmon_chum": [1, 2.5, 6.0, 25.0, 10, 22],
&"salmon_coho": [2, 1.4, 5.0, 30.0, 14, 28],
&"salmon_pink": [1, 3.0, 3.0, 12.0, 8, 15],
&"salmon_sockeye": [2, 1.6, 4.0, 15.0, 12, 24],
}
for fish_id: StringName in expected_new_values:
var fish: FishDataType = Catalog.get_fish_by_id(fish_id)
var values: Array = expected_new_values[fish_id]
assert(fish != null and fish.is_selectable())
assert(int(fish.rarity) == int(values[0]))
assert(is_equal_approx(fish.base_catch_weight, float(values[1])))
assert(is_equal_approx(fish.weight_min_lb, float(values[2])))
assert(is_equal_approx(fish.weight_max_lb, float(values[3])))
assert(fish.sell_value_min == int(values[4]))
assert(fish.sell_value_max == int(values[5]))
var pond_context := FishingContextType.new()
pond_context.location_tags = [&"starter_pond"]
pond_context.water_type = WaterType.Type.FRESH_WATER

View file

@ -49,20 +49,20 @@ func _run() -> void:
assert(not hotbar.visible)
var entry_buttons: Dictionary = logbook.get("_entry_buttons")
assert(entry_buttons.size() == 6)
assert(entry_buttons.size() == 7)
await _capture_if_requested("-unknown")
logbook.call(
"_select_category", WaterType.Type.FRESH_WATER
)
await create_timer(0.25).timeout
assert((logbook.get("_entry_buttons") as Dictionary).size() == 6)
assert((logbook.get("_entry_buttons") as Dictionary).size() == 7)
await _capture_if_requested("-fresh")
logbook.call("_select_category", WaterType.Type.SALT_WATER)
await create_timer(0.25).timeout
assert((logbook.get("_entry_buttons") as Dictionary).size() == 2)
assert((logbook.get("_entry_buttons") as Dictionary).size() == 12)
logbook.call("_select_category", WaterType.Type.FRESH_WATER)
await create_timer(0.25).timeout
assert((logbook.get("_entry_buttons") as Dictionary).size() == 6)
assert((logbook.get("_entry_buttons") as Dictionary).size() == 7)
player.collection_log.mark_discovered(&"bluegill")
await process_frame
logbook.call("_select_entry", &"bluegill", &"bluegill")
@ -101,7 +101,7 @@ func _validate_save_round_trip(
var player := main.get("_player") as Player
var catalog := main.get("fish_catalog") as FishPool
assert(catalog != null)
assert(catalog.candidates.size() == 8)
assert(catalog.candidates.size() == 19)
for index: int in 4:
_add_test_catch(player, catalog.candidates[index])
assert(save_manager.save_now())
@ -122,7 +122,7 @@ func _validate_save_round_trip(
assert(player.inventory.replace_all_catches(no_catches, 1))
assert(player.collection_log.replace_discovered_ids(no_discoveries))
assert(save_manager.load_player_data())
assert(player.inventory.get_all_catches().size() == 8)
assert(player.inventory.get_all_catches().size() == 19)
for fish: FishData in catalog.candidates:
assert(player.inventory.get_count(fish.id) == 1)
assert(player.collection_log.has_discovered(fish.id))

View file

@ -49,6 +49,17 @@ func _validate_catalog() -> void:
&"catfish_channel",
&"catfish_flathead",
&"catfish_white",
&"tuna_albacore",
&"tuna_bigeye",
&"tuna_bluefin",
&"tuna_skipjack",
&"tuna_yellowfin",
&"goby_round",
&"salmon_atlantic",
&"salmon_chum",
&"salmon_coho",
&"salmon_pink",
&"salmon_sockeye",
]
assert(LogbookCatalog.CATALOG_ORDER == expected_ids)
for index: int in expected_ids.size():
@ -62,7 +73,20 @@ func _validate_catalog() -> void:
)
var expected_category: WaterType.Type = (
WaterType.Type.SALT_WATER
if expected_ids[index] in [&"bass", &"sunfish"]
if expected_ids[index] in [
&"bass",
&"sunfish",
&"tuna_albacore",
&"tuna_bigeye",
&"tuna_bluefin",
&"tuna_skipjack",
&"tuna_yellowfin",
&"salmon_atlantic",
&"salmon_chum",
&"salmon_coho",
&"salmon_pink",
&"salmon_sockeye",
]
else WaterType.Type.FRESH_WATER
)
assert(
@ -105,7 +129,7 @@ func _validate_page() -> void:
page.call("_select_category", category)
await create_timer(0.25).timeout
var entries: Dictionary = page.get("_entry_buttons")
assert(entries.size() == (6 if category == WaterType.Type.FRESH_WATER else 2))
assert(entries.size() == (7 if category == WaterType.Type.FRESH_WATER else 12))
for fish: FishDataType in LogbookCatalog.ordered_species(
CatalogResource.candidates
):
@ -155,7 +179,7 @@ func _validate_page() -> void:
candidate.display_name
)
)
assert(silhouette_count == 8)
assert(silhouette_count == 19)
page.call("_select_category", WaterType.Type.OTHER)
await create_timer(0.25).timeout

View file

@ -138,7 +138,21 @@ func _validate_fishing_availability() -> void:
assert(not night_fish.availability.is_available(day_context))
assert(night_fish.availability.is_available(night_context))
assert(night_fish.availability.is_available(transition_context))
for fish_id: StringName in [&"bass", &"carp"]:
for fish_id: StringName in [
&"bass",
&"carp",
&"tuna_albacore",
&"tuna_bigeye",
&"tuna_bluefin",
&"tuna_skipjack",
&"tuna_yellowfin",
&"goby_round",
&"salmon_atlantic",
&"salmon_chum",
&"salmon_coho",
&"salmon_pink",
&"salmon_sockeye",
]:
var all_time_fish: FishDataType = Catalog.get_fish_by_id(fish_id)
assert(all_time_fish.availability.is_available(day_context))
assert(all_time_fish.availability.is_available(night_context))