separate forbid 90 degrees for trains and ships patch

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
xarick
Transport Coordinator
Transport Coordinator
Posts: 341
Joined: 26 Feb 2015 00:52

separate forbid 90 degrees for trains and ships patch

Post by xarick »

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)

v2
- simplified the whole patching mess by reverting the variable name 'forbid_90_deg_trains' back into 'forbid_90_deg' while still maintaining its new behaviour.
- also reverted string names 'STR_CONFIG_SETTING_FORBID_90_DEG_TRAINS' and 'STR_CONFIG_SETTING_FORBID_90_DEG_TRAINS_HELPTEXT' back to 'STR_CONFIG_SETTING_FORBID_90_DEG' and 'STR_CONFIG_SETTING_FORBID90_DEG_HELPTEXT'.
- this vastly decreases the number of changes when patching.

[+] Spoiler
õld version (v1)
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 english
- the old strings have been removed from all language files, if found
Formerly known as Samu
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: PikkaBird and 19 guests