/* called by: entrance ctrl of the object 'track'5 O4 Z* W2 b6 ^4 b5 c5 U
*/
" x6 E9 S0 l6 ^/ e- J3 Yis
T2 ^% s3 l& @* e& c2 f part, GlobalDistObj, assignLObj:object;row,Lan:integer;
S7 H/ l! R. H8 B( N Q- Xdo# A& `: i, `- R; b& J. B" p
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 }( ]' G4 @, N* p if current = @.Destination -- else return
" L" M" _# f) m- \. o; k- ]5 [7 O then
7 j( r( l7 C# V2 Z5 u @.Destination := void;4 o0 [0 \3 [2 b7 |$ V; L
if @.occupied then1 n/ P5 l) w8 @; [3 {+ J% a) ?
part := @.cont;
: K$ y4 H9 s. U [/ u. Y @.transpOrder := void;
. v: R) t( y5 v7 C8 E3 M/ h, }: Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 P+ Y2 T! t" q1 f) L" C, l1 d I0 r @,root.eventcontroller.simTime);
* k% r' w0 w5 d4 q \- k' e. ^% K @.HasOrder := false;+ G6 f$ q$ L. e6 X; L, S6 U
@.DrivingHome := true;3 Q q b4 s: g5 N. |) w; A" K V
rgManager.tryToStartTransOrder;
$ A0 ?' g! Y5 {0 e: V; O if @.Destination = void6 j3 ^1 ^& {( |/ @
then -- no transport order for vehicle @9 H8 Y2 W9 S- {
@.Destination :=. g- c) a4 k( ?2 }* |
rgManager.nearestFreeStation(@,track.~);
, E$ |; Q; a- C2 i% D' u newDirection(@); 5 h' y1 h6 }. k* \* F/ |+ r1 t) v
if @.Destination /= void then
7 s P5 J7 o/ S) _. R g' |" A4 X @.Destination.NumReservation :=, g+ l# N0 ^0 }) N& d
@.Destination.NumReservation + 1;9 g. W4 Y6 `0 e0 m6 Y
end;* i# \* N l* B' N& J. x7 i
@.CurrIcon := "drivingHome";- P/ x$ F) k6 {, J: \4 h
@.DrivingHome := true; u0 j8 ~3 G2 s& B% [- Q
end;7 Q- M; l: o5 x P9 G, v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ _2 s( N' A1 V% T6 Q/ x part := @.transpOrder;8 U- ~8 V: i' n4 I" b; X; K
part.move(@);-- load part
$ }) ~7 z, }4 X @.CurrIcon := "load";
" D9 H2 H" Y% `) d GlobalDistObj := part.globDestination;
* A3 u) |# ^6 S, O5 F* A B assignLObj := rgmanager.rgAssignL;- V# U0 X. x# d) t: H: a P
row := assignLObj.getRowNo(GlobalDistObj);
/ V- u& P: z6 y) _/ R# @5 s: M5 J if Row = -1 then -- since 70: C; c2 g( v5 K/ Z8 l/ @
if lan=1 then
" t! y0 t3 m8 {4 | promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" E2 J/ b+ q6 C' ` to_str("in der Andockstation: \"",?.~.name,"\""));
1 Y2 d* e: D0 u4 W else
4 ?. F" N- C) g) L+ S7 O- f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# m2 q9 n% M$ e, c% {5 `- r& Y: S to_str("in docking station: \"",?.~.name,"\"")); - }; p4 I2 f; }; W$ v
end;$ `& _" Z+ y( Y! q
else
* C4 ?: I3 q0 |0 e& d1 D1 w( @ @.Destination := assignLObj[1,row];# }9 j3 g+ B* l3 L7 c1 r
end; & ]$ B' z9 d% V, p& [( [6 A, r
newDirection(@);
0 ?. t2 ^& G# a: g* w9 H" j @.HasOrder := true;0 }( d4 s1 H0 t0 y/ m7 z
end;
, B F8 T2 u. @2 J2 Q* o end;5 m$ p4 _& W' f C7 P
end; -- of the method' I+ j8 M/ w% P! J1 S9 p5 S+ W
|