Skip to content

Commit

Permalink
Fix custom messages not being able to use full screen width
Browse files Browse the repository at this point in the history
  • Loading branch information
Kenny-Hui committed Nov 25, 2024
1 parent e9c189e commit e1c13df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 19 deletions.
20 changes: 2 additions & 18 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,11 @@
## (JCM v2.0.0 beta.5) for (MTR 4.0.0-beta.12) has been released!
## (JCM v2.0.0 beta.6) for (MTR 4.0.0-beta.12) has been released!

**New:**
- **Added Scripted PIDS Preset**
- - Create custom PIDS with JavaScript!
- - Experimental, feedback needed!
- - Documentation and Example Pack available at https://www.joban.org/wiki/JCM:Scripted_PIDS_Preset
- JSON PIDS Preset
- - You can now set `textOverflowMode` as a property (string), possible value are `STRETCH`, `SCALE`
- - PIDS Variable are reintroduced, just like in JCM v1.
- - - `{worldPlayer}` are not implemented, and will return `?` for now.
- PIDS Preset (JSON/Scripted)
- - You can now set `name` as a property (string) to show a user-friendly name shown in the UI
- - You can now set `blacklist` as a property (String JSON Array) to prevent your preset from being used in certain PIDS:
- - - Possible values for inclusion are `rv_pids`, `rv_pids_sil_1`, `rv_pids_sil_2`, `lcd_pids`, `pids_1a`, `pids_projector`

**Changes**
- The PIDS 1A block now also supports PIDS Preset
- - A new PIDS Preset "PIDS 1A" is introduced to replicate the PIDS 1A look.
- "Use Custom Font" config in JCM is removed, now instead now follows MTR "Use MTR Font" settings.

**Fixes:**
- Fix LRT Inter-Car barrier breaking when flooded with water
- Fix West Rail Line Double Ceiling Block not being able to be placed
- Fix custom messages in JSON PIDS not being able to use full screen width

**Download:**
You can download this release on [Modrinth](https://modrinth.com/mod/jcm) or [GitHub](https://github.com/DistrictOfJoban/Joban-Client-Mod/releases)
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ public List<PIDSComponent> getComponents(ObjectArrayList<ArrivalResponse> arriva


if(customMessages[i] != null && !customMessages[i].isEmpty()) {
components.add(new CustomTextComponent(x, rowY, totalWidth, 10, TextComponent.of(TextAlignment.LEFT, textOverflowMode, fontId, getTextColor(), ARRIVAL_TEXT_SCALE).with("text", customMessages[i])));
components.add(new CustomTextComponent(x, rowY, screenWidth - (PIDS_MARGIN * 3), 10, TextComponent.of(TextAlignment.LEFT, textOverflowMode, fontId, getTextColor(), ARRIVAL_TEXT_SCALE).with("text", customMessages[i])));
} else {
if(arrivalIndex >= arrivals.size()) continue;

Expand Down

0 comments on commit e1c13df

Please # to comment.