OpenRCT2 / OpenRCT2/OpenRCT2

Create format code for height with decimals

Open
#22,934 5 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

  • #23095 by @allison-no — closed without merging
refactor
Dominant language
C++
Stars
16.2k
Forks
1.9k
Avg merge
1d 20h
Merged PRs (30d)
80

Description

There are currently two in-game windows that use height properties. The first is the Cut-away View window (ViewClipping.cpp), which uses it to display the vertical cut height. The second is the Map Generator window (MapGen.cpp), which display several height properties used in the map generation process. Both implementations are different, and neither use the {HEIGHT} format code.

Both windows should be made to use a new format code to show height with two decimal places, e.g. {HEIGHT2DP}. This new format code should take the user's preferred units into account (metres, feet, in-game units).

An implementation of this issue should tick the following boxes:

  • Create new HEIGHT2DP format code.
  • Recycle the 'suffix' strings from the ViewClipping window (STR_UNIT1DP_NO_SUFFIX, STR_UNIT1DP_SUFFIX_FEET, STR_UNIT2DP_SUFFIX_METRES)
  • Use new HEIGHT2DP format code in ViewClipping window
  • Use new HEIGHT2DP format code in MapGen window

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

Read the current height handling in ViewClipping.cpp and MapGen.cpp, comparing how each window formats and displays its height properties. The work is done when HEIGHT2DP exists, reuses the named suffix strings, and is used by both windows while respecting metres, feet, and in-game units.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.