Skip to content

Genome Integrations #82

@mjuvekar7

Description

@mjuvekar7

Now that we have a rudimentary Genome module more or less in place, we should start working on integrating Genome into SimpleFarming.

A high-level description of this integration and its goals can be found in #46. Note, however, that some aspects of that issue may be outdated. #57 aims at getting started with this integration, but needs a major rework due to the recent refactor (in my opinion, we should just close it and start from scratch, reusing code from it where possible).

This issue aims at proposing a rough series of small goals leading to a complete, functioning implementation.

  • Implement simple color variation in plants/bushes. There should be a way to specify two variants for a plant. The plant's gene sequence should contain two genes each of which can encode one of the two variants. One variant is dominant, while the other is recessive, and thus the color of the plant can be determined by simple dominance.
  • Create a "seed mixer" which allows you to cross seeds from two different plants (a similar item was implemented in Implemented Genetics in blueberry bush. #57; code could be reused from there). We might want this to be in another module, perhaps EdibleFlora, to comply with the refactor (consult @jellysnake).
  • Integrate SimpleFarming and Genome with the Hunger module, so that the "filling" factor of fruits can be determined and varied genetically. Partially implemented in Implemented Genetics in blueberry bush. #57.
  • Implement genetic mutations in a meaningful way.

Edit: Some specific details, as discussed with @jellysnake

  1. Changes to SimpleFarming:
    • Create new event called beforeProduceCreated
    • Fire this event whenever a new seed/plant item is created (or any other situation where a GenomeComponent should be added to some entity)
    • Note that SimpleFarming does not need to have Genome dependency
  2. Changes to EdibleFlora:
    • Create a GenomeAuthoritySystem which is active only when Genome is enabled
    • Listen for the beforeProduceCreated event in this system, and add the necessary GenomeComponents to the appropriate entities when such an event is received.
    • Create a seed mixer which applies appropriate BreedingAlgorithms to mix two seeds to give one daughter seed.
  3. Define effects of genes on specific traits (eg color) in the appropriate class(es)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions