Fish analyzer UI is a bit more reactive, also fixing a couple things with fish reproduction (#93461)

## About The Pull Request
The fish analyzer now uses ui_data to fetch hunger, health, size, weight
and breeding cooldown rather than ui_static_data, meaning these values
are updated in real time on the UI. It also calls
update_static_data_for_all_viewers() whenever the user scans a new fish
or aquarium or if fishes are added/removed to/from the aquarium, and
closes the UI if the scanned object is out of normal view or further
than 7 tiles away.

I've also reduced the breeding cooldown for newly spawned fish from two
times the standard cooldown (usually 2 minutes, hence 4 minutes) to 60%
of it. Offsprings still retain the usual 200% cooldown however. This
should make it a bit easier for people who want to use the aquarium with
fish acquired through means other than fish farming itself.

Lastly, this PR introduces a small unit test to make sure that the
stable population of most fish is higher than 1. This was the problem
with #93043, where you couldn't breed a slimefish with a lavaloop
because the stable population of the latter wasn't set. I'm sure that's
a problem with other fishes as well, and that explains some of the
confusion with the feature (that and its opacity as a whole I guess).

## Why It's Good For The Game
This will close #93043, improve the fish analyzer UI updates, make fish
farming etc. less problematic.

## Changelog

🆑
qol: The fish analyzer UI should update more reliably.
fix: Fixed some of the fishes being unable to reproduce.
balance: Fish acquired through means other than fish farming itself
takes less time to be able to reproduce.
/🆑
This commit is contained in:
Ghom
2025-10-23 13:45:49 +13:00
committed by GitHub
parent 2042d2ecb4
commit b48b717730
10 changed files with 116 additions and 30 deletions
@@ -48,6 +48,13 @@
/// Checks that the contents of the fish_counts list are also present in fish_table
/datum/unit_test/focus_only/fish_sources_tables
/**
* This will tell us if we forgot to properly set the stable population for any fish.
* Fish with a stable population of one or less need to have either the mateless or crossbreeder trait, or be compatible with
* other fish types with a higher stable population.
*/
/datum/unit_test/focus_only/fish_population
/// Checks that maploaded mobs with either the `atmos_requirements` or `body_temp_sensitive`
/datum/unit_test/focus_only/atmos_and_temp_requirements