Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change rail quality #5

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Change rail quality #5

wants to merge 12 commits into from

Conversation

WhistleWiz
Copy link

Adds options to change the quality of the track.

Since this alters the geometry of the rails (by scaling it), it is possible this will affect physics.

I have yet to test this code but thought of making a PR to get some early feedback.

@WhistleWiz
Copy link
Author

On an additional note, should there also be an option to change the track bed quality? Similar options (kink scale and frequency) are available in BaseType, and should be able to do exactly this.

@Insprill
Copy link
Owner

Everything looks good to me at a glance. Would it make sense to tie track bed quality to the rail quality?

@WhistleWiz
Copy link
Author

I thought about that, but I'd honestly need to see how it looks ingame. Hopefully also not too much contrast when next to switches...

Increased Disused preset badness by 50%.
@WhistleWiz WhistleWiz marked this pull request as ready for review July 20, 2024 01:47
@WhistleWiz
Copy link
Author

There's an issue I can't figure out, but it seems to only apply the changes after going into the game and back to the menu again.

@WhistleWiz
Copy link
Author

That issue is now fixed, also covers the ballast width not changing.
The EquiPointSet for the track bed and quality was being cached on Awake. When RailwayMeshGenerator searched for RailTrack objects, Awake had already been called on them and so couldn't be changed.
The whole loop was thus moved to an Awake patch on each track.

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.

2 participants