-
Notifications
You must be signed in to change notification settings - Fork 30
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
Calculate planet used buildings and max buildings #390
Calculate planet used buildings and max buildings #390
Conversation
Hi @jackbayliss, Thanks for starting work on this feature! I notice I marked issue #143 as a I checked the WIP code and your questions. I'll try to give some more context based on what I know how the official game works.
This will probably need to be updated to reflect how the official game works. AFAIK the planet size is random for every planet, but the position of the planet in the system (e.g. for [1:2:3] i mean the
Some examples:
In order to make it work for all usecases I think the method for calculating the amount of used fields might need to take a different approach. My own idea was to loop through all of the building objects via These are just my 2 cents, if you can come up with a different idea that you believe can work for the usecases described above feel free to give that a go as well. 👍 Thanks for your effort in looking into this 🚀 ! |
Awesome 👍 thanks for the reply, I'll have a think and see what I can do over the weekend. I haven't ever played the game so I'm kind of picking up bits and pieces - thanks for explaining! thx |
- adds `getPlanetFieldMax` to planet service, so we can easily get the field_max value. - Adds a getBuildingCount on the planet service, that sums the levels of the Building and Station Objects - removes old building queue service changes ( no longer needed ) - Added building max / building count to overview and planet tool tips - Adds tests
@lanedirt This is now ready for review, and does the following:
|
Hi @jackbayliss, I just tested the changes, and everything looks and works great! Excellent job finding and reusing the existing While testing the planet field size game logic, I noticed additional game-related logic improvements that can be worked on now, thanks to the foundation laid in this PR. For more information see:
Merging this PR now, thanks again! 🚀 |
This I believe is the beginning of #143 so I've marked this as a draft for more detail.
I'm not sure where the /188 comes from, does this also need to be generated? Maybe something you can answer @lanedirt - I'm assuming its the max level each building count get to.
This adds a new method to get the buildings associated with the planet, which essentially is just a count on the queue items to see how many items have been built for that planet.. as each built item is just a level, so the count should match.
Feel free to take over and edit 😄
List of things to do: