-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added Genome related events #93
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall seems fine,
I am a little bit wary of the TransferGenomeEvent
I've put more details about this and more in the review for
Terasology/EdibleFlora#5
if (!isInLastStage(bushComponent) | ||
// allow negative growth from the last stage | ||
|| stages < 0) { | ||
bush.send(new AddGenomeRetention()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like a bit clunky and weird to be doing through events tbh. That being said, given the state of optional dependencies this possibly is the best way to do this.
newBush.addOrSaveComponent(bushComponent); | ||
|
||
if (stage.getValue().maxTime > 0 && stage.getValue().minTime > 0) { | ||
resetDelay(newBush, | ||
stage.getValue().minTime, | ||
stage.getValue().maxTime); | ||
} | ||
|
||
bush.send(new TransferGenomeEvent(newBush)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This event by contrast seems a bit weird than that there should be a better way to do it.
added genome related events to be handled by the GenomeAuthoritySystem if Genomes is enabled.
To-do before merging