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: Separate forbid 90 deg for trains and ships #7314

Conversation

SamuXarick
Copy link
Contributor

https://www.tt-forums.net/viewtopic.php?p=1184322#p1184322

This patch splits the game setting "Forbid trains and ships from making 90º turns" into 2 separate settings:

  • "Forbid trains from making 90º turns" - this game setting is re-using the value of the old setting for savegame conversion purposes.
  • "Forbid ships from making 90º turns" - this game setting is new and copies the value of the old setting into it during savegame conversion.
  • ship and train pathfinders have hopefully been dealt with, by using their respective vehicle type when checking the values of these settings as separate.
  • new strings are added for ships.
  • the old train strings have their text slighty modified, to accomodate the new behaviour (is for train only)

/* Filter out trackdirs that would make 90 deg turns for trains */
if (_settings_game.pf.forbid_90_deg && (type == TRANSPORT_RAIL || type == TRANSPORT_WATER)) trackdirbits &= ~TrackdirCrossesTrackdirs(src_trackdir);
/* Filter out trackdirs that would make 90 deg turns for trains and ships */
if (_settings_game.pf.forbid_90_deg && type == TRANSPORT_RAIL || _settings_game.pf.forbid_90_deg_ships && type == TRANSPORT_WATER) trackdirbits &= ~TrackdirCrossesTrackdirs(src_trackdir);
Copy link
Member

Choose a reason for hiding this comment

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

Parenthesis!

@@ -291,6 +291,7 @@ enum SaveLoadVersion : uint16 {
SLV_GROUP_LIVERIES, ///< 205 PR#7108 Livery storage change and group liveries.
SLV_SHIPS_STOP_IN_LOCKS, ///< 206 PR#7150 Ship/lock movement changes.
SLV_FIX_CARGO_MONITOR, ///< 207 PR#7175 Cargo monitor data packing fix to support 64 cargotypes.
SLV_FORBID_90_DEG_SHIPS, ///< 208 Separate Forbid 90-deg settings for trains and ships.
Copy link
Contributor

Choose a reason for hiding this comment

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

You can add the PR number now it is open.
It is #7314.

@TrueBrain
Copy link
Member

TrueBrain commented Mar 3, 2019

We should do either this or #7232 (+ #7289 possibly). Personally, I do not see how "forbidding 90 degrees" makes sense for anything else but trains.

@SamuXarick SamuXarick force-pushed the separate-forbid-90-deg-for-trains-and-ships branch from 83df027 to 6659f88 Compare March 3, 2019 14:39
@andythenorth
Copy link
Contributor

We don't need a setting to forbid 90 degrees for ships. I'm closing this one, thanks!

@andythenorth andythenorth reopened this Mar 3, 2019
@andythenorth
Copy link
Contributor

Actually no, let someone else decide. I don't trust my judgement at the moment. Time for a break from OpenTTD.

@TrueBrain
Copy link
Member

No, you were spot on. But to give a bit of argumentation:

Most people favor that no-90-degree is for trains only, so I suggest we pick that path. Scheduled #7232 for 1.10, and closing this in favor of that!

I like that we find multiple solutions for the same problem. Means we can pick the one we like most :) And sorry, this time this isn't yours; possibly next time!

@TrueBrain TrueBrain closed this Mar 3, 2019
@SamuXarick SamuXarick deleted the separate-forbid-90-deg-for-trains-and-ships branch April 11, 2019 21:55
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.

None yet

5 participants