Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon Oct 22, 2018 2:29 am

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Auto separation
PostPosted: Fri Jul 18, 2014 3:39 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
Another auto separation patch. I tried to use the slim auto separation and some other one but I am constantly running into issues I don't like and I don't want to handle them by hand or worse, check if it even works. This version does not need any timetabling, it uses the implicit route times and as such, it handles changes of routes pretty well as it does not need times in timetable to be adjusted by hand. Also I am not setting vehicles to be late to catch up as they probably won't manage that anyway and instead I set others that they are early. The whole synchronization is happening at the first order and as such I heavily recommend to timetable that one, because waiting vehicles will change the implicit value accordingly which is not desired (it makes the whole route looks longer than it is).

Problem(s): -

edit: Problem solved, patch updated.
edit2: Patch which works with my day length patch now included as well.


Attachments:
auto_sep_r26686.patch [10.47 KiB]
Downloaded 97 times
auto_sep_r26686-day_length.patch [11.86 KiB]
Downloaded 77 times

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)
Top
   
 Post subject: Re: Auto separation
PostPosted: Sun Sep 14, 2014 11:05 am 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 2386
Location: Virgo Supercluster
Just wanted to say that it seems to be working. ;) Sort of would've expected the DL one to come with the DL-patch itself, but otherwise straightforward in application and use ^^


Top
   
 Post subject: Re: Auto separation
PostPosted: Sun Sep 14, 2014 7:19 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
One one hand you are right, the "my DL" compatible version doesn't work standalone and as such it could be merged. On the other hand, if anyone would use my true day length patch already (own patch pack usually I guess), it would just complicate things.

Also thanks for the feedback as now I know at least about one person which is running this patch and it seems to work not just for me :) .

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Top
   
 Post subject: Re: Auto separation
PostPosted: Thu Jun 29, 2017 6:28 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Fri Oct 17, 2008 12:17 pm
Posts: 2386
Location: Virgo Supercluster
dunno if anyone is still using this, but it still works with a few small changes:
For src/saveload/order_sl.cpp the CONDVARs need to be VARs
Code:
+      SLE_REF(OrderList, first,              REF_ORDER),
+      SLE_VAR(OrderList, auto_separation,    SLE_BOOL,   200, SL_MAX_VERSION),
+      SLE_VAR(OrderList, separation_valid,   SLE_BOOL,   200, SL_MAX_VERSION),
+      SLE_VAR(OrderList, next_vehicle_ticks, SLE_UINT16, 200, SL_MAX_VERSION),
+      SLE_END()

And the error message thing goes elsewhere now, if I got this right:
Needs to be removed in src/timetable_gui.cpp:
Code:
+
+         case WID_VT_AUTO_SEPARATION:
+            uint32 p2 = 0;
+            if (!v->orders.list->GetAutoSeparated()) SetBit(p2, 0);
+            DoCommandP(0, v->index, p2, CMD_TOGGLE_AUTO_SEPARATION);
+            FOR_ALL_VEHICLES(v) {
+               SetWindowDirty(WC_VEHICLE_TIMETABLE, v->index);
+            }
+            break;

and added in command.cpp:
Code:
+   DEF_CMD(CmdToggleAutoSeparation,                        0, CMDT_ROUTE_MANAGEMENT,      NULL,            GetErrConstant<STR_ERROR_CAN_T_TIMETABLE_VEHICLE>),          // CMD_TOGGLE_AUTO_SEPARATION


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: Eddi and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2018 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2018.
Hosted by Zernebok Hosting.