/* called by: entrance ctrl of the object 'track'1 [- h. i( K7 B* X& x+ M
*/, j# |3 S- I5 p+ F' v5 w: g
is1 O$ |! R! J/ l* P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% ~/ V2 Z+ n# j o$ c5 t
do
; _2 v) U5 ^5 o- o Lan := rootfolder.Internal.Tools.AOLlanguage;
* D* o# Z' E& {- s; T: i if current = @.Destination -- else return
6 g" g( a2 ~. I8 z" |' | then1 T7 M4 V Q" N4 }; {
@.Destination := void;
& U& W0 g$ N+ Q if @.occupied then
3 ?' d2 ^; }+ u: |9 n/ h part := @.cont;% H) Y9 E) ]6 l3 z/ ~: Z1 p
@.transpOrder := void;+ ?$ V. w- C" z6 @8 q% |5 J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% `, S! Y( w+ R9 X9 J @,root.eventcontroller.simTime);
5 r Y K P8 A s @.HasOrder := false;
4 z* k# S9 r$ O: ^9 c( p7 }! A @.DrivingHome := true;+ r0 m% ~! y2 V, D* X8 e( n# {/ y
rgManager.tryToStartTransOrder;: z3 N$ D% m6 T+ c6 G% U8 h
if @.Destination = void
* p, N: Q k: k; Q& l4 g" W3 { then -- no transport order for vehicle @
# I5 F6 n3 l5 T @.Destination :=* M4 H% E/ f! Z) A8 k
rgManager.nearestFreeStation(@,track.~);
2 j, \/ R) ?8 [0 Q. R newDirection(@); / f; ]# M$ z! o! a- K. K
if @.Destination /= void then: z4 r. H6 Z) b+ `
@.Destination.NumReservation :=
" r1 g4 C: F. c- M3 v1 ` @.Destination.NumReservation + 1;5 C' W: g5 V- U1 k& r
end;
0 b k! g) c Y a2 {' ^ @.CurrIcon := "drivingHome";
$ {7 J) B: d% _1 ^- t; K @.DrivingHome := true;
) I4 J) O9 K0 W A. B end;- z7 O: h% M- i2 I! y( a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 L( ^; |4 O) N' ~; }* N( u
part := @.transpOrder;; U0 O+ } ~# m/ E: g5 u4 m
part.move(@);-- load part' o6 a4 H% c) D+ R1 t
@.CurrIcon := "load";% n' A4 z7 f( } i
GlobalDistObj := part.globDestination;
3 f( Z3 G2 ^2 C0 f+ B3 M9 {# i. m assignLObj := rgmanager.rgAssignL;2 c5 k' h2 {7 N) K# | g: h& e
row := assignLObj.getRowNo(GlobalDistObj);
& d2 f, n9 S( T; t% ? if Row = -1 then -- since 70
9 N( a! c0 p& E3 _2 N1 K4 H if lan=1 then$ n! o- G8 I/ O; A4 V+ {$ x- Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; \8 X' \/ D, w, d( ]% ~1 L' J
to_str("in der Andockstation: \"",?.~.name,"\""));
* P1 J# ?6 G; R8 e* F/ F else
e0 U% \. h7 v8 K; Z/ H; _3 Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 ~1 C7 f, r6 J# ~* M1 z% y to_str("in docking station: \"",?.~.name,"\""));
) A/ {6 L! e4 a end;
; S# X& K4 E& s& X2 n else
; }4 u% @+ M A% M2 P2 `- j, z' C @.Destination := assignLObj[1,row];# E5 d+ ?, V. u$ R, Y2 N' h
end;
' R$ J _8 v8 |9 O newDirection(@);5 N# Z+ E$ p. I" ~0 v
@.HasOrder := true;
+ ^& k7 W. ~& ~$ d7 K end;% h& B g4 K- y, T+ ~
end;: r* r2 P2 X) c
end; -- of the method
! S! Q# o( n8 q7 c1 N& t |