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

Track type normalising duplication in Game Actions #13047

Closed
Gymnasiast opened this issue Sep 30, 2020 · 6 comments · Fixed by #21553
Closed

Track type normalising duplication in Game Actions #13047

Gymnasiast opened this issue Sep 30, 2020 · 6 comments · Fixed by #21553
Labels
good-first-issue Low hanging fruits good for people new to open source or OpenRCT2. refactor A task that will improve code readability, without changing outcome.

Comments

@Gymnasiast
Copy link
Member

Many game actions contain this code:

        switch (_trackType)
        {
            case TRACK_ELEM_BEGIN_STATION:
            case TRACK_ELEM_MIDDLE_STATION:
                comparableTrackType = TRACK_ELEM_END_STATION;
        }

This should be put into a function. "NormaliseTrackType", for example.

@Gymnasiast Gymnasiast added refactor A task that will improve code readability, without changing outcome. good-first-issue Low hanging fruits good for people new to open source or OpenRCT2. labels Sep 30, 2020
@SGunner2014
Copy link
Contributor

Mind if I attempt this?

@tupaschoal
Copy link
Member

Go ahead!

@raacker
Copy link
Contributor

raacker commented Oct 17, 2020

@SGunner2014 Any update for this?

@duncanspumpkin
Copy link
Contributor

This was attempted before but we came to the conclusion that there is a different helper function that should be used instead.

@duncanspumpkin
Copy link
Contributor

See #13069

@shakthi124
Copy link
Contributor

Hi, I put in a pull request for this here: #21553

Gymnasiast pushed a commit to shakthi124/OpenRCT2 that referenced this issue May 29, 2024
…emoveAction

Co-authored-by: Gymnasiast <gymnasiast90@users.noreply.github.com>
Gymnasiast pushed a commit to shakthi124/OpenRCT2 that referenced this issue May 29, 2024
…emoveAction

Co-authored-by: Gymnasiast <gymnasiast90@users.noreply.github.com>
Gymnasiast pushed a commit to shakthi124/OpenRCT2 that referenced this issue May 29, 2024
…emoveAction

Co-authored-by: Gymnasiast <gymnasiast90@users.noreply.github.com>
Gymnasiast added a commit that referenced this issue May 29, 2024
Co-authored-by: Gymnasiast <Gymnasiast@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good-first-issue Low hanging fruits good for people new to open source or OpenRCT2. refactor A task that will improve code readability, without changing outcome.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants