/* called by: entrance ctrl of the object 'track'
" t% s; m2 R6 G" X*/6 W8 f+ N& U s9 q! ?; h
is
" l/ w$ F; C8 a: w5 S# T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 @' a6 V2 D- J4 rdo
* }7 `: b2 ^$ ?! B7 a7 Y: a9 ? Lan := rootfolder.Internal.Tools.AOLlanguage;7 T5 {8 V% o P5 z9 i @
if current = @.Destination -- else return
$ _4 q+ o% S- {6 }& ~ then3 R0 ^1 |2 }2 y
@.Destination := void;
L+ |* B0 v! J9 P% J0 h if @.occupied then+ ~; b& F: {) j/ [: r9 j9 b0 H& _1 m
part := @.cont;
/ `# G: a3 ?8 j; o" [$ K @.transpOrder := void;4 c" R& |. T4 ^: O0 E& w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 l0 ^3 G1 _' G; K. N# M
@,root.eventcontroller.simTime);
p0 F& N$ E7 F* \4 X* a# [2 X @.HasOrder := false;5 G6 L% w% \+ A4 d! o6 j! d0 f' F( T
@.DrivingHome := true;: I( b9 V! C8 v' L% s
rgManager.tryToStartTransOrder;
" F1 H- F/ F5 ]- E: ^# A' _* C if @.Destination = void6 T q( |$ y2 I+ U8 Z
then -- no transport order for vehicle @
* \" `$ c! U: T' J4 M4 } @.Destination :=
4 z4 _# r9 s" T8 O( K4 v# q6 B rgManager.nearestFreeStation(@,track.~);! N# l+ V6 u8 o" V9 d
newDirection(@);
2 _* @) ~, j2 V3 @$ f" T if @.Destination /= void then$ J5 y! Q; n4 E5 {
@.Destination.NumReservation :=
6 ~* h) s9 g S: V1 T @.Destination.NumReservation + 1;
2 }3 t) f) N; p. Q: a1 E6 b: ` end;
) ?# d3 ] w" o @.CurrIcon := "drivingHome";2 I$ @$ x- |" u
@.DrivingHome := true;
9 [. @1 u1 X( q/ { end;3 F" [- l, s' y9 \2 p
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( c" q9 ^& ~9 W2 W
part := @.transpOrder;5 B) ~, e; o; p/ O3 N, z7 s& u7 O
part.move(@);-- load part
) G, A/ |" ?6 T3 B, o @.CurrIcon := "load";
9 `4 H% w* U- H% Z GlobalDistObj := part.globDestination;
3 D1 s" G/ A% |: u assignLObj := rgmanager.rgAssignL;4 t3 D4 @' n; F0 ` X
row := assignLObj.getRowNo(GlobalDistObj);
' V" @% N+ s- A, P if Row = -1 then -- since 70. ^- h$ E8 J9 n3 a3 K
if lan=1 then; W" `3 F6 s3 e$ V3 ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) \" {: X4 `* @- o% H to_str("in der Andockstation: \"",?.~.name,"\""));
1 o2 S; y3 l R# N else
, m; H( \' j h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), U+ P) S2 W+ @2 n
to_str("in docking station: \"",?.~.name,"\""));
5 L1 x1 j# M/ z9 Y* O3 T. M; H: ^ end;
, {% e& h" O2 ^( w( Y else
0 U; H4 V: z4 }0 W @.Destination := assignLObj[1,row];) v: b- C9 N6 L8 s2 u$ a( \; {: C
end;
5 D8 T7 E" L0 @5 k R* e newDirection(@);
0 o# a9 V( }' ?( Q$ ]. d( Y @.HasOrder := true; \ t8 X0 i0 K6 L9 x, g0 F
end;4 }5 @' d: A, w8 p0 R
end;+ C A" d! {$ v' P& N
end; -- of the method" w# ~, M# _* F9 l4 |+ P6 {: D9 Z
|