/* called by: entrance ctrl of the object 'track'
0 Q( \, ^( F' m' L5 d1 |*/& g; {: Q" ~- M; @+ |2 R
is9 Z4 L3 m* c4 ^) i3 H2 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* g' G6 F( A3 R1 ^. W. N0 edo _' q% ^- S/ g6 M5 ]/ r
Lan := rootfolder.Internal.Tools.AOLlanguage;1 |% B! ?6 u1 @9 h1 E7 o# Q
if current = @.Destination -- else return/ ?0 W7 T2 `0 r/ x8 c
then) C+ ~2 H3 ]) m# i
@.Destination := void;
8 w! l% ]( N( @7 C if @.occupied then$ X, d" Q0 e# f- Q
part := @.cont;
( [5 X0 v$ l, ^7 B# n2 Y @.transpOrder := void;' Q- U# F1 s4 T, q4 G) z* H5 ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
Q0 r( _% k6 S8 D, a0 X @,root.eventcontroller.simTime);9 E2 Y: Q/ ^$ W
@.HasOrder := false;" T! A7 i# O- {
@.DrivingHome := true;
1 P+ y* A: q3 G- C! z rgManager.tryToStartTransOrder;
]# n! v- E$ { if @.Destination = void
& o/ z4 R( {/ U then -- no transport order for vehicle @, l$ L# a; X3 K, \# j5 D. s
@.Destination :=; o' [0 t) U* C/ n
rgManager.nearestFreeStation(@,track.~);
1 _ o) M3 |1 O8 X newDirection(@);
; W- s3 Q- O; [+ n3 N1 E if @.Destination /= void then
" F; A9 _) p! C$ p7 D8 S& j8 O @.Destination.NumReservation :=
& F1 X) _& n' ^3 x/ x @.Destination.NumReservation + 1;
7 s! d. M- G8 j% ]& Q1 }+ D end;+ X& c/ M5 \, m* M. X
@.CurrIcon := "drivingHome";; i9 u7 H# @, t* t2 o$ L
@.DrivingHome := true;
/ T+ J: o0 ~/ z( B3 M end;
0 n7 K0 Z; D$ _2 `0 j3 O! d8 D else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 s6 g/ q- S& c$ F/ |
part := @.transpOrder;
8 Q* T" i( [9 z: w7 n, m- R part.move(@);-- load part4 H! ]* L" `* B& a) |$ e
@.CurrIcon := "load";
8 a+ X' Z- X: M3 O% d w% k7 _; W GlobalDistObj := part.globDestination;$ \1 s3 }- G+ y5 L, y" A3 u7 L
assignLObj := rgmanager.rgAssignL;
; I8 U: u, ]7 P3 J+ k5 D4 n9 ?- m row := assignLObj.getRowNo(GlobalDistObj);
( w2 i# q4 P% C% b8 p2 `( \ if Row = -1 then -- since 70+ f5 D: R+ W4 \/ S' C# T% R u' L5 V
if lan=1 then* @' j! ` ~; x9 v1 ^* Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 z% T: d8 O' q# ?8 E1 M to_str("in der Andockstation: \"",?.~.name,"\""));
% G1 `1 r; D5 R else4 e* ]3 E3 K" k5 E1 m# b+ W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," a& r5 z3 n& A1 q% T3 d4 Q1 ~7 Z
to_str("in docking station: \"",?.~.name,"\""));
8 D2 |6 Y+ u6 K# ]. h end;
$ j- [6 Y, a1 U8 g% Q- B# U2 _ else
: {+ v: w' N- \; W' O @.Destination := assignLObj[1,row];
, ]/ ~! h; J7 U. m; x end;
5 O$ J$ G) b; L9 ?& I' J newDirection(@);
4 k; a7 L# W( l# z7 c/ D( I" n @.HasOrder := true;% u9 N% f+ z8 |2 P1 v, M4 l$ g ~+ e
end;: X. w9 k) a/ Z8 x/ G' }& s
end;
* Q3 E" a( n) \$ E+ Lend; -- of the method/ B% E- l" D' ]( `' y
|