/* called by: entrance ctrl of the object 'track'2 J2 X+ e% G8 S9 g+ {
*/
8 G2 G0 I0 l0 }/ q& }9 H6 P; Dis( [6 x1 ?5 h) r" X1 h/ l' p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 ~' l) e8 s/ W# x4 N
do
- g& [" z# s: M) F Lan := rootfolder.Internal.Tools.AOLlanguage;# k+ _- W9 k" R. p, j2 \
if current = @.Destination -- else return" P6 A- E" W7 X& I, T' A$ Y6 U
then
* U: z# Q8 b: T4 D: h! f @.Destination := void;
9 L& N2 @$ }8 r7 D2 w if @.occupied then
. _4 |7 Q& m9 e' i- D* } part := @.cont;' |- [) E5 y! W
@.transpOrder := void;* O( Z6 Y- [* g) Z" N! M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* r6 U& Q8 C3 `. U p6 h @,root.eventcontroller.simTime);
f/ n; P1 }1 K @.HasOrder := false;
4 [9 D. c( Z. [2 A0 Q @.DrivingHome := true;
8 y& o. c4 }9 a& z rgManager.tryToStartTransOrder;/ T7 x0 z. S8 u0 g' w
if @.Destination = void
7 w) I4 `6 `) G then -- no transport order for vehicle @
$ w, H7 b6 T) Q7 [) O& q- C @.Destination :=
" \& F. h6 U) C) Z, t% S, q rgManager.nearestFreeStation(@,track.~);
' B/ l. v# r7 e S% J newDirection(@); 0 |2 n& Y$ u0 j
if @.Destination /= void then
9 f8 P2 z7 e! [+ [ @.Destination.NumReservation :=
9 ~2 E3 p5 e4 E5 C: s4 g. O; i @.Destination.NumReservation + 1;3 B& ^& A Q5 h2 n* K
end;
/ m! r8 K3 T: [, m7 a @.CurrIcon := "drivingHome";. A) e1 U1 U' W# u
@.DrivingHome := true;9 ?$ K( h! I3 S. z4 X% _) z7 Q" A
end;& }4 X) `6 h+ J8 C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ \6 T& k: ]& m
part := @.transpOrder;
) ]3 O, j% ]! ?3 ^; w( i2 f5 P part.move(@);-- load part
7 ^5 |8 O5 L; n+ b! N/ J @.CurrIcon := "load";3 ~; b# h+ C* U* b8 O. T+ H
GlobalDistObj := part.globDestination;
' i# k0 t9 n% C assignLObj := rgmanager.rgAssignL;
3 c; B0 E4 x0 ^ row := assignLObj.getRowNo(GlobalDistObj);8 U% ^& J6 |$ D9 ?6 }' D9 [
if Row = -1 then -- since 700 X7 G z. s- ~: }8 @2 D; `
if lan=1 then
1 P& G+ ~6 b. G/ v' d) E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ a8 Y9 b0 h5 `0 A) ]% Z to_str("in der Andockstation: \"",?.~.name,"\""));2 r. j( e+ ]% T& s9 C2 l, N
else j: `7 U8 [5 p+ W$ K: i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 p* _9 y# E' M( ]# ?9 `5 I( p to_str("in docking station: \"",?.~.name,"\"")); : N+ b: I: U8 a+ P. c# Y
end;8 ^# T4 j& P5 m; R! H7 |' ]
else* w6 v' T7 J0 u$ q. r" F8 U) p L. \
@.Destination := assignLObj[1,row];2 t$ W0 f8 L4 C3 q$ d
end; + J5 h: A1 ^# t3 ?4 J
newDirection(@);3 j& {) W& ?2 e4 M$ V4 }/ y5 F
@.HasOrder := true;
- J0 c( ^; B p5 A8 R end;% y7 `3 @) r- Z& f* R) U* q' w
end;7 G [ o+ U& k( R% C
end; -- of the method n3 J$ `: q. w; o
|