Skip to content
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

Converted mutation point cost to float #4154

Closed
wants to merge 5,917 commits into from
Closed

Conversation

athariqk
Copy link
Member

Brief Description of What This PR Does

As discussed in #4150. MP is rounded to 3 fractional digits in the GUI elements.

Of course needs further testing.

Related Issues

Fixes #4150.

Progress Checklist

Note: before starting this checklist the PR should be marked as non-draft.

  • PR author has checked that this PR works as intended and doesn't
    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)
  • Initial code review passed (this and further items should not be checked by the PR author)
  • Functionality is confirmed working by another person (see above checklist link)
  • Final code review is passed and code conforms to the
    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.

simsanutiy and others added 30 commits December 8, 2022 09:03
Currently translated at 90.7% (1214 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/ru/
Currently translated at 99.8% (1336 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/zh_Hans/
Currently translated at 84.7% (1134 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 86.9% (1164 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 90.2% (1207 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 90.5% (1211 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 90.5% (1212 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 90.5% (1212 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 90.5% (1212 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 90.6% (1213 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 92.6% (1239 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 92.6% (1240 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 92.6% (1240 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 92.6% (1240 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Currently translated at 93.4% (1250 of 1338 strings)

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Updated by "Update PO files to match POT (msgmerge)" hook in Weblate.

Translation: Thrive/Thrive Game
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/
…hrive-thrive-game

Translations update from Thrive - Weblate
…n the cell (#3926)

* Add guard for taking negative compounds and remove apparently unnecessary multiplier

* Remove extra change and add comment

Co-authored-by: Henri Hyyryläinen <henri.hyyrylainen@gmail.com>
* Updated submodule

* Updated translation progress

* Updated credits

* Bump version to 0.6.0

* Updated the JSON and zip library versions

* Update submodule again

* Revert update to SharpZipLib as it caused broken saves

follow up issue: #3925

* Explain the multiply by 2 in the compound venting threshold
* Rebalanced photosynthesis and reproduction

* Significantly reduced iron amount in small chunks

* Fixed format mistake
… compounds in patch details (#3931)

* Remove unused ComputeRandomRadianRotation function

Closes #3883

* Remove '%' suffix from patch details

Closes #3909

* Fix culture with ToString

* Fix indentation

* Add using directive
Currently translated at 90.7% (1214 of 1338 strings)

Co-authored-by: tabat-dectocoder <aliks234066aliks@gmail.com>
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/ru/
Translation: Thrive/Thrive Game
Currently translated at 100.0% (1338 of 1338 strings)

Co-authored-by: Pan Shoucheng <848516934@qq.com>
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/zh_Hans/
Translation: Thrive/Thrive Game
Currently translated at 99.8% (1336 of 1338 strings)

Translated using Weblate (Finnish)

Currently translated at 59.1% (791 of 1338 strings)

Co-authored-by: Henri Hyyryläinen <hhyyrylainen@revolutionarygamesstudio.com>
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/fi/
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/zh_Hans/
Translation: Thrive/Thrive Game
Currently translated at 94.3% (1263 of 1338 strings)

Translated using Weblate (English)

Currently translated at 100.0% (1338 of 1338 strings)

Co-authored-by: Sur3 <sur3@gmx.de>
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/en/
Translation: Thrive/Thrive Game
Currently translated at 94.3% (1263 of 1338 strings)

Co-authored-by: Allstreamer <cbredenbach@gmail.com>
Translate-URL: https://translate.revolutionarygamesstudio.com/projects/thrive/thrive-game/de/
Translation: Thrive/Thrive Game
…hrive-thrive-game

Translations update from Thrive - Weblate
Moved a few more platform handling methods to the common module from scripts
)

* Added in proper prevention of absorbing negative compound amounts

* Simplified one line of the AI code

automatically by my IDE

* Adjusted a comment

* Updated submodule
athariqk and others added 10 commits February 24, 2023 20:56
* Added multicellular prototype axon and myofibril organelles

they don't really do anything yet but can be placed

* Added translations

* Tweaked the axon visuals and the size of the myofibril
* Add auto-evo prediction calculating icon

* Clarified file name

* Costumizable change indicator's rect size

* Fix wonky size

* Make invalid icon size be the same as the normal icon size by default
…pedia museum (#4166)

* Trigger `MainMenu.OnEnteringGame` in autoevo explore tool and thriveopedia museum

* Replace a call to `MarkCurrentVersionAsPlayed` in save load to `OnEnteringGame`.
Bumps [Microsoft.CodeAnalysis.CSharp](https://github.com/dotnet/roslyn) from 4.4.0 to 4.5.0.
- [Release notes](https://github.com/dotnet/roslyn/releases)
- [Changelog](https://github.com/dotnet/roslyn/blob/main/docs/Breaking%20API%20Changes.md)
- [Commits](https://github.com/dotnet/roslyn/commits)

---
updated-dependencies:
- dependency-name: Microsoft.CodeAnalysis.CSharp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@hhyyrylainen
Copy link
Member

Is the rigidity handling for when no new step is permitted due to being out of MP now handled correctly here? Those are the only files in this PR I've not marked as read by me.

@athariqk
Copy link
Member Author

Working on it.

Comment on lines +976 to +978
// int stepsToCutOff = (int)Math.Ceiling((cost - Editor.MutationPoints) / costPerStep);
// data.NewRigidity -= (desiredRigidity - previousRigidity > 0 ? 1 : -1) * stepsToCutOff /
// Constants.MEMBRANE_RIGIDITY_SLIDER_TO_VALUE_RATIO;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code made the slider able to stop at a maximum affordable MP when you jump out of the affordable range.

I can't figure out the maths for this, this always breaks at certain cost multipliers so I commented this out and the glitchy bug is fixed at least.

protected float GetAdjustedCost(float cost)
{
return Mathf.Clamp(
cost * CostMultiplier, Constants.MINIMUM_MUTATION_POINTS_COST, Constants.BASE_MUTATION_POINTS);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this is the cause that breaks the mutation point math.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is required to cap MP at a minimum as hh requested, a fix in spite of this is needed.

@hhyyrylainen
Copy link
Member

I assume there's still some fixing to be done on this, @-mention me if I miss when this is actually functionally ready.

@hhyyrylainen
Copy link
Member

I will perform a repository history rewrite on the Thrive repo on the 26th of June. This will cause a small disruption for PRs, which is possible to avoid if the PR can be merged before that.

For more info see: https://forum.revolutionarygamesstudio.com/t/rewriting-the-repository-history-to-remove-large-binary-files/991

@revolutionary-bot
Copy link

We are currently in feature freeze until the next release.
If your PR is not just a simple fix, then it may take until the release to get reviewed and merged.

@github-actions
Copy link

This PR has been inactive for a while and as such is being marked
stale. This PR will be automatically closed if this stays stale
for a while.

If this is still being worked on / will probably resume work at
some point please feel free to continue working on this and reopen
this in case this was already automatically closed.

@github-actions github-actions bot added the stale label Sep 25, 2023
@github-actions
Copy link

This PR is being automatically closed due to being stale. Please
only reopen this if work is actually resuming on this PR. We have
automatic PR closing to make sure that PRs that never get finished
aren't forever hanging out in the list of open PRs.

@github-actions github-actions bot closed this Oct 26, 2023
Thrive Planning automation moved this from In progress to Done Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

Rigidity slider breaks when trying to move it at exactly 0 MP