/* called by: entrance ctrl of the object 'track'0 l8 w$ V9 y/ D% \/ s
*/
! O: x, }: G7 H4 |is/ s+ K+ y! o8 L7 d& f- X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
A% }/ s3 B+ [( {. J4 W. X( Zdo
+ F) O5 Y3 p3 q) M Lan := rootfolder.Internal.Tools.AOLlanguage;3 S3 s, V9 i" [
if current = @.Destination -- else return
# t2 |1 h& n0 T! D/ W then6 v8 h* |! V" y" D
@.Destination := void;
1 ^& {5 F9 p* ~) m if @.occupied then
! u0 F( T: K5 ~ B part := @.cont;; L' f' K( e8 T: c
@.transpOrder := void;
- F: b- u. \6 e3 i( |& R3 p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- g5 J, q9 w4 n, C
@,root.eventcontroller.simTime);7 i3 p& G; N2 Y# A+ B
@.HasOrder := false;
0 p+ r# n9 ?" P) F @.DrivingHome := true;
2 L3 W$ d4 k9 t: N0 G, U% Y5 l2 g& k rgManager.tryToStartTransOrder;
+ W4 L6 D% D# r6 |/ k/ W) } if @.Destination = void
5 E6 `! H- m/ W5 d5 K& F+ H then -- no transport order for vehicle @
/ c8 C9 q% e8 h% b! R/ Y" N& p# d. ~% E @.Destination :=6 v* ^8 k; u* p8 y7 E6 F0 d3 Y: I
rgManager.nearestFreeStation(@,track.~);& h4 V! u5 m/ r Z( y3 h6 Q: Q
newDirection(@); & Q4 K/ [/ a; A$ s8 R
if @.Destination /= void then( I: W* t8 @; W. |; `1 z2 T
@.Destination.NumReservation :=$ U( q7 X3 }1 l( b* H3 n
@.Destination.NumReservation + 1;
3 w+ i6 k. ], r% C end;
$ i( ?, T p: _6 f0 [. l @.CurrIcon := "drivingHome";8 W& J' X) E% d2 c
@.DrivingHome := true;: C: _" t+ m8 f5 Z( x
end;8 a% r% ~# K( |$ @" ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ d7 m& p. X2 T4 j: Q) J
part := @.transpOrder;
6 v+ E; ^' Z) I: l( e Z part.move(@);-- load part8 A: W0 C1 s, C6 h" j
@.CurrIcon := "load";
7 ]% B; U2 v8 b5 B4 u: s! f @3 q GlobalDistObj := part.globDestination;
! B% ^ I8 Z7 F' N3 y assignLObj := rgmanager.rgAssignL;& P, V5 u' f' u2 m; q" Q
row := assignLObj.getRowNo(GlobalDistObj);4 b* O Z/ F' V) R( R! {+ J3 X
if Row = -1 then -- since 70
5 q. i4 ~' N R1 l/ A ?5 b0 g1 _9 s if lan=1 then& T- Z8 u) ^4 {- t
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* F4 z& n$ r* s! i* I2 J0 i: D to_str("in der Andockstation: \"",?.~.name,"\""));
/ i8 N2 Z% a& _+ o6 C else
2 _7 p- ` ^7 m" c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; {1 l" u5 n& m4 |) z5 U
to_str("in docking station: \"",?.~.name,"\"")); 9 ~* a4 f5 B# Y/ C. ]( m1 b
end;
- u6 ~/ w% _4 `: ]% b else# k8 ? j' Y; K! `: H& E
@.Destination := assignLObj[1,row];
# q( F5 o7 g% _4 w* t I8 x end;
" p# U3 O2 W1 }* f# _8 ~9 l6 G( b newDirection(@);
% E8 y- }! D/ [ a% T( A; E7 l) f @.HasOrder := true;4 O/ X8 ]+ [8 g0 B5 g# ^. [# ]
end;9 N, R+ R2 C( O4 D
end;. X& ]: `! X" Q5 z4 y
end; -- of the method
/ z4 ` Y/ |* {1 Y! q0 t5 S |