-
-
Notifications
You must be signed in to change notification settings - Fork 512
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
Implement a multicellular statistics panel #5820
base: master
Are you sure you want to change the base?
Conversation
(not the best architecture yet, merging multiple microbes into a single organelle list)
(per-cell calculation with the results being stacked) Process list is not implemented for now
Since showing the entire colony's processes would require complex logic for process merging. Related issue: #3207
…into multicellular_stat_panel
While this PR is not complete, it would be good to hear some feedback regarding the general architecture, especially the changes made to the ProcessSystem to make the energy balance calculation work. |
src/multicellular_stage/editor/CellBodyPlanEditorComponent.GUI.cs
Outdated
Show resolved
Hide resolved
src/multicellular_stage/editor/CellBodyPlanEditorComponent.GUI.cs
Outdated
Show resolved
Hide resolved
I think that's fundamentally a fine change but I think it needs a bit more tweaking. I had a quick look at most of the code and I think a bigger architecture problem is that a lot of the quite complex calculation logic for the GUI display seems to be mostly duplicated from the microbe version. So finding ways to avoid the code duplication would be excellent. |
…lping function public
… mutate an argument
src/multicellular_stage/editor/CellBodyPlanEditorComponent.GUI.cs
Outdated
Show resolved
Hide resolved
src/multicellular_stage/editor/CellBodyPlanEditorComponent.GUI.cs
Outdated
Show resolved
Hide resolved
|
||
private bool IsNegativeAtpProduction() | ||
{ | ||
return energyBalanceInfo != null && |
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.
Here, it doesn't help if there's one cell with massively positive ATP, because if there's any negative cell in the colony, that will just die when it grows in the body plan...
/// <summary> | ||
/// Calculates the energy balance and compound balance for a colony | ||
/// </summary> | ||
private void CalculateEnergyAndCompoundBalance(IReadOnlyList<HexWithData<CellTemplate>> cells, |
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.
I think this is fine for now, but I think it would be excellent to add a TODO here about adding some kind of selector to pick entire colony / individual cell in the future, so that the player isn't as confused about the aggregated data.
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.
I think I've now reviewed all the code. So after those few bugs are solved this should be really close to done with just a few code cleanups to do. I didn't read the new OrganismStatisticsPanel too closely as I assumed it was mostly copy-pasted code (with hopefully no problems getting picked up at the same time).
(and I again got carried away with thinking about making a few minor comments before starting this review)
Also if it would help any (there's about 5 merge conflicts with master on this branch) I can push my local version of this branch that I rebased on master today. |
It has nothing to do with that but, will it be possible to run the cheat panel after that Pull? |
I'm pretty sure I didn't see any code changes related to that so it will keep working as usual in the microbe editor (and still be missing from multicellular). |
For the more complex situation of the ATP balance bar not being fully suitable for multicellular, let's just put a few TODO comments in the code. That and adding some defensive programming around the cell counts are the last things I need doing. I can help with those tomorrow if at least the merge conflicts are solved on this branch. |
The submodule issue should be fixed now. Regarding the ATP balance problem, wouldn't it be better to open an issue to track it, so that it can't be buried in the code? |
I suppose that would be good so that the TODO comments can then reference also the issue URL. Edit: meant to say that do you want to open the issue? You can if you want. |
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.
I think the code should be good now. I'll do a quick playtest tomorrow before merging this.
Brief Description of What This PR Does
Implements a multicellular statistics panel, mostly porting features from the similar panel in the cell editor.
In terms of stats, it only features speed, storage and rotatation speed as the other microbial stats don't make sense for a colony.
TODO:
Related Issues
Closes #3170
Progress Checklist
Note: before starting this checklist the PR should be marked as non-draft.
break existing features:
https://wiki.revolutionarygamesstudio.com/wiki/Testing_Checklist
(this is important as to not waste the time of Thrive team
members reviewing this PR)
styleguide.
Before merging all CI jobs should finish on this PR without errors, if
there are automatically detected style issues they should be fixed by
the PR author. Merging must follow our
styleguide.