/* called by: entrance ctrl of the object 'track'3 q) I+ @, J. B7 H$ V
*/8 D& q8 V8 ~% @
is
1 M' y5 Q2 R( P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) i" h+ {2 X' @/ |& }do
- J( M1 Y2 Z* z. c Lan := rootfolder.Internal.Tools.AOLlanguage;; U2 m7 j. Q; h& H4 F6 G! K
if current = @.Destination -- else return
( |" H G( \' i7 O then ~& ^5 {% L8 d0 A& ^7 s4 _
@.Destination := void;8 F0 J" f8 u! p: [+ s
if @.occupied then
) Q; | T! T" X, { part := @.cont;/ }( H1 Y& A5 D) H; I
@.transpOrder := void;2 M$ N8 p8 ~; K, L
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 J6 X! }' E0 x1 e
@,root.eventcontroller.simTime);
4 p( A2 f; W# x! X: W$ d6 m7 W2 a! U @.HasOrder := false;
" Q6 g# N: D7 J+ z* a- Z! q. T @.DrivingHome := true;) O H: F$ H: @0 t, k0 m$ F
rgManager.tryToStartTransOrder;
7 [; H- M0 f) l; \4 Y3 K if @.Destination = void
( P& H3 v2 \* _7 ~& ` then -- no transport order for vehicle @3 {3 W8 g8 a7 W& x. s& |9 |8 P5 b
@.Destination :=% {1 U# [1 { p4 Z
rgManager.nearestFreeStation(@,track.~);* o) l" M: z& G: R# F
newDirection(@); & ~3 B, ?! w+ x* W& C7 e' q' a
if @.Destination /= void then* a2 s* L" A; o
@.Destination.NumReservation :=' {5 f+ O, i) c" u* I3 _) e
@.Destination.NumReservation + 1;
2 x0 a0 n n! M% b8 M end;
5 C8 B* W' Q3 f8 B) y2 d @.CurrIcon := "drivingHome";, [4 W. i) D; K7 h9 Z/ X4 V" h# s3 K
@.DrivingHome := true;! g" A$ W3 J1 ]! b5 f
end;) u& J- @4 A4 x# ?) D! `2 | {2 @: k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) P2 v/ v8 x$ ]" B
part := @.transpOrder;
0 Q* }) s- c" S( N" ]4 }0 s part.move(@);-- load part
8 ?: B- ~) h$ ^2 p @.CurrIcon := "load";
! a3 `. g4 F2 w6 M- U GlobalDistObj := part.globDestination;
5 E$ n4 y# P) V. l assignLObj := rgmanager.rgAssignL;
( v s' I, W, g8 S7 V# V row := assignLObj.getRowNo(GlobalDistObj);
+ j9 K& D3 y8 P4 q if Row = -1 then -- since 70
& m; x+ E- e* ?6 S if lan=1 then. _# S& c! u0 z; B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( J3 Q5 R9 G( b4 ?. ?# B
to_str("in der Andockstation: \"",?.~.name,"\""));
4 S, E6 o, ?2 P1 @6 k. j4 k else2 L+ o g3 { c @/ R9 L1 h. _7 T! y0 X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, o/ g8 O+ H- B+ D! ?. e to_str("in docking station: \"",?.~.name,"\"")); . P0 s1 N$ N& o9 N5 ]% h* J
end;
+ v1 i0 W9 Q# z% n else
1 q9 m& E3 g. l @.Destination := assignLObj[1,row];) b) g7 Y1 J) y. R$ Q
end; # r1 X! D. g3 q. M6 v& J
newDirection(@);8 G7 M/ K& w2 q
@.HasOrder := true;
7 x( r8 _- {" u8 I" u3 a- y end;
) j1 n1 [% p- y) K$ s# U+ n0 n" d: e+ j end;
0 u: A* q6 v, ?+ q. `9 I+ vend; -- of the method( J0 a% i6 x$ [/ U& o0 u9 w# T
|