/* called by: entrance ctrl of the object 'track'
/ Y+ r F* h5 h1 j* ^*/
8 E: J1 i% }8 b% g9 W2 p% dis! d8 g5 j. [, U+ ?* f3 D* G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ I; {- [! Q, g8 m ? h9 s# i- ]do( @3 K1 s/ o: R# C
Lan := rootfolder.Internal.Tools.AOLlanguage;5 A$ d0 J$ _1 j8 F, K9 v3 f
if current = @.Destination -- else return
. J: Y' y+ e0 H+ _* E then4 Z3 G# \/ r8 M I4 o8 M! T
@.Destination := void;
+ F' i; |2 j9 ?4 a- H7 ^" g- @ if @.occupied then
$ A6 b* u0 n8 Y* O$ r8 v part := @.cont;4 N+ s1 s+ I4 `6 E
@.transpOrder := void;
' I; q f) h) N- f6 a2 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 A& d- r$ |; g c I: O
@,root.eventcontroller.simTime);) m z+ ~8 @& R8 Z. O% e8 a
@.HasOrder := false;: z ]+ }- U# ?" G: J' n1 Z' Q& @
@.DrivingHome := true;5 V1 ?- t9 I' x) F! Q+ E. o4 o
rgManager.tryToStartTransOrder;- Y! Z+ a0 S [
if @.Destination = void( M8 \2 M V+ o6 p& l# g
then -- no transport order for vehicle @
: C8 Q% x: L7 Z" Q; R' F! G @.Destination :=
4 P8 ~1 h- R, @* W) f rgManager.nearestFreeStation(@,track.~);
! \0 w0 v4 S+ f% W) d, r newDirection(@);
% z% u2 z* ^& _. c2 ?- i0 G if @.Destination /= void then
* F4 W% f" f0 Z, {3 z @.Destination.NumReservation :=
X' [+ [2 [$ h9 r @.Destination.NumReservation + 1;8 b3 V2 F5 j* y+ M I
end;
1 ]/ ^4 j! Q2 p @.CurrIcon := "drivingHome";8 I2 O$ C) x/ P! @1 X
@.DrivingHome := true; O" b% f$ D9 q. ]0 E2 Q
end;0 W: r* @6 k0 b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 T: d" K4 }$ v/ w" ?4 ] part := @.transpOrder;
8 }/ F9 Y# i$ S/ Q part.move(@);-- load part* z+ K9 A9 U4 G; c! E- V
@.CurrIcon := "load";5 c# p% x& d7 {8 V6 x
GlobalDistObj := part.globDestination;. l/ O9 R4 ^8 ]4 M
assignLObj := rgmanager.rgAssignL; Z b) ^7 k5 W) | x& r3 T. w
row := assignLObj.getRowNo(GlobalDistObj);+ s; c& E! U+ D, d8 }, `
if Row = -1 then -- since 700 h0 |6 X1 Y) v6 F' {
if lan=1 then1 B. M c e/ [7 I# x d: x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" p2 F$ T$ U9 H- C0 q to_str("in der Andockstation: \"",?.~.name,"\""));% A: D9 C/ O! |7 Q
else
' O& y' R4 J& N6 K$ C/ N) { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- F" H( g1 s K4 t8 g
to_str("in docking station: \"",?.~.name,"\""));
7 M. A) G% Q/ c) o' b5 e/ m4 R3 k! y end;) k% G- B4 n7 x j
else+ Z, d& @. R9 T0 G, V8 Q( E. N! |
@.Destination := assignLObj[1,row];
$ R7 {1 m, m# B$ c5 {- G end;
9 O$ w) s/ O0 D2 W. V* F newDirection(@);
$ C# d% h1 y0 i- d9 X2 J @.HasOrder := true;
7 \& w& @, p7 p, E end;+ A. x% @# J b, R; _) ]) P$ n
end;
! d3 b! p( O, ?# D4 E. S+ ^: Send; -- of the method
4 w: F% n( x( b5 o# t3 ?) N |