/* called by: entrance ctrl of the object 'track'% T& S- s9 ^' a) m% W) _
*/6 g7 ~) y" B8 X
is5 @: V/ Y. z3 c( R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) y% A/ O- U8 H9 X
do
* d5 W3 H X& ]1 u7 ]8 m7 i Lan := rootfolder.Internal.Tools.AOLlanguage;/ f7 B' L6 ?/ V( W
if current = @.Destination -- else return
: ]1 o L" u2 P( X: N g then
C6 r m& R# r1 ~ @.Destination := void;: K. D& ? j0 I9 z5 y' e
if @.occupied then
- i( F4 ^: {! a part := @.cont;: c+ C1 t8 Q% p3 y& {8 _
@.transpOrder := void;0 r0 F4 `( @8 f" T( ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- @) F$ B) w4 l* Q* n8 ^0 P
@,root.eventcontroller.simTime);
9 i0 j5 }. |0 O2 _# j @.HasOrder := false;
1 K; c, D0 v# I1 G. c! i- O @.DrivingHome := true;' g. L8 o4 F" l+ k
rgManager.tryToStartTransOrder;0 p2 z* {. h0 L: O) k
if @.Destination = void9 L3 N+ z; Z8 r' }! U8 ]; y
then -- no transport order for vehicle @
4 T; z8 p g; |* [ @.Destination :=5 b# r7 J% L2 p5 [6 Q m6 X
rgManager.nearestFreeStation(@,track.~);0 L8 A9 E1 ?# E0 D$ C1 ~/ h8 c, \7 A
newDirection(@); # w; I( M' u F( {
if @.Destination /= void then
4 M( }3 ?" d# l @.Destination.NumReservation :=
$ B% [7 ?. J* B& w0 h, w6 Y @.Destination.NumReservation + 1;
6 g+ }$ d9 d& l; b8 c: E end;
1 Q6 ?! |; I* I- M& i @.CurrIcon := "drivingHome";- O: a0 N% d3 c5 o8 y# b+ H
@.DrivingHome := true;
. Q$ e6 C' O5 @ end;" K: [3 |$ _, U% r' x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 ], i! Y" F" [3 J. i2 X
part := @.transpOrder;5 \! H4 e5 ?3 O$ u: _5 {
part.move(@);-- load part# v2 O5 b$ u0 q4 f0 J6 I6 u/ m) T
@.CurrIcon := "load";3 t% \% A2 @* j3 x i% l! D
GlobalDistObj := part.globDestination;2 J D2 C! F% ^8 D/ C/ K! j
assignLObj := rgmanager.rgAssignL;! D9 H( A9 K9 q. r7 {
row := assignLObj.getRowNo(GlobalDistObj);# \1 ]" G4 K2 V; z6 t
if Row = -1 then -- since 70. i2 J9 ?+ |% E' T' U1 Q( ]
if lan=1 then/ h) \# l6 L- a# o
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 |! ?/ K S8 x3 c9 f5 [, o" c to_str("in der Andockstation: \"",?.~.name,"\""));
) C- h$ n4 ?' R5 }. v0 u" q3 {+ Z else
' p/ V$ _' j3 y6 Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# x7 e( _( Q+ `- n: P to_str("in docking station: \"",?.~.name,"\""));
* d9 Y& D6 G# O U( k# T end;" P4 X( u7 V/ q8 I, N
else) O( |1 x) G5 G2 W- q. C5 w* O
@.Destination := assignLObj[1,row];
6 W) F: a* p% b) p$ _! q, S* A end;
+ v: C! R( k* Q, ~ newDirection(@);; b0 [: L# Z0 W/ h1 F
@.HasOrder := true;2 y1 z, `( K. H% q
end;
+ J$ o4 ]9 c) W% V& ]# \ end;
3 O5 V; N% p O8 ]end; -- of the method
0 |4 J/ m8 m* ]4 B. ~/ e |