/* called by: entrance ctrl of the object 'track'. ], s: @/ ^* K) u
*/
v+ D4 f/ V, ?: e& @, T# jis; k! p% T" ^3 ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 x1 f3 B6 `# g" O5 R
do. m+ \( G& ^0 u, e4 @
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 Q$ h/ E. s, B! X if current = @.Destination -- else return- q+ U. i- h# k8 E
then
( p* K- f6 t0 G4 o @.Destination := void; N4 x. S n6 h [- Y( L
if @.occupied then. ?/ S: V6 [7 k g& b
part := @.cont;
6 D3 K( m {% @ @.transpOrder := void;
- M( s& L b* f; P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. u% a4 r; V) @9 Z9 b1 p+ c @,root.eventcontroller.simTime);
3 B% ]$ K. G- U! \ @.HasOrder := false;
' s* g5 F7 `- Y6 q7 |' M @.DrivingHome := true;- |2 q5 s0 O' H. @4 Z/ z
rgManager.tryToStartTransOrder;
- O& F! b p: R9 U if @.Destination = void1 Z" n" A/ T; Y0 v0 `
then -- no transport order for vehicle @ ^( s2 G- g, M$ } Q' o5 v
@.Destination :=
4 P0 |/ ? q+ M rgManager.nearestFreeStation(@,track.~);
+ A0 G- X2 R1 k0 Q newDirection(@); 2 l b5 ?6 ?0 g7 G: r) \; I# p8 l7 o
if @.Destination /= void then% B8 N2 m; g2 z: @
@.Destination.NumReservation :=
: X3 p2 h5 J/ q# U( }, u% i @.Destination.NumReservation + 1;
% A) ?4 e1 X- _- r9 Q end;7 Q9 `6 Y j, \+ H5 _$ b
@.CurrIcon := "drivingHome";' N& Y. k/ {" G2 A$ T
@.DrivingHome := true;/ I1 V# r. T0 X: _" d
end;
& s$ H! ?0 Y0 f+ l6 M: I else -- the vehicle @ is empty, both vehicle and part are in the same dock station* f4 _- B5 g; p5 i8 P
part := @.transpOrder;
6 [/ R. v9 a$ u" S3 k, E part.move(@);-- load part
" f6 s8 c- s; }0 k @.CurrIcon := "load";
1 Y5 K+ i% J% T: d! B h) O GlobalDistObj := part.globDestination;
4 L) h; H- B2 e2 v assignLObj := rgmanager.rgAssignL;
- c9 Z% h( l H. @/ y row := assignLObj.getRowNo(GlobalDistObj);5 }2 g. _% f! d' ^$ U- d' H2 y$ V
if Row = -1 then -- since 70% Y9 f3 u+ H9 j' b* `5 R/ ]7 }
if lan=1 then
* g: r8 y& p. T$ b) y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 F- M9 T8 S* M0 c; l( V
to_str("in der Andockstation: \"",?.~.name,"\""));
7 m! d% C5 _, v9 f& E7 _, x* e else
2 U8 M" E1 Y: S7 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 H& l% ?" S8 K: K
to_str("in docking station: \"",?.~.name,"\""));
& R" t' N; {7 i" K end;- H3 p" M" L. L) p' k
else
+ {. \' ^5 F. h0 G @.Destination := assignLObj[1,row];# K* y+ L) O) A2 D2 {) W& `; O1 v
end;
2 Y6 W; N% @2 t. W4 a) e newDirection(@);* o* b2 {$ j- ]' s: q, X5 C! U
@.HasOrder := true;5 K# B' q+ M! p( N! G
end;
; n8 Y) ] t% q/ |0 j end;5 ~/ j1 v4 f% L
end; -- of the method8 R0 r# [% g9 ~% u
|