/* called by: entrance ctrl of the object 'track'7 y' L. [2 s( J
*/: J3 d7 f9 c0 i3 L: j8 @% f
is
& }/ [* T( X0 H- \) }3 W8 ~5 j part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ b3 j9 m/ g% ^' u, Zdo$ n* Q5 C. ]- J2 x# |7 z
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ X5 Z6 u' g& \( |/ F" v if current = @.Destination -- else return
: m. J% n' w( `! [& ^. u9 z0 G1 j then
6 h$ n5 S0 o7 I0 t0 I @.Destination := void;
) y2 H& i D; P& ]/ B if @.occupied then$ n/ G) `) n2 A: p9 \/ J
part := @.cont;
6 \: ~/ t, ^$ S: p5 s @.transpOrder := void;5 R' b: h1 H; ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 ?* J' S, `! g$ z+ ?& Z
@,root.eventcontroller.simTime);
: @ i. c5 @+ K$ p ~7 ~2 [ @.HasOrder := false;+ ]/ q# j4 k/ V& s0 u
@.DrivingHome := true;
U) O* k$ C" p2 _* j rgManager.tryToStartTransOrder;
3 s3 k9 C' {4 ~8 v0 B0 T4 x+ S if @.Destination = void8 A' M* b* v7 B) r
then -- no transport order for vehicle @
; M* n3 `& Z3 W9 a: E& C @.Destination :=
8 M- t, B6 T) e* b1 {# _ E$ U; S rgManager.nearestFreeStation(@,track.~);
( X% l( c7 z- t3 j+ Q6 F. \ newDirection(@); ' l% }/ V- H* M w
if @.Destination /= void then
9 F" l& P8 Q6 S& x& n+ t @.Destination.NumReservation :=; T: S* j# f1 N9 P) D: ^7 R; |
@.Destination.NumReservation + 1;7 c( w/ w6 q& M3 I( t$ k2 v1 M5 i
end;
+ G, c; D8 P9 o+ g! o- k @.CurrIcon := "drivingHome";5 K5 E! H5 L, w8 a0 E/ ~( H3 Z, C' e
@.DrivingHome := true;) d' B, i+ |0 a# J' o' ]4 i
end;' l" y7 W# _# n% k! h
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 X' `& W2 r* A part := @.transpOrder;
: A& h/ p& B& ~: Y+ p0 ~7 a' a part.move(@);-- load part
" F: |. u' C* V2 W& P @.CurrIcon := "load";- h- j- r2 M" i S$ y5 ]: s- c
GlobalDistObj := part.globDestination;$ q7 P4 n3 J- l
assignLObj := rgmanager.rgAssignL;1 `# ]+ f. @2 o1 I# ?
row := assignLObj.getRowNo(GlobalDistObj);
8 q+ U" ], a( W4 c5 ]; l0 x if Row = -1 then -- since 70
- f. \3 e+ J6 u if lan=1 then
2 u: t$ E/ i7 A+ @6 T! g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! h1 l e% ]1 ^3 A5 k to_str("in der Andockstation: \"",?.~.name,"\""));( Z7 \+ c, i x* m
else
2 d$ ^) \" U1 q+ }2 | promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 [: Z! i# Z! F1 z
to_str("in docking station: \"",?.~.name,"\""));
. W& z R8 c z* u end;
& j4 i% e2 h7 J1 P( ?4 t else
3 R9 Z7 c Q9 A; N Y: K v @.Destination := assignLObj[1,row];; ?7 h' h. j2 X& J2 C I
end;
7 r& T% F8 ~- L7 y9 | newDirection(@);9 O" q4 A7 |" v0 d
@.HasOrder := true;
" R* i. f/ M( v+ e2 _- w end;
% c9 h. m9 @8 X, K end;
5 t$ l( {- |! v, x, Gend; -- of the method
4 M7 m" z; }: M5 d9 }3 x |