pause running costs on standard road stops 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

pause running costs on standard road stops patch

Post by xarick »

While a road vehicle is loading or unloading from a lorry or bus station with bays (non drive through), the running cost of the vehicle is paused.

The goals with this patch were a few:
- simulate engines being turned off
- another differentiation between standard road stations and drive through road stations
- improve profit for short distance routes




I was told to make a newGRF instead to achieve the same goal, but when I was testing NARS, which implements a similar approach, but for trains, the running cost per year in the detailed train information window was oscillating between the halved value and the non-halved value. Even if the running cost per year is based on the "current running cost", it's still quite misleading. If, for instance, the train is stopped inside a train depot, this "current running cost" is not 0. I'm also not sure if newGRFs can differentiate between standard and drive through road stations. Probably they could, but I'm not motivated enough to make a newGRF at the moment.
v2 is coded differently than v1, and I fixed a noob bug found on v1 :
- checks every tick, instead of every day
- fixed a bug that was allowing running costs to be paused on both types of road stations (I forgot to use parentheses).
[+] Spoiler
old versions:
Formerly known as Samu
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 19 guests