aquarium 
The component that manages the aquariums UI, fluid, temperature, the current fish inside the parent object, as well as beauty, and a few other common aquarium features.
Vars | |
aquarium_modes | static list of available aquarium modes |
---|---|
aquarium_zone_max_pw | The maximum pixel x of the area where vis overlays should be displayed |
aquarium_zone_max_pz | The maximum pixel y of the area where vis overlays should be displayed |
aquarium_zone_min_pw | The minimum pixel x of the area where vis overlays should be displayed |
aquarium_zone_min_pz | The minimum pixel y of the area where vis overlays should be displayed |
beauty_by_content | A lazy list of key instances and assoc vals representing how much beauty they contribute to the aquarium |
current_mode | The current aquarium mode, one of either AQUARIUM_MODE_MANUAL, AQUARIUM_MODE_AUTO or AQUARIUM_MODE_SAFE. |
default_beauty | The default beauty of the aquarium when empty. |
feeding_interval | While the feed (reagent) storage is not empty, this is the interval which the fish are fed. |
fluid_temp | The current temperature of the fluid of the aquarium |
fluid_type | The current type of fluid of the aquarium |
fluid_types | static list of available fluid types. |
last_feeding | The last time fishes were fed by the acquarium itsef. |
max_fluid_temp | The maximum fluid temperature that can be reached by this aquarium |
min_fluid_temp | The minimum fluid temperature that can be reached by this aquarium |
reagents_size | The size of the reagents holder which will store fish feed. |
tracked_fish_by_type | list of fishes inside the parent object, sorted by type - does not include things with aquarium visuals that are not fish |
used_layers | A list of layers that are currently being used for the various overlays of the aquarium (from aquarium_content comp) |
Procs | |
can_insert | Check if an item can be inserted into the aquarium |
check_evolution | Check if an offspring of two fish (or one if self-reproducing) can evolve. |
check_fluid_and_temperature | Toggles a couple flags that determine if the fish is in safe waters so that we won't have to use signals or access this comp in multiple places just to confirm that. |
get_candidates | Return a list of fish which our fishie can reproduce with (including itself if self-reproducing) |
get_content_beauty | update the beauty_by_content of a 'beauty_by_content' key and then recalculate the beauty. |
get_optimal_aquarium_settings | Called if the mode is AQUARIUM_MODE_AUTO whenever a fish is added, removed, dies or resurrected. |
on_entered | Handles aquarium content insertion |
on_exited | Handles aquarium content removal. |
on_fish_status_changed | Fish beauty changes when they're dead, so we need to update the beauty of the aquarium too. |
on_item_interaction | This proc handles feeding the aquarium and inserting aquarium content. |
process | Feed the fish at defined intervals until the feed storage is empty. |
remove_visual | Remove a visual overlay from an aquarium_content comp |
set_visual | set values for a visual overlay for an aquarium_content comp |
start_autofeed | Called when the feed storage is no longer empty. |
Var Details
aquarium_modes 
static list of available aquarium modes
aquarium_zone_max_pw 
The maximum pixel x of the area where vis overlays should be displayed
aquarium_zone_max_pz 
The maximum pixel y of the area where vis overlays should be displayed
aquarium_zone_min_pw 
The minimum pixel x of the area where vis overlays should be displayed
aquarium_zone_min_pz 
The minimum pixel y of the area where vis overlays should be displayed
beauty_by_content 
A lazy list of key instances and assoc vals representing how much beauty they contribute to the aquarium
current_mode 
The current aquarium mode, one of either AQUARIUM_MODE_MANUAL, AQUARIUM_MODE_AUTO or AQUARIUM_MODE_SAFE.
default_beauty 
The default beauty of the aquarium when empty.
feeding_interval 
While the feed (reagent) storage is not empty, this is the interval which the fish are fed.
fluid_temp 
The current temperature of the fluid of the aquarium
fluid_type 
The current type of fluid of the aquarium
fluid_types 
static list of available fluid types.
last_feeding 
The last time fishes were fed by the acquarium itsef.
max_fluid_temp 
The maximum fluid temperature that can be reached by this aquarium
min_fluid_temp 
The minimum fluid temperature that can be reached by this aquarium
reagents_size 
The size of the reagents holder which will store fish feed.
tracked_fish_by_type 
list of fishes inside the parent object, sorted by type - does not include things with aquarium visuals that are not fish
used_layers 
A list of layers that are currently being used for the various overlays of the aquarium (from aquarium_content comp)
Proc Details
can_insert
Check if an item can be inserted into the aquarium
check_evolution
Check if an offspring of two fish (or one if self-reproducing) can evolve.
check_fluid_and_temperature
Toggles a couple flags that determine if the fish is in safe waters so that we won't have to use signals or access this comp in multiple places just to confirm that.
get_candidates
Return a list of fish which our fishie can reproduce with (including itself if self-reproducing)
get_content_beauty
update the beauty_by_content of a 'beauty_by_content' key and then recalculate the beauty.
get_optimal_aquarium_settings
Called if the mode is AQUARIUM_MODE_AUTO whenever a fish is added, removed, dies or resurrected.
This tries to find what the best combination of fluid and temperature. is to ensure the survival of the highest number of fishes. It also can and will activate stasis if over half of the fish population is at risk of dying. It doesn't care if the fish is big or small, useful or not. All fish are equal before the impartial eye of AQUARIUM_MODE_AUTO.
on_entered
Handles aquarium content insertion
on_exited
Handles aquarium content removal.
on_fish_status_changed
Fish beauty changes when they're dead, so we need to update the beauty of the aquarium too.
on_item_interaction
This proc handles feeding the aquarium and inserting aquarium content.
process
Feed the fish at defined intervals until the feed storage is empty.
remove_visual
Remove a visual overlay from an aquarium_content comp
set_visual
set values for a visual overlay for an aquarium_content comp
start_autofeed
Called when the feed storage is no longer empty.