/* called by: entrance ctrl of the object 'track'
1 l" O) @2 ?5 y6 a: g( M. H*/) l: ?( H3 b! J+ W% @/ m1 o8 E
is: q: {' F6 t. D! A
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; r/ p1 d- M" z- A( b3 H
do
) c+ R9 }. E/ D0 d; \9 x- | Lan := rootfolder.Internal.Tools.AOLlanguage;% E" O4 g" ~/ z7 T
if current = @.Destination -- else return
& J9 v# G3 i9 n* N: S/ J- ?6 x then! u7 p4 W# R4 w# x6 O* v
@.Destination := void;9 u5 A/ D$ [6 @+ F
if @.occupied then
3 ?- J, U0 c6 Y& C part := @.cont;
/ H$ \+ ~6 _2 B @.transpOrder := void;
. Q9 [9 u5 h* o1 P! z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) u/ Z+ b7 a- h7 U8 X4 Z @,root.eventcontroller.simTime);
% N' l2 s: z h& S* s, E$ v @.HasOrder := false;& H+ p/ C) l( g
@.DrivingHome := true;9 v+ M6 V. J. A7 q) |2 [6 n* `
rgManager.tryToStartTransOrder;
8 L7 X& t% M* c2 s j if @.Destination = void
9 w6 ]" O7 k, @9 w then -- no transport order for vehicle @! Z# Y7 \8 K- C8 r+ F
@.Destination :=
, h" p; h2 ^* ^. O v' [ rgManager.nearestFreeStation(@,track.~);/ \: n# u3 c$ J- k1 I! K1 \
newDirection(@); 3 F# V) i6 f; y( R6 O% H6 P
if @.Destination /= void then& M5 d, \; ]/ y; p$ t$ S9 b
@.Destination.NumReservation :=) h) r% L( f+ m- u# @( q: O& S
@.Destination.NumReservation + 1;
" a7 P8 V; N/ j3 w1 x end;
0 Y' y" J/ R* M8 p7 V; B @.CurrIcon := "drivingHome";
1 D ^- b) Z3 `" Z* f @.DrivingHome := true;0 @7 ?! Y4 o' w5 f
end;2 u Z/ Z* m1 L+ y, @/ s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station/ N) a! D; |8 {/ Z; g( F
part := @.transpOrder;
( e, [0 ]" h3 B, z9 ] part.move(@);-- load part% x* i) u$ Q# V
@.CurrIcon := "load";
# Y! G+ q0 w/ z& ]9 n1 U GlobalDistObj := part.globDestination;( w7 |* W: t$ D3 q
assignLObj := rgmanager.rgAssignL;
" W" l$ D2 G- u# _7 C row := assignLObj.getRowNo(GlobalDistObj);
* t. w0 P1 n1 n2 z! d3 Z if Row = -1 then -- since 70
4 }6 V r/ u4 e& C$ F if lan=1 then0 ]; y; U: ^" j# N- V- ^; j+ ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 I5 p, T1 B: z to_str("in der Andockstation: \"",?.~.name,"\""));
' G f6 l: k A0 a' ~, `4 U else
8 z0 C% D0 w7 {4 L4 }4 _1 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 q! C& N; {) }+ ?. z1 [ to_str("in docking station: \"",?.~.name,"\"")); 3 ~# l; |: k' p5 N) M" ?1 G a' ~
end;
- M* o& w/ L% y: J8 W& Z1 f else
) m o8 J5 F+ K! x4 h @.Destination := assignLObj[1,row];
3 h, X& X" Q# a' c1 i. Q end; 6 u5 e! |2 R! v5 K
newDirection(@);' D6 h' `; B5 ~* a0 W5 g S
@.HasOrder := true;
* H9 P! W6 L" q/ C/ Z end;
' j& B4 t/ a$ j, ^, z, T% O end;
e- n8 R b! q$ Z8 ~( Nend; -- of the method- }' ?5 D3 R: c1 n( f8 C; ^' N6 Y
|