/* called by: entrance ctrl of the object 'track'5 {) I, |8 x7 L9 K. W
*/( t4 Q. w) y0 w p
is; b! x0 ?! y9 f- y& ~9 c; m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 t9 b1 B, k# N- u( K# a( N4 b6 \
do" W5 w' |$ e! `8 S6 c
Lan := rootfolder.Internal.Tools.AOLlanguage;6 F8 G" G% Y0 d/ b+ b& K5 B& t
if current = @.Destination -- else return
3 d: n) |; q& t. @ then+ w; ]- a& A5 a5 V" [
@.Destination := void;" @9 E' \" T+ w' j/ c1 h5 J$ M
if @.occupied then
3 L( j% F8 H# r part := @.cont;
* i1 b9 U, N3 W @.transpOrder := void;9 P" n' W% Y1 N) E! M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 l8 J6 E8 H. w( D/ Q2 ? @,root.eventcontroller.simTime);# v0 K% o$ Q- V, e! j5 h5 k
@.HasOrder := false;! I, J* B r( S) A- Q, M
@.DrivingHome := true;* Q" W: w( [' I' B5 N
rgManager.tryToStartTransOrder;1 s7 h, F4 C; C6 V$ b }5 _+ N
if @.Destination = void
+ x2 b# X: } S5 b5 v$ H then -- no transport order for vehicle @; `( v0 x- e, P
@.Destination :=
# d) ]' W, g* K$ w' Z4 a rgManager.nearestFreeStation(@,track.~);
& n8 Y \% Q) Q8 j; G newDirection(@);
1 {* F- C# P. Y& W! e- @0 G9 s if @.Destination /= void then- d! _* R5 a/ l9 _% u, w
@.Destination.NumReservation :=' u8 l( m, V" G. H- [6 I4 K
@.Destination.NumReservation + 1;: ^! U* s0 L1 V- o& o5 r( {
end;
6 C. Q0 ]2 z/ O& O: p @.CurrIcon := "drivingHome";2 H* V# b' y7 C
@.DrivingHome := true; t* f2 E7 } l: d: R9 j
end;8 s3 c. F+ ~9 t, k; D! m/ ]
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) u2 W# {9 @* H
part := @.transpOrder;
9 n$ [6 G/ w8 A& S1 I part.move(@);-- load part" U+ e- m6 _# r0 J( v, j
@.CurrIcon := "load";0 ?' x5 d7 S- L
GlobalDistObj := part.globDestination;! f2 O. i. P+ N
assignLObj := rgmanager.rgAssignL;% F% \9 c; ?( z) L5 J* H
row := assignLObj.getRowNo(GlobalDistObj);
# A! s$ y: f H+ l if Row = -1 then -- since 70
$ r* A" J9 O+ U1 ~( Y5 [ if lan=1 then
7 [2 G, S6 D+ H4 W' ^* V5 l0 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* _6 b+ L* W( Y, X Q
to_str("in der Andockstation: \"",?.~.name,"\""));
, w9 e% w6 [+ B4 h9 l# a, ^: u else
8 A; o+ p4 u& v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 X& r; p8 A2 g) T: r1 \- A
to_str("in docking station: \"",?.~.name,"\"")); 1 w2 a+ L& l. G
end;# M. D( V: b& W8 e$ @' Q4 |
else. A; ]: J( l0 F1 C- D: y
@.Destination := assignLObj[1,row];
4 \; n6 |3 \ O! X- q) D" S- E end; 9 F0 W& A9 v/ x6 s
newDirection(@);
2 J$ K" x) c# }. a8 |1 P3 k2 b2 {: N; Q @.HasOrder := true;, Q, Z; `# s! _$ D1 H* F: S) ]& g
end;
; G6 O$ C* u; ] end;
6 `' M2 y5 v, E6 C2 u& nend; -- of the method7 ~( K# @; i) t
|