OpenRCT2 / OpenRCT2/OpenRCT2

Refactor Ride::vehicles

Open
#15,359 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

refactor
Dominant language
C++
Stars
16.2k
Forks
1.9k
Avg merge
1d 20h
Merged PRs (30d)
80

Description

For one Ride::vehicles is really trains. And for two the size of it is wrong. There is always a null element as you can only ever have 31 trains for one ride. It should be modified to make the size 31 and the name to be TrainHeads.

Extracted from #15329

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the Ride::vehicles declaration and all references to it. Rename it to TrainHeads and change its size to 31, then build the project and verify that all references compile without the extra null element.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
game-dev
Issue type
Refactor
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.