-
Notifications
You must be signed in to change notification settings - Fork 1
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
Mutation rebase #102
Mutation rebase #102
Conversation
|
All the code from the previous github mutation branch that github did not like. Includes handling the mutate function, generating new mutations, calculating the percent chance of mutating, protected genes, and added genes that effect mutations
Added the mutation chance code back in after the rebase
Got rid of redundant code in generating genes and modifier genes
Fixed the crashes that were happening with the mutation code. In the mutate function, cellState gets called to check the protected genes. Because of the placement of the mutate function in the seteq, cell state had not been created yet.
Changed reproduction to kill the parent cell and create two child cells so both cells can mutate and recreate their cell structures
Fixed protected genes and moved the death emit on reproduction. I have noticed this not working properly and keeping the parent alive for some reason. as well as some crashes on cell death. This happens more when creation costs are lowered. I have also tested and made sure its not being caused my the mutation code itself
… don't have CellMembranes
144e4ed
to
0c51d5c
Compare
@@ -114,6 +114,10 @@ void CellEnvironment::_on_cell_death(Cell *cell) { | |||
CellSpawner *spawner = Object::cast_to<CellSpawner>(this->get_parent()); |
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.
Line 113 _lineageGraph.storeCell(cell);
is giving a warning while compiling:
src\cell_environment.cpp(113): warning C4834: discarding return value of function with 'nodiscard' attribute.
I believe it's complaining about the fact that the storeCell function returns a Vector2 but then it isn't used anywhere here.
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.
These changes look good and work for me.
All of the mutation code after rebasing with reproduction and UI changes
Things included in mutation: