Skip to content

Instantly share code, notes, and snippets.

@sarhatabaot
Created June 12, 2024 17:02
Show Gist options
  • Save sarhatabaot/e2d1f69bff72e235aeb5b28aa01c0d54 to your computer and use it in GitHub Desktop.
Save sarhatabaot/e2d1f69bff72e235aeb5b28aa01c0d54 to your computer and use it in GitHub Desktop.
fish.yml biome groups

So this is actually possible to achieve without any code modification, and with purely yaml features. I achieved this result by modifying my fish.yml like so:

biome-groups:
  ocean_beach: &ocean_beach
    ? OCEAN
    ? BEACH

And then in a particular fish:

cod:
  requirements:
    biome:
       <<: *ocean_beach

You can even extend this further by adding more info to the group later, i.e:

white_cod:
  requirements:
    biome:
       <<: *ocean_beach
       ? JUNGLE

Based on https://stackoverflow.com/questions/9254178/is-there-yaml-syntax-for-sharing-part-of-a-list-or-map

biome-groups:
ocean_beach: &ocean_beach
? OCEAN
? BEACH
fish:
Common:
Cod:
requirments:
biome:
<<: *ocean_beach
White_Cod:
requirments:
biome:
<<: *ocean_beach
? JUNGLE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment