Change the conditions the train settings button appears under.#16
Change the conditions the train settings button appears under.#16stacode123 merged 2 commits intostacode123:1.20.1-C6from
Conversation
There was a problem hiding this comment.
Pull request overview
Adjusts when the train settings button is shown in the station UI and adds the missing settings icon texture to support that UI element.
Changes:
- Update
StationScreenMixinso the settings button visibility no longer depends ondisassembleTrainButton.active. - Add
settings.pngtexture underassets/realism/textures/gui/for the settings icon.
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
common/src/main/java/net/Realism/mixin/client/StationScreenMixin.java |
Loosens the UI condition for showing the settings button. |
common/src/main/resources/assets/realism/textures/gui/settings.png |
Adds the missing GUI texture referenced by AllRealismIcons. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| @Unique | ||
| private void alignAndToggleSettings() { | ||
| realism$settingsButton.visible = this.disassembleTrainButton.visible && this.disassembleTrainButton.active; | ||
| realism$settingsButton.visible = this.disassembleTrainButton.visible; |
There was a problem hiding this comment.
The PR description says this change enables trains to be disassembled in additional situations, but this line only changes when the settings button is shown (it no longer depends on disassembleTrainButton.active). If the intent is purely UI/UX (show settings even when disassemble is disabled), consider updating the PR description accordingly; if the intent is to change disassembly rules, that logic likely lives elsewhere and won’t be affected by this change.
There was a problem hiding this comment.
Ignore this, i accidentally put disassemble instead of edit settings.
Removing " && this.disassembleTrainButton.active" from line 63 of "common/src/main/java/net/Realism/mixin/client/StationScreenMixin.java" allows trains settings to be changed while standing on curves, slopes, diagonal track or while not fully loaded in.
I made sure to test all these scenarios and it all worked fine with no crashes or errors.
I also added the settings.png texture cuz it was missing from the repo.