News:

Simutrans Tools
Know our tools that can help you to create add-ons, install and customize Simutrans.

PR#586 - Patch: Record last selected livery for each waytype

Started by Ranran(retired), November 12, 2022, 12:54:40 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Ranran(retired)

Hi. New patches have been harvested as the Jalapagos is fall. (´・ω・`)

Patches help players choose a livery scheme.
Record the last selected livery scheme for each waytype in each player's save data.
Previously it was not only player-insensitive, it was also waytype-insensitive and only had one value. (However, I discovered that this reselection functionality is currently broken by a bug)  :-[

Air companies and bus and rail companies are generally different companies, which means they have to use different livery schemes.
For example you have selected British Airways in the aircraft hangar, but when you go to the railway depot, there is no such livery, so you manually select your preferred livery scheme, eg LNER.
But when you open the aircraft hangar dialog again, it won't automatically select British Airways because you selected LNER in the depot last time.  ::-\  Because that record has already been erased by you overwriting it with LNER. :thumbsup: (However, the auto-reselect feature is currently broken, as mentioned above.)

So my point is that if it does not record it per waytype, the automatic reselection feature of the livery scheme will hardly work unless the player is dedicated to one waytype.

This patch remembers when it successfully applies the correct livery at the depot and stores it as a candidate for automatic selection next time.
This is expected to eliminate some of the hassle of selecting the player's preferred livery.

Also changed the livery applied to convoy and line in depot to be initially selected.

Previously, registering a new vehicle would apply the default livery even though you set the livery to the line. Because in many cases an invalid livery scheme has been chosen by default that has nothing to do with what is applied to the line.
This has resulted in a livery mismatch of convoys belonging to a line, and players have been forced to work on unifying the livery of the line again. (Only the copy convoy function has become sane recently)
Such annoyances will be eliminated.  ;)

:warning: Since this function affects save data, the save version is incremented.

I hope people can enjoy the colorful world. (´・ω・`)



EDIT:
This branch was merged into ex15 and confirmed working. You can get the executable from Git action.
https://github.com/Ranran-the-JuicyPork/simutrans-exp/actions/runs/3446551661

The livery scheme list is already broken in the ex15 branch as reported, but this patch seems to work nonetheless.
Due to an existing bug in ex15 livery schemes are not filtered and many duplicated livery schemes pollute the list, but choose the correct index.
ひめしという日本人が開発者達の助言を無視して自分好みの機能をextendedに"強引に"実装し、
コードをぐちゃぐちゃにしてメンテナンスを困難にし(とりわけ道路と建物関連)、
挙句にバグを大量に埋め込み、それを知らんぷりして放置し(隠居するなどと言って)別のところに逃げ隠れて自分のフォーク(OTRP)は開発を続けている
その事実と彼の無責任さに日本人プレイヤーは目を向けるべき。らんらんはそれでやる気をなくした(´・ω・`)
他人の振り見て我が振り直せ。ひめしのようにならないために、らんらんが生み出したバグや問題は自分で修正しなくちゃね(´・ω・`)

jamespetts

Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.