/* called by: entrance ctrl of the object 'track'9 C2 x2 g) }7 ?$ T9 J
*/
* L& ], n7 R% @' A8 M8 Yis u. [) p) a2 |9 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 \: f, ]3 j6 g3 T7 {
do0 j7 p) N; w8 ^4 D5 V. O/ l4 p
Lan := rootfolder.Internal.Tools.AOLlanguage;; }( k* i2 x) L1 Q4 F$ R* S
if current = @.Destination -- else return
3 W& t+ i9 z* l- J* V then
8 l# i: i, U- d8 }" c @.Destination := void;
6 y/ r3 R' I$ V0 H if @.occupied then/ c- w; b; { D' {
part := @.cont;
# ] U' G2 q0 X0 _8 X+ e# W% A$ [' M @.transpOrder := void;
& W0 j2 Z8 P( \, X+ H2 _, B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ r5 j, e& c- x% a1 ~ @,root.eventcontroller.simTime);1 h4 ~2 }- O( y7 D2 F) Y4 T
@.HasOrder := false;& o6 r$ Z5 E" N& m1 F2 d" A6 D1 f
@.DrivingHome := true; g/ x9 {6 G. ?
rgManager.tryToStartTransOrder;* D5 P4 G: S: T5 w/ b$ ]
if @.Destination = void# W, ~1 G6 ^! s. q& [
then -- no transport order for vehicle @
; Y: `$ ^- ~$ k9 v2 W' W. ^ @.Destination :=* ~6 l) j/ N0 \) K
rgManager.nearestFreeStation(@,track.~);
t& A& T! b* T" A3 s3 M; S% L newDirection(@); / h2 w- k4 \9 I
if @.Destination /= void then
& Z6 j6 n5 Y8 |6 ]6 B0 R @.Destination.NumReservation :=
6 f7 m% @- ~$ E7 | @.Destination.NumReservation + 1;' p% w# k8 d+ l! r+ Q& I# _ G
end;
) n7 _7 O( N1 x2 i$ w* ] @.CurrIcon := "drivingHome";
1 O* a& J7 f" k; P @.DrivingHome := true;5 ?* r5 y' Y! o$ J' G% ~
end;+ K, A: s4 J% d" b d$ J( U. m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# }1 X. i8 w' N: w: B' a& `
part := @.transpOrder;
9 M, q% W' f' ?: N! V9 P( _* z0 K; i part.move(@);-- load part
+ ] r& q* `1 S7 t% U/ d @.CurrIcon := "load";
$ a: O P2 @2 t: s8 g* f% C- a GlobalDistObj := part.globDestination;7 K3 k) U, M, }& i
assignLObj := rgmanager.rgAssignL;5 W5 F: G0 l8 [7 Z0 u
row := assignLObj.getRowNo(GlobalDistObj);
% T+ M. s2 g) w' ? if Row = -1 then -- since 70% i- a- w- m6 b: d4 e5 S2 P/ o
if lan=1 then
: b- w) b( }7 c; l4 e& j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; ^, b; o! K- j% S) Y7 J' w( j2 I' B
to_str("in der Andockstation: \"",?.~.name,"\""));6 t! z" b, H- ^2 f( O, H+ X2 K
else$ Z: D# I2 ]' }, d2 m1 v' G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: s g5 E# h5 g: o to_str("in docking station: \"",?.~.name,"\"")); 5 y7 l& a7 i* J7 {3 ]0 C) V
end;% }8 z- H; `! [$ g0 g7 T
else
0 V( R" m/ o( M! I# n1 ` @.Destination := assignLObj[1,row];
5 v/ W/ U8 r6 }8 I end;
/ _) ?! \* p9 I8 F, S newDirection(@);
9 `" ]$ {7 T, y9 ^3 P+ [ @.HasOrder := true;2 ^1 F6 O! s# P
end;
9 {( A: c3 [+ }* d2 ~5 C+ X end;
% I% v- f2 N& P9 |; q1 Gend; -- of the method
- ?. u: P& @+ } |