/* called by: entrance ctrl of the object 'track'' l% S* Q( k. j; a
*/
6 L, c Y$ R6 Cis
: H* m: `: }) W* I- X# x part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 w1 `6 S+ ]! u! i- n; Q+ W
do
1 F7 v/ M$ v' z* \2 e# N Lan := rootfolder.Internal.Tools.AOLlanguage;
/ Y" X4 M! F* r; M( B! V8 M if current = @.Destination -- else return
, M9 H+ i6 o9 Z5 Q then% I! E8 I& r5 F/ s' `# @
@.Destination := void;
7 u- k9 H9 P7 v- I0 W% g if @.occupied then
( T2 W$ \9 _% ^+ i: w: V, Q2 d; p part := @.cont;2 j0 |( O+ t' p% v5 \% Q4 Z
@.transpOrder := void;- z5 w5 D: ?6 ^; `. l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' o. C$ X- f3 F+ N' ]! L! b6 W8 f
@,root.eventcontroller.simTime);
. h. Y; m- s8 p9 \/ c4 s, w @.HasOrder := false;& i6 w) S6 u$ J! K. V" w% I
@.DrivingHome := true;8 U+ D$ F6 }1 w6 C4 `. N4 t* g t
rgManager.tryToStartTransOrder;4 X7 T3 o9 O4 y3 \2 ^
if @.Destination = void
! E6 l: Y" \4 z0 Y3 g9 ?8 r then -- no transport order for vehicle @1 {) A) f( g2 w# N) b
@.Destination :=
4 N2 {7 J3 k; _- c- C/ K+ a7 h! G rgManager.nearestFreeStation(@,track.~);
6 R# F7 L3 C6 f5 f0 [- p0 Z! X newDirection(@); / h. \% h0 Y3 _/ x3 C6 {# q3 n) b
if @.Destination /= void then! I! L! F u3 r H6 y ~# ~
@.Destination.NumReservation :=
9 M; U6 O1 R! U: z' w @.Destination.NumReservation + 1;
$ l. Q( R7 @2 ^: _; z end;3 f5 H8 N, n/ j- {
@.CurrIcon := "drivingHome";
7 e6 ]0 o! i# F7 h& T @.DrivingHome := true;8 D8 i3 {1 t. _, f: \
end;* D2 G; P* G' E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: G7 ]9 T9 A( p( D* M) S
part := @.transpOrder;6 Q Q6 H5 g( d% h' E! G* y3 i. y
part.move(@);-- load part
! r" l0 W1 F1 z [5 x3 ? @.CurrIcon := "load";& y3 ~7 t8 W8 ]" |
GlobalDistObj := part.globDestination;
: E: h9 h% i$ k. E! k8 A assignLObj := rgmanager.rgAssignL;
$ d3 e; i% b- v* s5 u row := assignLObj.getRowNo(GlobalDistObj);
8 Q6 j; {1 k+ y2 O- I if Row = -1 then -- since 70
# H' k$ p R& L3 b3 p if lan=1 then* c' R; c& t0 B1 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 L$ p: K+ r: z. c$ I
to_str("in der Andockstation: \"",?.~.name,"\""));
4 m. k0 V- _, U/ y& _: S else
0 [7 p0 z5 z4 X/ W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# T# q2 t( h! L2 s }2 s- s to_str("in docking station: \"",?.~.name,"\"")); 7 y+ j. F# d* }% P3 D. w
end;
3 F- m- u3 y$ i7 @" b4 |& C, k else- t3 m* Z( e" d: K0 Y2 R& i, y
@.Destination := assignLObj[1,row];- H$ G' M k$ O
end; : w' W/ i* ~; Q: x
newDirection(@);# P! N( D( i9 e4 T. n
@.HasOrder := true;
0 d8 K, ^; F! p/ T0 ]8 E, h end;- R% P! B& Y1 ]5 t; v0 |
end;* B/ @- k6 V0 N( M3 U
end; -- of the method
: f( k! J2 g9 q) a0 @ |