Patch: Send all trains to depot

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

User avatar
webfreakz.nl
Director
Director
Posts: 627
Joined: 11 Aug 2005 08:22
Location: Localhost, 127.0.0.1, [The Netherlands: South Holland-> Westland]
Contact:

Post by webfreakz.nl »

This patch fails to built under MSVS2005 with the following warning+error:
aircraft_cmd.c
.\aircraft_cmd.c(472) : error C2220: warning treated as error - no 'object' file generated
.\aircraft_cmd.c(472) : warning C4013: 'CheckStoppedInHangar' undefined; assuming extern returning int
And i get the same errors on line 544 (it stops compiling after 472)

So you need to check CheckStoppedInHanger on line 472+544. Thx :)
# Programming is like sex, one mistake and you have to support it for the rest of your life. (Michael Sinz)
Splatman
Engineer
Engineer
Posts: 31
Joined: 31 Jul 2005 16:08
Location: United Kingdom

Post by Splatman »

I will try to have a look later this evening.

Update: Posted a new version in first post that should compile on newer revisions, I havent checked this. I will see if I can get the patch compiled with the MiniIN branch at some time in the next few days.
Hazelrah
Traffic Manager
Traffic Manager
Posts: 196
Joined: 13 Apr 2005 05:41

Post by Hazelrah »

Hey Splatman,

I know I'm digging this up a bit, but would you consider continuing work on it?

Last week I was getting in some serious game play when I decided to try this patch out. Works great!

But while I was using it, I happened to open of a list of trains that go to a particular station. They were still running old engines so I wanted to just depot those two, and not my entire network. Since the "depot all" button was listed there, I pushed it. But all trains, not just those two, went to the depot.

Would it be possible to change it so that it is sensative to the context of the train list? If the train list is only showing a sub set of trains, only send that sub set to the depot.

-Hazelrah
User avatar
Brianetta
Tycoon
Tycoon
Posts: 2567
Joined: 15 Oct 2003 22:00
Location: Jarrow, UK
Contact:

Post by Brianetta »

Hazelrah wrote:Would it be possible to change it so that it is sensative to the context of the train list? If the train list is only showing a sub set of trains, only send that sub set to the depot.
Now that's an idea with some useful implications! Even if you're not planning to change your trains at all, a contextual button like that could also be used to render a given station free of trains ready for a station redesign.
PGP fingerprint: E66A 9D58 AA10 E967 41A6 474E E41D 10AE 082C F3ED
Splatman
Engineer
Engineer
Posts: 31
Joined: 31 Jul 2005 16:08
Location: United Kingdom

Post by Splatman »

Funny you should mention that, I was thinking about doing that anyway. I will look into the possibility sometime today.
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

Splatman wrote:Funny you should mention that, I was thinking about doing that anyway. I will look into the possibility sometime today.
Excellent!! Please post any update on the MiniIN thread as well - it would be great to have some finer control over this feature.

Perhaps link into the "Replace Vehicles" screens so that when you click on "Start Replacing", it does "and send to depot" as well. If you have breakdowns off, and "do not visit depots if breakdowns are off", then although the trains are marked for replacing, they never go to depot to do it! This would sort that problem out beautifully.
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Splatman
Engineer
Engineer
Posts: 31
Joined: 31 Jul 2005 16:08
Location: United Kingdom

Post by Splatman »

rich would it be easier for you if for MiniIN I just upload a patch that adds any new addtions only or a full patch?
Last edited by Splatman on 14 Jul 2006 12:41, edited 1 time in total.
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

richk67 wrote: Perhaps link into the "Replace Vehicles" screens so that when you click on "Start Replacing", it does "and send to depot" as well. If you have breakdowns off, and "do not visit depots if breakdowns are off", then although the trains are marked for replacing, they never go to depot to do it! This would sort that problem out beautifully.
This should be an option which you can turn on and off. For me i do not want to send all vehicles to depot/hangar. They should wait until they drive/fly by a depot/hangar and then replace themself.
I do not want to know what will happen if you send ~30 planes to one single airport and replace them all. I know there is a small bug that planes which wait over 100 days (default service time) in the hangar, roll out of the hangar, roll onto their loading bay and roll back into hangar immediately.

Maybe you can make it turn on and off for each vehicle type individually.
gigajum
Route Supervisor
Route Supervisor
Posts: 511
Joined: 08 Mar 2006 08:33
Location: Germany

Post by gigajum »

Splatman wrote:rich would it be easier for you if for Mini I just upload a patch that adds any new addtions only or a full patch?
A diff file that only contains the difference to the current miniIN branch should work best. So he hast not to delete lines which already exists or solve any confilcts caused by them.
richk67
Tycoon
Tycoon
Posts: 2363
Joined: 05 Jun 2003 16:21
Location: Up North
Contact:

Post by richk67 »

what gigajum said :)
OTTD NewGRF_ports. Add an airport design via newgrf.Superceded by Yexo's NewGrf Airports 2
Want to organise your trains? Try Routemarkers.
--- ==== --- === --- === ---
Firework Photography
Hazelrah
Traffic Manager
Traffic Manager
Posts: 196
Joined: 13 Apr 2005 05:41

Post by Hazelrah »

And if you're not exactly sure on how to do this, read the MiniIN wiki page. It summerizes info that Richk67 posted somewhere in the MiniIN thread.

-Hazelrah

PS. Looking forward to the update!
User avatar
dtb1322
Traffic Manager
Traffic Manager
Posts: 132
Joined: 16 Jan 2007 13:01
Location: New Jersey, USA

Post by dtb1322 »

What is the status of this patch? Was it incorporated into 0.5.0-RC4?
That's not me, that's my dog. -dtb
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 623
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Post by glx »

This patch is not in 0.5.0-RC4 but something similar is. ("manage list" in vehicle list window)
Splatman
Engineer
Engineer
Posts: 31
Joined: 31 Jul 2005 16:08
Location: United Kingdom

Post by Splatman »

As far as I am aware it was coded from scratch and put in the trunk, but as to whether its in 0.5 I have no idea.
User avatar
dtb1322
Traffic Manager
Traffic Manager
Posts: 132
Joined: 16 Jan 2007 13:01
Location: New Jersey, USA

Post by dtb1322 »

Thank you, I will check out "Manage List".

I am looking for a way to just send all the trains that go to a particular station or all the trains that are on this particular route to the depot so that I can upgrade them to maglev.
That's not me, that's my dog. -dtb
User avatar
glx
OpenTTD Developer
OpenTTD Developer
Posts: 623
Joined: 02 Dec 2005 15:43
Location: Drancy(93) - France
Contact:

Post by glx »

You can :)
Just open the station details, there are some buttons in right bottom of it for opening the list of all vehicles having it in their orders.
User avatar
dtb1322
Traffic Manager
Traffic Manager
Posts: 132
Joined: 16 Jan 2007 13:01
Location: New Jersey, USA

Post by dtb1322 »

Thank you, that will be most helpful.
That's not me, that's my dog. -dtb
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 18 guests