/* called by: entrance ctrl of the object 'track'! M' I- L& J# x, i7 S
*/
$ ^2 t. Y/ Y1 }1 p$ H* W& v! I6 n+ u9 M+ }is
+ V& M" v/ U+ R& x; ~* f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 N1 [+ K4 c6 ^* v. {9 l& ~do+ C: Q" v, s2 i2 r5 C. V" U) ^
Lan := rootfolder.Internal.Tools.AOLlanguage;
; G+ h( f/ f9 u" _% w if current = @.Destination -- else return
0 u% l* M" R# S# G! }, { then
q. v& Q9 n. a1 t* ~& n9 n6 P @.Destination := void;( B$ g+ w9 l( q& k X0 X% Z' m! b) w
if @.occupied then& A+ o' X1 X, m4 Z4 Z7 c3 I
part := @.cont;
1 k$ u8 x/ M, ^ @.transpOrder := void;- h% e# k5 S% e
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 l( N; P( T; @% ^
@,root.eventcontroller.simTime); a* t+ c' a" @
@.HasOrder := false;
- c9 i/ E7 M% } @.DrivingHome := true;4 Q: R- x) Z# Z. B4 B/ c
rgManager.tryToStartTransOrder;% R/ g. w" g5 f; j0 `0 \
if @.Destination = void
, @9 {3 a5 E! ?/ Z then -- no transport order for vehicle @' T- m9 U. k4 o
@.Destination :=* d/ E8 s# t F) X( X7 A
rgManager.nearestFreeStation(@,track.~);7 `' Q+ ^8 T0 m- }2 J* H, L, U* @" D2 T
newDirection(@); 8 @- f2 u" h4 n+ e0 D- p
if @.Destination /= void then9 \) R4 s0 x. N8 C/ Q
@.Destination.NumReservation :=0 v- }+ |3 T% W& ^9 z5 ?2 X" C5 q
@.Destination.NumReservation + 1;
8 Z/ ?+ l6 I' a end;
0 }$ _$ b' t& f, g; A @.CurrIcon := "drivingHome";
& a" k0 D6 X. u4 N& W, l @.DrivingHome := true;: g$ F' q& X- G' P
end;
' v2 y* H+ B0 o# p8 J else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ e3 r' ^) r' Y% c
part := @.transpOrder; H! ?% h3 e, A# ]/ y% \0 R
part.move(@);-- load part3 G6 {# ]4 H( @! K* k7 L
@.CurrIcon := "load";0 b, n! u7 U$ E4 \( A$ d
GlobalDistObj := part.globDestination;: G1 n& O& Y9 A9 n9 a Q/ j- t" c
assignLObj := rgmanager.rgAssignL;0 A- Z# s0 {$ q: i
row := assignLObj.getRowNo(GlobalDistObj);, r w- g% q/ I- ]/ t# I
if Row = -1 then -- since 70. n# p3 A y; e2 U3 u
if lan=1 then" t. Y+ e! N9 k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; ]3 A7 z' ]2 o6 F to_str("in der Andockstation: \"",?.~.name,"\""));2 @! r& e4 G( @# F5 D
else
! `% t- L' h( I2 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) u7 d" P! A e$ r3 N( h5 L" l3 M to_str("in docking station: \"",?.~.name,"\""));
4 Q! o% }( ~) [' v' e) W! d9 X m9 S end;2 l% A4 G6 O$ V/ P I+ ]
else2 \! d! c3 U& n& ?6 j
@.Destination := assignLObj[1,row];7 U" Q3 C1 `& @! n- [1 N
end; 6 c" |% v& v+ f- R
newDirection(@);* v2 K: O# @8 M% @! ?& V' N
@.HasOrder := true;
: p3 c2 n7 h4 I8 j" F end;% @: K" q6 W, _4 ~ Q
end;0 C1 ]8 e6 ]$ |# g0 O" r; q" z
end; -- of the method
7 |1 V$ a' s: A% e |