/* called by: entrance ctrl of the object 'track'( A R& s8 \* h- O9 b
*/0 N+ ?; i" _1 O3 W* X& e1 O
is
& P) J* l6 o' i0 Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 l# c% I: x9 }' I
do
/ v: `( M" E# T6 J- W Lan := rootfolder.Internal.Tools.AOLlanguage;% o9 b, r* ^9 ^! E6 C6 J+ W/ P
if current = @.Destination -- else return
! e4 x d3 C2 z, e; @ then! w' [) U0 z8 i- |) @
@.Destination := void;2 q( c) B. w* ~0 s5 z) a0 U7 g
if @.occupied then
5 x6 e% I; [) G+ R) J part := @.cont;
: R& f& t3 i- @! x @.transpOrder := void;
: w' A) ^3 {9 d9 d# P% g part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) ` O x8 }, W) I8 V5 W# @" ]
@,root.eventcontroller.simTime);9 a% u5 M7 z) R0 \1 Q6 V( s; e
@.HasOrder := false;
: ]3 x8 T' a- V3 ]5 u. S @.DrivingHome := true;
1 B$ |$ n$ [3 o) Q9 t3 g) b6 N rgManager.tryToStartTransOrder;" z- V/ R5 Q5 T) {$ d
if @.Destination = void, s1 `( n& D5 e; e9 H
then -- no transport order for vehicle @
) c) A( J3 H0 F @.Destination :=3 i$ \6 {2 G% Q
rgManager.nearestFreeStation(@,track.~);
+ D" H2 P; t l+ a4 Z' V) ] newDirection(@);
! B8 v/ p0 s4 `" _8 q% ^ if @.Destination /= void then+ t) [4 ]: O4 j1 u8 D/ S% D$ K( d
@.Destination.NumReservation :=; o" p- x6 B. E, I" \
@.Destination.NumReservation + 1;
, W) Y8 M! B, M, k end;
" ?, a6 W! m# ~1 H @.CurrIcon := "drivingHome";, n5 [( Z# O0 L: R$ W
@.DrivingHome := true;
" G# P0 ~7 L7 R' ^- K ?- @ end;& o, Z. {0 N1 k: X4 n: k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 `5 f( X* ?- T+ _- t7 n5 d- v
part := @.transpOrder;, N3 ^4 D" x3 g: V
part.move(@);-- load part9 t$ P, i1 D% H# G8 g" t
@.CurrIcon := "load";
: {! B( u! f% l9 v2 b GlobalDistObj := part.globDestination;1 g3 W9 r- R' @/ `3 f2 Q! z
assignLObj := rgmanager.rgAssignL;
) b- t# s2 H& c2 c5 I row := assignLObj.getRowNo(GlobalDistObj);6 y. }, @: v+ P& r8 G" f* G
if Row = -1 then -- since 706 m* {6 E* a# K1 k4 V( o; B( {/ r
if lan=1 then
, V( c6 h1 ]1 o2 d5 i- L# w# Q, b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( Y# Y5 |0 B9 b" R% f
to_str("in der Andockstation: \"",?.~.name,"\""));7 `7 M( w, C' j/ L6 F
else
f5 U: T B+ w3 H* m0 v5 ^/ [4 p1 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- C+ \: I6 {) f1 q) `: w to_str("in docking station: \"",?.~.name,"\""));
\; Q( x1 O. ?8 w end;# L+ D1 K( p! e& L
else
; V1 }8 Z8 }; v4 H! W* q% V @.Destination := assignLObj[1,row];6 B& {: P' z+ c0 c9 v( v" Q7 n
end; ! r6 n2 M; e7 K) B+ @+ K
newDirection(@);3 l1 n" K+ k3 B
@.HasOrder := true;
' E. _1 ?; V5 z+ s0 E* E @. }, o end;" w: y1 D) q/ M" p: k H2 ~: Z
end;
6 Y6 {! K$ r! T! wend; -- of the method: g7 F9 f8 k/ F( g- I& \
|