Skip to content

Change the conditions the train settings button appears under.#16

Merged
stacode123 merged 2 commits intostacode123:1.20.1-C6from
K2568:1.20.1-C6-PR
Mar 12, 2026
Merged

Change the conditions the train settings button appears under.#16
stacode123 merged 2 commits intostacode123:1.20.1-C6from
K2568:1.20.1-C6-PR

Conversation

@K2568
Copy link
Contributor

@K2568 K2568 commented Mar 11, 2026

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.

Copilot AI review requested due to automatic review settings March 11, 2026 17:57
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 StationScreenMixin so the settings button visibility no longer depends on disassembleTrainButton.active.
  • Add settings.png texture under assets/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;
Copy link

Copilot AI Mar 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ignore this, i accidentally put disassemble instead of edit settings.

@stacode123 stacode123 merged commit efaaa8e into stacode123:1.20.1-C6 Mar 12, 2026
4 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants