/* called by: entrance ctrl of the object 'track'
" u B8 f% o8 R( b/ d1 ?*/
! T+ h' M4 H4 R5 t5 p( N3 His) l4 s) O3 O& p8 o+ t- B5 ~! \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& |9 h; B0 K5 j; }do
/ e8 U( G5 A2 ^$ ~) U0 L" t Lan := rootfolder.Internal.Tools.AOLlanguage;" v0 o3 \ h9 a" E1 E- v% m
if current = @.Destination -- else return! ]& Y( S7 I" ~; G
then) E0 z( u; {( r
@.Destination := void;
0 u7 t+ j' e: P& l if @.occupied then
$ i- }% g g& [$ O( T part := @.cont;; I! v5 G7 _# [* a( ?9 `/ ^* U5 ?
@.transpOrder := void;
# Y7 w4 E- f) L7 }' ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: H, K! u! t ]" g& P; r$ F; c
@,root.eventcontroller.simTime);; U3 b0 n. ?! P7 h/ M9 b/ h- A
@.HasOrder := false;- |( g9 z- s/ z9 {) t, ]
@.DrivingHome := true;; K: R0 d& G/ ~( Z. t/ J( S3 H) b
rgManager.tryToStartTransOrder;/ i' A' h: a, S+ Z" R( B
if @.Destination = void
/ f T' O I1 N- Y then -- no transport order for vehicle @
$ ^6 @( U% J$ q9 v6 t @.Destination :=: Q0 L. P5 J7 T0 T; j
rgManager.nearestFreeStation(@,track.~);
, A$ f3 s, f) ` newDirection(@); 8 ?; b4 p4 P9 L& S
if @.Destination /= void then
) r1 F: [' P, ^: i( ~ s: A! l. V @.Destination.NumReservation :=
6 @, s# K. S, |0 i# @7 Z @.Destination.NumReservation + 1;
6 ?/ p P5 p" I end; H, Q/ P" F, G# {* W7 `
@.CurrIcon := "drivingHome";7 `" @$ S5 @: }. P
@.DrivingHome := true;
) _+ W( {! r& J0 J: Z end;. W. f% n O' X7 N4 u7 e; @3 S, e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! n! ^6 x. L. ]8 }: f, b6 x% a
part := @.transpOrder;; \$ M- }. \! r G/ B
part.move(@);-- load part8 Q5 [( G. `9 r/ l' V$ `- d3 f9 p
@.CurrIcon := "load";. C M! ]* f1 G2 D6 g! R
GlobalDistObj := part.globDestination;! l7 G+ H! h8 @7 {
assignLObj := rgmanager.rgAssignL;
$ {& ~. O* h5 D4 h$ J6 a$ _( Z2 Q9 ] row := assignLObj.getRowNo(GlobalDistObj);0 e: o! O: g! b/ t9 x
if Row = -1 then -- since 70$ v& X, {# k) Y) n2 ?
if lan=1 then
( _8 A X. n" P% ?& H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 p$ b! v8 a, ?7 H7 j- F0 j
to_str("in der Andockstation: \"",?.~.name,"\""));' w" m" l4 n7 Y6 a
else
( l/ [, \& o4 Y: ~! c8 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% V4 C! t3 g& A6 s3 D' C
to_str("in docking station: \"",?.~.name,"\""));
' e& [+ H( q/ o& R end;+ y9 l3 T! b; V) ?. N- }
else5 I6 ]- w, \& {+ h( N5 G
@.Destination := assignLObj[1,row];$ Y/ Z" C- o2 W5 G
end; # _& X7 h" g4 N) F4 u" g
newDirection(@);
1 `/ u4 v( }- E @.HasOrder := true;' D5 J5 d- a" Q0 d3 V7 n* K
end;
2 R/ S5 ?; s3 J end;
0 i* ]4 t1 t& p/ `3 X7 J- Q9 Q5 Iend; -- of the method
! u l- i: ]5 [) }: c |