/* called by: entrance ctrl of the object 'track'
0 V) |/ @7 @, v$ F/ w4 m*/
' a4 T0 d' I+ F: }; t1 W( b, u# wis
1 N: K* T+ e5 g5 [3 ?/ |4 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 [: y9 X. j! {5 edo
0 X3 ?( b5 t3 J Lan := rootfolder.Internal.Tools.AOLlanguage;) o* J2 E9 R4 i- t
if current = @.Destination -- else return
7 b, D5 c. e+ H then" Z# s5 _6 A9 z! h2 [
@.Destination := void;$ R! ~8 w1 u% F* A5 u
if @.occupied then9 n- [0 M# D) f# B" m2 l
part := @.cont;
8 e7 G3 M7 s! _: J5 H* q @.transpOrder := void;
5 O: O' B$ r% w1 t part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 z- f& B5 f( i2 y
@,root.eventcontroller.simTime);
7 m$ L m1 D' _- e W& ` @.HasOrder := false;. r/ r4 G8 T/ o& N( e2 K" N
@.DrivingHome := true;9 i9 h, R7 y/ ~% U7 `6 v
rgManager.tryToStartTransOrder;
/ U! e# Y2 s1 M* K: a7 n$ D if @.Destination = void, w0 V( q6 ]2 @+ }' ^
then -- no transport order for vehicle @( q( Z, r. i& P3 ]6 b- s! L
@.Destination :=
7 X5 G' W- ?& `3 T7 C) ~ rgManager.nearestFreeStation(@,track.~);
9 o7 x7 Y* e7 W newDirection(@); 8 u6 |4 W- [# p+ m$ |* N6 x1 n
if @.Destination /= void then
& }/ R9 z/ H" U @.Destination.NumReservation :=
) ^, E. g% j! [, |! a @.Destination.NumReservation + 1;
5 @# |$ s7 @5 T0 h5 F. P1 s( f. o end; Q( R, C& C' M* x# T+ u
@.CurrIcon := "drivingHome";3 b1 b/ L2 p# p3 I* I7 p* W8 l
@.DrivingHome := true;/ D( I0 [$ x+ f7 c
end;" ]2 ]* r0 B$ a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 R+ E7 |& G7 q8 X& f0 S- i0 @4 m) H
part := @.transpOrder;( c2 t* a3 |; H/ L% K
part.move(@);-- load part
" n7 @0 z. W! X; _- L) O @.CurrIcon := "load";# F1 n8 n; S9 j( l& I) y
GlobalDistObj := part.globDestination;. i: `6 s' D. ?4 a: t( G
assignLObj := rgmanager.rgAssignL;
% z7 D0 x# j% C row := assignLObj.getRowNo(GlobalDistObj);$ }$ Q' q8 v Z# E: J. O
if Row = -1 then -- since 70% z, f7 M/ t' _6 m. r8 w
if lan=1 then5 w8 C# ]% P4 w U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. W& S2 N7 f: V0 O8 g to_str("in der Andockstation: \"",?.~.name,"\""));% K# w! B5 t& b+ @2 P
else
( N$ F: }8 I& E5 _. ]& C* |. d9 N( d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; R% B+ D$ _9 J$ f# q. G. D* T
to_str("in docking station: \"",?.~.name,"\""));
( X8 W5 \" w0 p$ r end;3 X. P3 N; b2 a0 Z1 k- H
else
5 z f. Y8 v/ a8 E @.Destination := assignLObj[1,row];
4 E% X0 n* Q& m+ c s/ [( q end;
3 W8 @! C2 H1 B9 j) _8 s8 S- | newDirection(@);' V, b+ v& y% ~0 }* X7 A
@.HasOrder := true;) s, X/ a& \* m/ n' Z% Y
end;
; f$ l- B2 ]6 T( h" e9 |2 \- r, J end;
+ G' g5 f% a8 T7 k+ B3 `2 x2 ]1 a1 A5 H6 Dend; -- of the method
" ^7 q8 i6 x" v* M; \5 W9 ?+ A |