/* called by: entrance ctrl of the object 'track'+ ^: a+ A6 U4 h- K% R2 O1 X c
*/# z* `, l" H K' ^2 P* B2 h
is
" C7 q; F2 M- `8 Q$ H; S- Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% U3 U) m7 Q' K: J0 [ u% p6 ydo
0 v. r6 y5 }1 N8 L- U$ Q Lan := rootfolder.Internal.Tools.AOLlanguage;" Q9 x* v; w5 |* x- }; I* k
if current = @.Destination -- else return2 }7 j- S2 K# j5 [) s! M% o4 J) {
then
$ p/ u9 i0 y& Y- v% Y' j. W& I7 Y @.Destination := void;
1 Y) g; u3 q* W if @.occupied then5 K. o- u: [7 Q7 Q3 u
part := @.cont;6 z! S& }: N- B9 d% ?
@.transpOrder := void;( d) ` e( o1 s& ]" i( [" v
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
|' ~2 Z s1 @! w; ] @,root.eventcontroller.simTime);
) m% r- e9 H2 w" g! Y* F5 x @.HasOrder := false;
7 F: q+ A7 j8 M' a, q( O @.DrivingHome := true;4 n/ X! V3 j; `! Z
rgManager.tryToStartTransOrder;0 M" K# \1 N3 E& G5 N5 g
if @.Destination = void( Z6 z( y8 n: j" q) i6 M/ {7 a" ]; b2 K
then -- no transport order for vehicle @+ X& h" ^$ b+ K- R$ x
@.Destination :=
I$ [$ L, q9 Z5 \ rgManager.nearestFreeStation(@,track.~);
- t) L5 m% s8 v newDirection(@); & I. S& L4 p" Z) k
if @.Destination /= void then
; J6 g7 W, S( c$ Z @.Destination.NumReservation :=
3 `" M, _- G' z# J @.Destination.NumReservation + 1;
7 G9 g% B. Z0 _, p+ _/ H end;
7 ^+ s7 |1 |4 |, w1 k. z, o% o @.CurrIcon := "drivingHome";
7 }! T6 r& ]! ]8 n @.DrivingHome := true;- }7 q: f1 i# T' D/ \% f- P. |
end;
6 `" y) L, g; h) q3 U7 i- U8 B else -- the vehicle @ is empty, both vehicle and part are in the same dock station% U6 d2 [* h/ \4 Y: \! f; m4 A3 h
part := @.transpOrder;4 E' J, n. o+ N' f! [
part.move(@);-- load part
& q3 s( U1 \: _! H @.CurrIcon := "load";% v! F+ ^ c7 }# j
GlobalDistObj := part.globDestination;' N/ G* _/ N9 A# ^1 B5 c
assignLObj := rgmanager.rgAssignL;
7 |9 e! Z4 B; ^ row := assignLObj.getRowNo(GlobalDistObj);
( Q) e: u& ?. ~; H0 g if Row = -1 then -- since 70
) L+ M3 k0 I& ]( ?+ N0 P1 [7 w if lan=1 then$ X, \$ N0 X6 |) C$ c; K. H* i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- D9 T0 H, z; e1 w7 A6 U ~! [1 f
to_str("in der Andockstation: \"",?.~.name,"\""));
3 q; a* `( O: [6 }; ~( g, V else
5 [! p5 v. U) n* J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) d3 q5 T s4 H. _5 i
to_str("in docking station: \"",?.~.name,"\"")); $ j# p( g" j s) @4 Y4 j
end;2 o) P. Q) L3 @
else" @2 B/ Q3 C; H, W; Q2 i9 O( g2 L
@.Destination := assignLObj[1,row];- R2 @ y& h8 N) e+ _3 e
end; " r e1 ~+ C9 `) p: _- e3 T
newDirection(@);( h3 C; L' K- w. `
@.HasOrder := true;
- n+ r8 h$ u% T: o) a& C. k end;
9 I+ T4 A" L3 O+ a# {+ F end;, ~7 F5 v2 @; j$ d T+ |4 q- N
end; -- of the method+ f' w- \' ^! M6 f9 ]* e% P
|