/* called by: entrance ctrl of the object 'track'% [5 r+ v6 Y2 y' P# l6 G0 m
*/# v, e: o4 I' a( }" N% u
is" ~$ t5 t& j8 j
part, GlobalDistObj, assignLObj:object;row,Lan:integer; [6 E' |8 B: L$ P1 s/ @% X
do! I4 ]& B$ ^0 ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 C4 S9 `1 l, F, k, @1 E5 a if current = @.Destination -- else return! [) P9 m6 E! f+ D. z2 s- G& ^
then6 R, H; l: n- _% {) T1 N! m, ?* b
@.Destination := void;
" w8 T- U0 B' L- G7 Y% F g if @.occupied then
+ R" T5 e0 E" I) `& s part := @.cont;
1 p$ f- k9 W. ?; Z$ D/ A' j @.transpOrder := void;0 U# \# v+ c6 a& z4 b Q( K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 n) ]2 W) E( F# ~ @,root.eventcontroller.simTime);( U: O. E/ L; g3 }5 N
@.HasOrder := false;' ~* i( w" a' c0 |* X7 G+ {8 b
@.DrivingHome := true;0 n! W v8 c: J& j. V7 y/ Z
rgManager.tryToStartTransOrder;9 v0 Z- H5 w' s$ v$ T. j5 L: Q
if @.Destination = void
' \9 v$ R8 T8 A: m; L* }$ d then -- no transport order for vehicle @
; u5 W# K' P: u. i( I @.Destination :=" D. o$ e8 ^9 d) y, `6 @# d
rgManager.nearestFreeStation(@,track.~);0 c9 ~, C/ u2 }# j
newDirection(@); : Y1 _# C& s0 j `3 ]4 O t# ]! |
if @.Destination /= void then- p7 a* E) Z i2 b" y& c
@.Destination.NumReservation :=
4 @4 H2 X q; L. k! t @.Destination.NumReservation + 1;
4 v" e( F+ a u0 e end;+ H6 G" ~1 l4 Z: x6 D4 c/ b
@.CurrIcon := "drivingHome";! T( I% z, c2 U) g
@.DrivingHome := true;
' @+ T2 Z8 N: V& d3 m+ w6 Z end;
' m/ M k. } a! w; a: _* d$ t else -- the vehicle @ is empty, both vehicle and part are in the same dock station' N& i8 a5 X6 [. w
part := @.transpOrder;& t% c, s) V% h8 d F7 `* J
part.move(@);-- load part
3 S' [' r6 v/ J5 G* _$ d u/ X @.CurrIcon := "load";! y: t! W t2 c2 k1 V0 e k& `
GlobalDistObj := part.globDestination;8 j; O* b. T3 A$ q" C: B" s$ V, m8 o
assignLObj := rgmanager.rgAssignL;- a6 c* ~% p- K- e- `
row := assignLObj.getRowNo(GlobalDistObj);% H- E2 z/ i& D! J
if Row = -1 then -- since 706 u7 _! U# |" X
if lan=1 then1 M/ i$ Z6 w. N; G: g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' I4 P. e/ ?$ _7 ^ to_str("in der Andockstation: \"",?.~.name,"\""));
0 g$ e! m3 Z2 H2 X, c else! P, J, V$ H% K3 L) M5 l3 D) j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 \5 t$ V' ?- U- m; N1 u to_str("in docking station: \"",?.~.name,"\""));
$ C& m: g: O- | G. i end;! Y1 ?9 w$ ~& i$ r% z
else
3 Q6 ?) ~5 ^+ f! l: ` @.Destination := assignLObj[1,row];; w* a0 u1 ^2 m9 E$ t" V4 m: C
end; * O9 [9 P, _- u& d2 a9 L
newDirection(@);
, _/ \2 o5 L- i @.HasOrder := true;
, I$ B5 D; w: ? end;: q6 Q, }) G0 B! h2 z- V- \/ p# V
end;% z% ?4 N5 ]) v9 X9 m2 R
end; -- of the method2 |, ?2 X" O% N: {
|