/* called by: entrance ctrl of the object 'track'1 ~, k) y$ w+ ?
*/7 L7 J) r0 i [& d( k, M1 y
is& x! ?& C) p9 n) v6 N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ L4 B; |) _7 J8 Ddo
8 A) O8 _* k+ S4 _1 m Lan := rootfolder.Internal.Tools.AOLlanguage;
% E: q B6 P* Z if current = @.Destination -- else return
, {2 G U' I% u then
9 N4 w8 _- F: @ @.Destination := void;+ {) J$ C/ E# f# {, ^" q
if @.occupied then4 h' @5 F& \3 ]) Z) S2 |( m
part := @.cont;
2 h( g9 c- O7 J @.transpOrder := void;. t% O( v0 j0 Y: N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; y+ G) x; D4 m- W" A @,root.eventcontroller.simTime);
2 i+ U% }8 r' \8 j- }7 j8 U: I8 i$ N @.HasOrder := false;
1 p) f1 a, U! }; c% k4 Y' n6 U @.DrivingHome := true;
% D% x1 _! b; j) m' N) ], u; o rgManager.tryToStartTransOrder;1 g8 u5 F* | U& O: @0 Y* E& u
if @.Destination = void/ }; e+ S6 h" k
then -- no transport order for vehicle @
# V4 I6 X' _/ S" U+ n @.Destination :=
0 u& B: }. s5 P1 c7 W rgManager.nearestFreeStation(@,track.~);
$ p& ^, G* `" Y2 O. j) G0 r newDirection(@); 3 `! W$ ~" q, L7 I `7 z
if @.Destination /= void then* D) v7 } p: x! j2 ~! K E- @! e
@.Destination.NumReservation := F D6 n1 O) @- L
@.Destination.NumReservation + 1;+ F2 R2 F$ F2 s; {$ ?* j
end;4 v0 N, m! ^6 j( \ c. u; y* R
@.CurrIcon := "drivingHome";
2 e0 v) g% C; c6 t8 Q @.DrivingHome := true;+ F. t/ ]1 X0 E) z3 D7 F
end;2 t! h: {" S% i6 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 ^' p3 V6 G' _4 u" t) K- p
part := @.transpOrder;5 C Y7 P, ], o b' h$ n/ S- j
part.move(@);-- load part
* O. _5 r+ t& \- z( h3 e V @.CurrIcon := "load";
# H7 ]6 T- O3 }: e$ P% _- M# X8 j1 P6 u GlobalDistObj := part.globDestination; h6 L N) f4 S8 u: h! } q' o
assignLObj := rgmanager.rgAssignL;, v% n* ~+ P& Z2 ^# p+ `" X$ {0 n
row := assignLObj.getRowNo(GlobalDistObj); H" z! w; f5 W# e, \+ X. d* C
if Row = -1 then -- since 70
3 j6 u) B/ C: n if lan=1 then
# e9 p; u# g8 S) c2 d! r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 f# o$ q+ d+ S. v9 V) s& x x8 u6 _ to_str("in der Andockstation: \"",?.~.name,"\""));# ?* G4 d4 {3 I8 R3 m
else
! K$ e/ ?) S0 w4 O5 x& b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 X! }, i+ D- b9 n- I to_str("in docking station: \"",?.~.name,"\"")); % V4 e+ |8 w, p: y3 Q7 D1 Q! g
end;
0 b1 h3 L. l3 O5 @ else- m w) e- R3 U% a! r5 s# J9 X4 U
@.Destination := assignLObj[1,row];0 T: N0 o1 m9 Q7 \* g
end;
" P5 F0 }0 t- U0 K. \ newDirection(@);* C/ L* N! S( ?8 n
@.HasOrder := true;
3 f: i( Z9 c' b end;
) j$ N( x6 r; i2 q end;. ~! V6 |# p \% j* j
end; -- of the method* R! ?' r( T) n1 E; h: @
|