/* called by: entrance ctrl of the object 'track'
; L: G' }; B$ c, Z/ r$ n/ r5 {*/) J2 F1 ?( y4 O9 F6 d' u# Y
is: _; G7 L' H7 y9 Y7 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, Z$ a4 V: j% z
do
1 S7 S K/ ?9 \; M5 u- o- ?( h Lan := rootfolder.Internal.Tools.AOLlanguage; E j5 Q) o( J
if current = @.Destination -- else return3 U1 |: Q( f. t. g: ]
then" g7 R8 m5 A6 v6 S* L/ @
@.Destination := void;2 I2 I5 W( F$ d) H
if @.occupied then9 s8 o& F4 f5 s+ p% U; L: d
part := @.cont;% X/ x9 C. _ g3 e& r& x0 M) U
@.transpOrder := void;6 s; ?, z( l6 N" l3 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) Y1 j: ^1 Q& H8 t9 ?( O# j
@,root.eventcontroller.simTime);- n6 A3 {6 U; l0 X
@.HasOrder := false;
# ~) T/ }3 N$ @' J- z( J3 ? @.DrivingHome := true;' ^- L0 R) p8 W( m7 H
rgManager.tryToStartTransOrder;% T% U! f# C( T+ X( [* ]
if @.Destination = void
. e9 P2 ] s# K/ G/ K7 b7 [ then -- no transport order for vehicle @
5 ?4 C( f0 X1 M7 [ @.Destination :=
. z# `# h6 M7 h6 l. R rgManager.nearestFreeStation(@,track.~);
" S1 z% x5 O" R2 e4 ?& B5 M' b' z newDirection(@);
' d% v3 y& u; ^7 q( ^' l if @.Destination /= void then
, {- `2 H! \* e$ ~$ S$ W) @ @.Destination.NumReservation := p0 _% R8 T! |" x7 ]3 n4 z7 j
@.Destination.NumReservation + 1;2 l$ E- A2 W: D" W# b% ^
end;8 z, f6 Z! D0 ]. K
@.CurrIcon := "drivingHome";
. H+ D7 U& y8 o. }' {: c @.DrivingHome := true;
# L/ K0 c8 W' M) p+ `1 p5 l end;7 C+ p) y$ ^/ o9 a; h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& L& {7 e! q/ }$ }; G7 I0 r F
part := @.transpOrder;" U% R [- n: U
part.move(@);-- load part& e( i# [% `$ N( s
@.CurrIcon := "load";
1 j' N7 p' F- Y) q GlobalDistObj := part.globDestination;: d1 C4 c4 ? y- Y
assignLObj := rgmanager.rgAssignL;7 V3 a. a9 H1 p' `& ]* n: M
row := assignLObj.getRowNo(GlobalDistObj);1 U: r; n2 ]/ l+ \! x" V
if Row = -1 then -- since 70
& t5 y, ^- ~: |( T/ [ if lan=1 then$ \! ]; G* A- |) [8 A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 _. w6 [- `% }! n- c i
to_str("in der Andockstation: \"",?.~.name,"\""));2 ?( z$ J0 X; i
else( r j- z& m/ `; @3 \% M% {
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ Z* I7 R/ J3 N) ^. D# M to_str("in docking station: \"",?.~.name,"\""));
+ l6 f! N' |# {% v* ~ end;- K: Z7 l n. K& w8 m
else& a a$ A) H+ s' p0 d$ q
@.Destination := assignLObj[1,row];, x' T6 M. l* c/ S
end;
7 M" E; M# e. u3 k6 s7 | newDirection(@);
" y$ n( e' Z; X( ]& k( F @.HasOrder := true;$ ]( D: z7 {4 G
end;
% Q- y8 Z( n% b' t end;/ E5 m) x4 J. U, x1 r, z
end; -- of the method
8 v/ T4 e! u/ c5 E- \& h |