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

typed tripoints in iexamine functions #76722

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mqrause
Copy link
Contributor

@mqrause mqrause commented Sep 29, 2024

Summary

None

Purpose of change

Typed tripoints.

Describe the solution

Convert tripoints mostly to tripoint_bub_ms.
I focused on the iexamine functions present in iexamine_functions_from_string.

Describe alternatives you've considered

Testing

todo

Additional context

I think after this I'm done for now with tripoint conversions.

@github-actions github-actions bot added Info / User Interface Game - player communication, menus, etc. Vehicles Vehicles, parts, mechanics & interactions Code: Tests Measurement, self-control, statistics, balancing. [C++] Changes (can be) made in C++. Previously named `Code` EOC: Effects On Condition Anything concerning Effects On Condition astyled astyled PR, label is assigned by github actions json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Sep 29, 2024
Copy link
Contributor

@PatrikLundell PatrikLundell left a comment

Choose a reason for hiding this comment

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

  • activity_actor.cpp: I don't really understand the "tripoint_bub_ms()" syntax, although I guess it defaults to tripoint_zero as its parameter. Is there a reason for not using tripoint_bub_ms_zero?
  • iexamine.cpp line 5469-70->5465: I think this is wrong and "-" should be "+" as the "minus" is built into the tripoint itself.
  • 5526-28->5521-22: ditto
  • 5530-31->5524-24: ditto

@PatrikLundell
Copy link
Contributor

Note that this PR will clash with #76712, causing merge conflicts. As such, they shouldn't be merged concurrently. Merging is probably not going to be much of an issue itself, though.

@mqrause
Copy link
Contributor Author

mqrause commented Sep 30, 2024

  • activity_actor.cpp: I don't really understand the "tripoint_bub_ms()" syntax, although I guess it defaults to tripoint_zero as its parameter. Is there a reason for not using tripoint_bub_ms_zero?

It simply defaults to the default value of the underlying point type, so {0,0,0} for a tripoint. And I think I wrote that before I noticed we have constants for the typed points. Might actually be best to use the _min one, to make clear it's an uninitialized value just needed to create the object. These PRs of the last couple days were more or less written in reverse order upon realizing how deep the typed point rabbit hole goes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions [C++] Changes (can be) made in C++. Previously named `Code` Code: Tests Measurement, self-control, statistics, balancing. EOC: Effects On Condition Anything concerning Effects On Condition Info / User Interface Game - player communication, menus, etc. json-styled JSON lint passed, label assigned by github actions Vehicles Vehicles, parts, mechanics & interactions
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants