/* called by: entrance ctrl of the object 'track'8 u$ K. z5 z# ?0 C
*/
% e% C" [1 V3 ^$ F% x( O" V: g0 mis) u" f6 |0 C+ H4 n1 q1 q+ @* h9 |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* U6 o' U# V) d4 ^2 s, y
do
" i$ X4 i5 t0 w% \: t# d Lan := rootfolder.Internal.Tools.AOLlanguage;
5 u6 _/ Z2 q8 B1 [8 r5 `. h; ]" Z$ @+ e if current = @.Destination -- else return
6 z1 ?+ H- I4 c8 U& {- y then
7 p" m. }4 U& ` @.Destination := void;
7 _4 ^$ Z# ~* i* }3 c- u if @.occupied then
# E2 Y8 @; H2 t7 `& _3 [0 T. H$ H2 j part := @.cont;
4 V' X8 Q# z, v9 P @.transpOrder := void;1 t4 L& ] }. a4 q2 X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 N+ D5 u" N' r# R% E2 Y
@,root.eventcontroller.simTime);9 c& y& ~1 |" w4 w) h I
@.HasOrder := false;( @$ A& B& v! m" ~
@.DrivingHome := true;
1 v- w# H2 Z3 I; }7 E9 ? | rgManager.tryToStartTransOrder;% H9 _4 Y) f) q
if @.Destination = void
. _. [% {2 `' }: o then -- no transport order for vehicle @: k# z; e. p% B
@.Destination :=& j* [9 w4 f- d7 K% Q$ q! J- c, {
rgManager.nearestFreeStation(@,track.~);
1 H, x% \! u$ ?, {# m# s newDirection(@);
. Q9 b( d! g1 N) U: t' ~ if @.Destination /= void then* a: L9 |3 H! N4 h
@.Destination.NumReservation :=
3 N, e" C5 h3 l, s7 j$ @9 n @.Destination.NumReservation + 1;
& g$ t8 F! j& u& o. e! Y6 q4 ^ end;
5 W* ^( @. c6 }" y! O0 q0 e0 L @.CurrIcon := "drivingHome";. |" n6 }! d3 c, {. ^2 }
@.DrivingHome := true;
6 B+ Q) t' I& _' m end;
3 E& x6 V/ t- ?; P8 u, ]! G else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 ?% k0 i: N+ Q part := @.transpOrder;
9 {. w2 X# i+ M+ b; m0 y# ] part.move(@);-- load part
* t3 j! S( A( t4 P% u @.CurrIcon := "load";
/ [9 ?2 G% r: @6 t GlobalDistObj := part.globDestination;) A$ i5 m: a7 I+ |) A
assignLObj := rgmanager.rgAssignL;5 t6 G9 L' r7 {
row := assignLObj.getRowNo(GlobalDistObj);2 F6 ?1 t2 s% m& c
if Row = -1 then -- since 70
& Q1 u4 ^. x; H. F: M; _9 f0 q if lan=1 then
1 s& X: b, F( c4 j5 @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% |, [* b& G$ W6 p to_str("in der Andockstation: \"",?.~.name,"\""));) J! \5 i' h( _3 s* z9 w
else
' F% n# }$ d6 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ d8 f. s* m% |! ^! @4 Q3 c to_str("in docking station: \"",?.~.name,"\"")); " _) _0 x: ~' g9 e: Z
end;8 [" J) `2 b0 _5 }
else
; G4 O$ }4 V- L, n+ w1 g- _1 h @.Destination := assignLObj[1,row];
/ u, U/ D* ~0 X+ W# S, i0 e end; 1 N1 C! _: r6 @3 `
newDirection(@);" P. G7 f5 x0 Z# `
@.HasOrder := true;0 A. d8 n* B8 ?
end;7 g4 r) k$ w! h) m/ B6 l+ N' O2 `
end;% r. C( I' y3 i* q$ O0 n) a
end; -- of the method' ^5 |- s2 B* [7 I0 ]3 O; b0 v
|