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

Default all conditionals to 0 #1982

Merged
merged 1 commit into from
Jun 1, 2024
Merged

Default all conditionals to 0 #1982

merged 1 commit into from
Jun 1, 2024

Conversation

nguyentvan7
Copy link
Collaborator

Describe your changes

  • Default all conditionals to 0 inside sr-formula.
    • If we ever have a NumConditional that uses prod ex for some reason, we will need to have a new entry in qt for condWithDefaultOne or something. Otherwise, this default 0 will cause those conditionals to always be 0. That would require there to be a use case where 2 values are writing to the same conditional for some reason, which doesn't really make sense.
  • Add a default value to ListConditionals to have def (default 0) when set to 0 (such as above)

Issue or discord link

Testing/validation

Tested using WIP CalcContext that contains hard-coded conditional data. Default value was working as expected, and a specified conditional would override this default.

Checklist before requesting a review (leave this PR as draft if any part of this list is not done.)

  • I have commented my code in hard-to understand areas.
  • I have made corresponding changes to README or wiki.
  • For front-end changes, I have updated the corresponding English translations.
  • I have run yarn run mini-ci locally to validate format and lint.
  • If I have added a new library or app, I have updated the deployment scripts to ignore changes as needed

@nguyentvan7 nguyentvan7 added the SRO For Star Rail Optimizer label Apr 17, 2024
@nguyentvan7 nguyentvan7 requested a review from lantua April 17, 2024 03:39
Copy link
Contributor

github-actions bot commented Apr 17, 2024

[sr-frontend] [Wed Apr 17 03:41:39 UTC 2024] - Deployed c167721 to https://genshin-optimizer-prs.github.io/pr/1982/sr-frontend (Takes 3-5 minutes after this completes to be available)

[Sat Jun 1 01:14:14 UTC 2024] - Deleted deployment

@nguyentvan7 nguyentvan7 merged commit b95884e into master Jun 1, 2024
14 checks passed
@nguyentvan7 nguyentvan7 deleted the van/sro/defaultCond branch June 1, 2024 01:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SRO For Star Rail Optimizer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants