/* called by: entrance ctrl of the object 'track'2 p) b! a, }0 `% }+ Z+ H
*/
6 K/ T2 u8 N# G) j5 q$ C" A; {* u$ E4 Pis7 U j4 A) q/ T7 g& p0 e3 U, w& ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 @/ b+ k+ g( s; ~ Fdo x. Z+ x' m: S0 o& E% S& o
Lan := rootfolder.Internal.Tools.AOLlanguage;2 r" d% Y% c" }( j% a8 N" g
if current = @.Destination -- else return
8 Y8 ]0 ?) Z6 T+ f+ R9 i then
7 |# s5 F+ m. w0 ^ @.Destination := void;
# _* V9 C `% f6 H# F. h6 a if @.occupied then
) Y" h% Y& }1 i part := @.cont;
1 U9 _+ E4 f! A2 ^+ z @.transpOrder := void;
# E+ a- L8 z1 N. k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 E- J2 q3 h5 F# Y3 T5 X8 k3 g
@,root.eventcontroller.simTime);7 }/ J; F9 f, f' j4 I
@.HasOrder := false;& Z- E" I1 W4 N% p
@.DrivingHome := true;
. ?! p ~! U& C9 x: z' ~ rgManager.tryToStartTransOrder;
7 u4 H8 j- z! N) g4 d. u- k* \ if @.Destination = void8 _- Z2 V$ f8 V4 M% ^+ o5 w* K. G
then -- no transport order for vehicle @* R" @) `! R2 ^
@.Destination :=
, F3 _$ M% Z1 j3 _ rgManager.nearestFreeStation(@,track.~);2 {! n( n/ p( n2 j" J) z
newDirection(@);
( o- ]4 r/ l! P" r# b+ b if @.Destination /= void then2 L! m& b4 I- J9 @4 @* ]7 n
@.Destination.NumReservation :=& b# k' B1 Z- n
@.Destination.NumReservation + 1;
$ M' A" ~0 B( j7 T6 y' P end;( J! X) B0 _' X, v1 T+ ^
@.CurrIcon := "drivingHome";
o! C1 N, c# n3 L, d @.DrivingHome := true;' f$ ^" g: b3 S2 C
end;. U d1 M3 L" S3 y7 w* l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station- J" T: [2 p( E" e" S
part := @.transpOrder;
/ X# r+ n4 t7 O0 {; ]. D1 M part.move(@);-- load part0 g$ i8 Y1 b) C$ k
@.CurrIcon := "load";2 \9 {: e( J6 b6 S9 y! E u S& i
GlobalDistObj := part.globDestination;
K/ T4 _% Y: @! B assignLObj := rgmanager.rgAssignL;
- s' y) i) [- G* D# o7 g row := assignLObj.getRowNo(GlobalDistObj);
2 U% s' J& L2 u& { if Row = -1 then -- since 70; d0 I& u0 [% R% k V2 ^
if lan=1 then" z8 F! d. w$ a4 f) _9 ]. b4 S; W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 ^5 ~" O& d* w9 b7 p to_str("in der Andockstation: \"",?.~.name,"\"")); h+ s6 T2 Y, ?1 O
else8 V0 Y, R6 t M# h. Y I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' R3 h" h2 w0 }: e5 b6 W+ h' v
to_str("in docking station: \"",?.~.name,"\""));
5 \) C% g2 F( p( D2 } Z end;/ Q% x& D8 F$ F6 J8 M
else1 O1 z7 I$ y7 e
@.Destination := assignLObj[1,row];3 H) P+ Z* c% S0 p7 n. t
end; % o; G/ ~2 q1 A1 x8 j
newDirection(@);
! ]5 w1 Z# A. b: r& H @.HasOrder := true;
! @" V0 K1 l1 O' b% t+ D e end;9 j& e, S9 G( _( P
end; V; @$ `( X/ l$ R/ O; v$ f
end; -- of the method
2 y- s- a/ w W ]$ A0 t2 x |