-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implementation of Planetary Statuses #690
Conversation
f8d631a
to
4344e6f
Compare
Could everything except that climatic change random event done with these planetary statuses? I don't understand why you removed planetary events that would do all those effects on planets. Reason why there is that planetary event attribute on planet is that player cannot cheat if bad effect is on planet by loading and trying again. If you would keep those events that would not break the spawning balance. After event has happened that could be removed and just use the planetary statuses. Or Am I missing totally the point of this pull request? |
There was very messy in-code representation of planetary status and event. "Status" was represented via "persistent event", which was nonsense. I scrapped entire code for "persistent events", taking events for "good/bad planetary condition" with it. I indeed could do it like you say, make an event apply a status to planet after event activation. I didn't do so, because I refuse to add hacks just because of existing bad design. Think about it like this:
Maybe just a little bit 🙂 . It is about adding a feature while reducing technical debt. |
4344e6f
to
46f4709
Compare
src/main/java/org/openRealmOfStars/starMap/randomEvent/BadRandomType.java
Show resolved
Hide resolved
src/main/java/org/openRealmOfStars/starMap/randomEvent/GoodRandomType.java
Show resolved
Hide resolved
src/test/java/org/openRealmOfStars/ai/planet/PlanetHandlingTest.java
Outdated
Show resolved
Hide resolved
So when this pull request is merged, need to do issue about it.
Sounds good and would make sense.
I am just worried some tries master and it does not work. I have usually done changes that add new features which cannot be done in few changes, in separate branch and then that is later merged to master. |
Remove some presistent PlanetaryEvents that were statuses, without replacement. Remove CLIMATE_CHANGE galactic event. Remove some tests and modify others to accomodate for PlanetaryStatuses.
More flexible, with safety checks, one hundred lines less, all of this while adding empty newlines for readability
46f4709
to
a25978a
Compare
It does work, just messes up balancing (hardly an issue in "nightly") and breaks saves (not an issue at all, see below).
Only logical thing is to remove the game save-loading test altogether, then write a proper save-loading system which handles save migration. Which is out of scope of this PR. And finally, tests are irrelevant for the player. |
Implements
PlanetaryStatus
andAppliedStatus
classes. See GH-676.Planetary Statuses definitions are loaded from JSON files, as per GH-666, applied statuses are stored in save games. PlanetaryStatuses are not used anywhere in the game and there are no statuses even defined.
This change breaks saves.
Removes "permanent planetary events" feature, which was used as statuses 😒 . Without replacement.
Removes a lot of tests.
Removes Climate change galactic event and mechanic.
Breaks balancing of spawning of planetary events - I will not fix that.