/* called by: entrance ctrl of the object 'track'4 H7 _7 r7 u. H$ T
*/0 z5 l$ ^: r; S
is
7 L( t4 h4 T7 D9 S. G4 h' ]' ~* Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ V2 c3 ^) l& E4 _
do9 a3 J& O# T4 x* p" v9 V
Lan := rootfolder.Internal.Tools.AOLlanguage;0 [6 D( e+ \- b1 F- L3 g
if current = @.Destination -- else return
1 ^7 C- B6 P& I; d! a! v7 W then9 f( A7 k7 h; [+ D( l, ?1 d: h
@.Destination := void;% u: A8 J" T0 c/ p1 ~ z; b0 K1 x
if @.occupied then
% k) b {: R9 z+ {& t/ m part := @.cont;* n! W( a9 J3 J( C/ ~* n( i( a
@.transpOrder := void; ]/ G) ~$ x& l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! B# E$ X S4 x# X
@,root.eventcontroller.simTime);
( h5 J O3 S `2 ?0 ^2 e @.HasOrder := false;
) Q( _- _# R$ X' f g5 Z. y @.DrivingHome := true;# T0 v- `; q/ Z5 Z
rgManager.tryToStartTransOrder;9 f2 s3 F% E5 Z
if @.Destination = void
: _& Y/ o3 d' t7 R' q E$ ]6 I then -- no transport order for vehicle @; Y! R) Z, W0 W
@.Destination :=
& t( P2 d+ L* A1 x/ M rgManager.nearestFreeStation(@,track.~);+ a# w6 ^2 b y4 J8 K( g( C
newDirection(@);
; P- }$ r. }, {3 [# A if @.Destination /= void then$ A- b/ m G- U+ {8 o3 x7 L1 t
@.Destination.NumReservation :=# Y% x, \# c: V3 i- e4 M
@.Destination.NumReservation + 1;
. s6 r& e* d9 n3 v+ f% z( K8 m$ \3 J end;8 k6 r8 _7 C, Z( H1 M2 V' H
@.CurrIcon := "drivingHome";2 s& v% Y/ E* J& ?
@.DrivingHome := true;. Z& m/ C2 j3 [- x7 W# d
end;) H T0 d L* n1 Y9 `; x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 h) Y5 S6 i, B+ i$ a' q part := @.transpOrder;' b% b" D7 ~" O$ Q0 _# b5 n7 }
part.move(@);-- load part/ E m" T. s1 J; r- c
@.CurrIcon := "load";/ W2 d! F. G& ^6 m1 z& P# k# l5 Z
GlobalDistObj := part.globDestination;0 }* V4 J9 }: P/ y+ w8 a
assignLObj := rgmanager.rgAssignL;
0 P, p" q( w2 { row := assignLObj.getRowNo(GlobalDistObj);( N, L, o4 ?' a9 X z
if Row = -1 then -- since 70
5 \; G: A; l# N: v0 U3 L0 n if lan=1 then% K9 I% |6 ^ p% k( ?1 f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* g) X3 j2 q9 d: D to_str("in der Andockstation: \"",?.~.name,"\""));& x1 l% g3 J7 W: q
else
2 z7 j1 X, B9 ~7 y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ y4 \2 B. ^+ C to_str("in docking station: \"",?.~.name,"\"")); : }1 m) g& Y' T. O/ R( j6 y+ V5 l
end;
" }1 c- O8 Z! \2 D& C& h8 E$ _5 D4 g8 e else1 |/ c9 i% F* g& z, Y3 p6 N" w# _8 @
@.Destination := assignLObj[1,row];
9 f4 p T+ Z" Q% O" n end; , o4 N0 @$ o7 {: K6 ?0 u1 p: ^6 p
newDirection(@);
% N+ A9 W9 \8 L2 i0 t4 E- ] @.HasOrder := true;
6 k+ \9 O, `" q# j end;% W3 A' j6 o, h7 c
end;
+ O$ l) n, X; }/ Vend; -- of the method
# {" V2 H; n }6 a$ o |