/* called by: entrance ctrl of the object 'track'. H2 h, G; ^2 q) l" U
*/
- l, ]9 p+ J$ U; m! {- v& m$ yis
& g! l9 W9 n; ]! A% w6 n part, GlobalDistObj, assignLObj:object;row,Lan:integer;' `$ I% k! B6 n1 u. v
do
0 o2 Z' V' [9 |% M2 a0 V, G Lan := rootfolder.Internal.Tools.AOLlanguage;
, e0 f, \4 G# K1 s# P: k0 ^+ N if current = @.Destination -- else return/ I# t" c0 S3 N$ u) W h9 _
then
1 W# D) j) r7 C: C7 R. y @.Destination := void;
. K3 @! \1 s: B; ^. o if @.occupied then4 l5 ?% G/ u+ `$ `. |( B
part := @.cont;3 y+ H( s: A0 g) z
@.transpOrder := void;, j6 Y1 C: e+ @/ L: r) a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 @5 N o/ Q s @,root.eventcontroller.simTime);
1 M* ^1 w; I7 R7 f) e @.HasOrder := false;
8 g/ f0 a2 o ]& l9 G# W$ T @.DrivingHome := true;2 ?: P; X4 H3 ]; Z- Q) J# L
rgManager.tryToStartTransOrder;+ r6 }9 I0 ?! v8 u! Y' t7 x
if @.Destination = void4 H8 I1 P# x( H" k6 }& e
then -- no transport order for vehicle @
' @2 v# a2 [& }/ G/ k4 k @.Destination :=
r$ S7 L* F9 w3 V: k* b rgManager.nearestFreeStation(@,track.~);; s( _7 }4 O& t
newDirection(@);
' k3 ~) ^7 n2 k4 g0 `3 g) A. \8 q if @.Destination /= void then: d8 F9 U9 P3 D
@.Destination.NumReservation :=
; A; S3 y4 @' s1 N2 c @.Destination.NumReservation + 1;* d' `! p& l5 x. `$ D
end;: Q" v5 e# D& a) _- T
@.CurrIcon := "drivingHome";5 x; M4 ]( c+ `# C7 K, _( q7 `; w, }
@.DrivingHome := true;
7 b4 q$ A2 ]" B; e# _' m end;( ], t4 u% Z1 o' _+ u# y2 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- [/ A# R$ X" C" n# Z: A& X# y
part := @.transpOrder;# a; N" R$ O4 g
part.move(@);-- load part
" u5 R6 _7 ]; G; b3 R8 ?- [( x& z( r @.CurrIcon := "load";
/ V# X" K+ R( t/ @ GlobalDistObj := part.globDestination;
* d/ l/ }4 ~7 A, F+ O# ]: s assignLObj := rgmanager.rgAssignL;
" ~$ D" h! x0 A8 h" c4 d6 I$ @1 H row := assignLObj.getRowNo(GlobalDistObj);6 s# x0 i8 ^4 ]4 R, A
if Row = -1 then -- since 70
$ ~5 Y+ l* X& z: _( G if lan=1 then
; }9 D$ {, O3 Q/ i4 A3 p! a2 S$ j% J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ d- H0 P& j8 y" G9 H! Y to_str("in der Andockstation: \"",?.~.name,"\""));
L( m8 K$ o7 |( G* Z else/ }! c; I7 P$ ? Z- ^: f8 B( O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 S: o+ y( ~2 \ to_str("in docking station: \"",?.~.name,"\""));
% y. m+ M- X0 ?* n2 a end;" \0 y8 A2 ^3 [; f& D) W- x
else. c8 F- f- i1 d3 h* c/ ~
@.Destination := assignLObj[1,row];+ u, _$ g$ [5 o r
end; 5 K Q- q, x! T; x
newDirection(@);5 } z7 i0 l7 R' I0 o; \
@.HasOrder := true;
% W a2 m0 Z/ e$ Z2 T end;
, [# X: o/ ?/ C {4 K$ e end;' q' N! U; I$ @' W# r8 X
end; -- of the method
& R O, I8 c7 K |