/* called by: entrance ctrl of the object 'track'% `$ u d1 p! K1 W
*/2 K0 o( U5 r, s
is
: d% Q a4 o8 P7 B8 M! U part, GlobalDistObj, assignLObj:object;row,Lan:integer;. e" T" Q* t* n% \1 W% T
do% b4 T3 B/ D7 o
Lan := rootfolder.Internal.Tools.AOLlanguage;# I# h: r- v$ L4 l9 C
if current = @.Destination -- else return& i: n1 E( c4 Q2 O @& v
then
; O+ G9 p, e" _; p$ v0 z% e$ S) s" _2 N @.Destination := void;2 {1 n0 p8 O' a/ z0 }" D/ t; h
if @.occupied then; b4 T; p0 q) C+ Y7 N
part := @.cont;
4 P% E5 B; M7 D! i a @.transpOrder := void;
( J# b5 B! t- Z0 T' Z9 v& g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( y8 b* T" e& A7 K2 Y @,root.eventcontroller.simTime);2 u; v- R0 ?0 Q7 r# v3 t* e. H
@.HasOrder := false;4 @5 k8 N1 k9 h2 M2 |2 e3 G
@.DrivingHome := true;
! y+ \+ L* i# u5 E/ N! h" S rgManager.tryToStartTransOrder;4 e0 U8 h% j0 L9 g
if @.Destination = void
K% `/ J1 r z! N+ r z8 L! a then -- no transport order for vehicle @
m8 d8 ?- V- x9 [3 ^ @.Destination :=: Q" \: L3 u; y- v( ~
rgManager.nearestFreeStation(@,track.~);
; k% ]" n" D A newDirection(@);
2 H# T6 i! b( Z R if @.Destination /= void then+ d. s+ h3 Y A. L3 }/ u1 }
@.Destination.NumReservation :=
/ h4 |/ ~' c( |0 G0 ^: ] @.Destination.NumReservation + 1;& U+ O8 c1 {) o& w7 c: a
end;
$ e# Y8 G& M% Q; w @.CurrIcon := "drivingHome";$ w1 c- l% ^( o1 ^
@.DrivingHome := true;
$ }0 r# j+ m4 w( m, G end;
7 ]9 E& ~+ k3 |" j% Q( U else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 h# V4 q; Y8 J2 I1 n& @
part := @.transpOrder;' T" z$ g( e6 ~
part.move(@);-- load part
% p1 w+ x. A. f @.CurrIcon := "load";6 j! S0 H9 k2 e4 N7 L8 t& m3 e! W
GlobalDistObj := part.globDestination;
( i& u' D, g6 [: z1 I- d% v assignLObj := rgmanager.rgAssignL;2 G, G+ E. J; q5 @
row := assignLObj.getRowNo(GlobalDistObj);2 o/ @" x, Z& S1 ^) {8 }! J
if Row = -1 then -- since 70* K6 g- T, A' T# ^) B
if lan=1 then
, q/ \. x* j/ ~9 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; R0 Q# f) o( K# R5 v( D to_str("in der Andockstation: \"",?.~.name,"\""));3 v9 C3 ]: ?% X$ h
else1 ?; ]* M1 [' E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 i0 Q5 n, Q" H to_str("in docking station: \"",?.~.name,"\"")); 7 z7 ^! v% O( Y) f( L: o
end;5 P/ L8 }: ?1 u# m
else7 J5 `' [5 ]$ h
@.Destination := assignLObj[1,row];
; ^* c" q- Z& x3 O end;
7 P" a' V; r' f9 {9 `8 _' d* z newDirection(@);7 v1 }# U7 L8 Y! d& O: {2 S( A
@.HasOrder := true;
! ]1 s$ `6 K2 v1 c end;
* N8 L9 }: y, g" s5 g end;
* P" I1 h5 u& c& i, v0 mend; -- of the method
7 e* V- t% i4 g6 X- r$ C2 m! w |