/* called by: entrance ctrl of the object 'track'6 i- M0 B% g: S& C0 f
*/
5 x) E1 y) w0 P* Z( m. Yis
% @2 Q& z; p: @0 z( s part, GlobalDistObj, assignLObj:object;row,Lan:integer;: l# s9 p5 Y& ^1 ^
do
2 ^. q0 n' ~( @& A Lan := rootfolder.Internal.Tools.AOLlanguage;
; p3 b# o- r" o- w% ?$ v if current = @.Destination -- else return+ x. p. u% ]9 Q) b
then) w+ J k6 Q7 f" i, L8 F
@.Destination := void;& m2 E6 S+ C. d v
if @.occupied then
+ c# H! `( ^3 `7 T/ n( ^! _# c part := @.cont;% B# @% i/ ]! M1 ^/ W$ w
@.transpOrder := void;4 ]3 n5 g" o$ m( X9 {! R+ r) Q' o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* M1 d |7 P* K, v: g" o @,root.eventcontroller.simTime);
& B, ]' `/ l; [2 u+ d+ K$ ^ @.HasOrder := false;1 U5 A4 E& m- g3 T7 I1 q8 t
@.DrivingHome := true;/ _$ s* z9 t# L1 ^4 j8 V5 ~
rgManager.tryToStartTransOrder;1 D3 d- U& T/ S d: M |
if @.Destination = void! |, M! s3 c1 K5 Y. b( g
then -- no transport order for vehicle @
+ |: g) n2 r9 @, k6 N2 G4 e6 d @.Destination :=
; e. a* _- C3 \! F5 ] rgManager.nearestFreeStation(@,track.~);$ q) H4 a9 ]" b% O& e/ k
newDirection(@); ( M- |8 L( C- }# ]
if @.Destination /= void then
I# N6 w5 z* P6 `/ M @.Destination.NumReservation :=
" e* t. d/ |7 `6 n* O6 A5 u @.Destination.NumReservation + 1;9 j3 n! ~7 b X
end;
1 q+ U5 ~/ a2 I# z$ \; } @.CurrIcon := "drivingHome";
% W$ c1 S3 }: k- m% P' }8 o+ [8 E" o0 x @.DrivingHome := true;* z3 e: h5 r, v2 F# ]$ w0 |
end; ], w/ e0 E6 ]9 {+ z3 L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 q" z! }( r$ L" R
part := @.transpOrder;2 i' u: C( o6 G" z& l
part.move(@);-- load part( r: Y( }( a# v: c7 f
@.CurrIcon := "load";- m8 S3 R) f0 S4 H
GlobalDistObj := part.globDestination;! V% |, H1 ~" v; R" u
assignLObj := rgmanager.rgAssignL;
- I; F+ l1 B4 a row := assignLObj.getRowNo(GlobalDistObj);
0 W2 _. ?; B) E9 E if Row = -1 then -- since 70! p7 ]/ v% s, i4 S
if lan=1 then% g; }! A* X; E3 _- X% Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 K* o3 {/ H4 _9 @& K# D5 S% [
to_str("in der Andockstation: \"",?.~.name,"\""));& e3 k% P* W1 G
else, P; x0 A2 i% L: V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 b. P, [7 j( ~- W" v
to_str("in docking station: \"",?.~.name,"\"")); 4 m: ?, B4 y( P( W1 Y
end;
6 G( |3 C D. I. ^6 { else
- S" K; _6 m- y7 L @.Destination := assignLObj[1,row];
2 \2 q+ F; D# {& [ end;
* m5 e- {8 S, o8 x. N newDirection(@);
# X& u3 `1 Z% v: \ @.HasOrder := true;$ O' s" i7 \0 ^' n! v- x5 U
end;
% k9 ?, Y" x+ l* J! _ end;
" h9 A" h3 g" hend; -- of the method
- P% B$ F( i+ n |