/* called by: entrance ctrl of the object 'track'
, l; J- T" G( ]$ t, U*/
2 g9 T2 J% g+ [( _. |5 Mis; y0 x$ l( Z. \! [1 F9 G0 w7 @: M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 I1 R- K7 @0 Z( _: _5 r. i8 gdo
' u' f0 b# b$ i2 i) I Lan := rootfolder.Internal.Tools.AOLlanguage;. R! D, Q0 l5 y: t C2 C! X" E
if current = @.Destination -- else return
% l' {$ P& k/ l e then, ~9 _. Q0 u% s7 ~5 `& Y |. Z; _
@.Destination := void;1 t& b9 J5 m( |# `0 g
if @.occupied then
' x/ Z f' H+ n, _ part := @.cont;
3 K+ U1 b; r$ O9 l+ I @.transpOrder := void;
. S4 D( e* M$ ~- a, H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( ?5 a! Y/ [, h7 K+ j- |4 R
@,root.eventcontroller.simTime);
9 N7 C. U" `5 W+ P) o @.HasOrder := false;. _6 Y+ } l( R+ [' K* u0 O6 l8 o7 t4 |
@.DrivingHome := true;: x3 `2 b1 x8 w( P9 c3 ]( e# [3 c
rgManager.tryToStartTransOrder;4 E! |) ^1 L7 v. [& s9 w; d0 u
if @.Destination = void+ q, C1 j/ {# M' Y6 ^4 Y2 h
then -- no transport order for vehicle @
+ P f8 \! T; Z @.Destination :=
! f1 `; n( m1 z0 d/ D rgManager.nearestFreeStation(@,track.~);
- Z' ~6 z4 V' X2 H: y, U newDirection(@);
4 j% X) c1 o; r r if @.Destination /= void then
2 }9 ~4 M6 P+ S2 e" A @.Destination.NumReservation :=
6 b1 r( |. u' i/ b9 | @.Destination.NumReservation + 1;; Q# e" q* o* t, ]8 ~$ n4 ?8 j
end;
5 O/ T, P+ Z, E+ X1 q @.CurrIcon := "drivingHome";
4 d7 s+ h$ V# d$ C O0 b @.DrivingHome := true;: j% i9 T( U2 ~7 L3 f
end;# P8 y. Q0 U. W- b9 U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 c7 a9 N. R2 R7 T3 H9 N- O: M5 |
part := @.transpOrder;3 j( r' B" R' d" [8 n6 m
part.move(@);-- load part1 `" K- b# C+ n$ T: ^! u& C* a
@.CurrIcon := "load";! J; E. w: U4 D3 X6 M
GlobalDistObj := part.globDestination;8 B4 }+ l1 {8 P
assignLObj := rgmanager.rgAssignL;* d6 v! K& o; p# M7 C
row := assignLObj.getRowNo(GlobalDistObj);& Q& m! J4 g8 L9 }! Q* R. p4 ~3 r
if Row = -1 then -- since 70! f) J! s4 z5 N6 C. T& ^
if lan=1 then
8 l$ Q& I1 t3 m4 [. x, r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ ?2 B. D. F* q3 F
to_str("in der Andockstation: \"",?.~.name,"\""));0 }/ n& T3 a1 Q$ C5 X
else
6 D. X4 b4 P+ { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 v% f* e, x. [( J8 s9 T# r
to_str("in docking station: \"",?.~.name,"\""));
2 S3 D1 s! p g7 Y end;
6 }2 [* Y# \) n0 U0 { b% j T else
# g. ]% g" W, V- d @.Destination := assignLObj[1,row];' h5 r& t; f1 J# D
end;
{) P$ k* ]4 T9 a/ a- f newDirection(@);
' ?$ M6 N3 U2 ? @.HasOrder := true;: V" u9 M O& W! t/ P' h
end;
+ N/ N7 V* u6 T G+ y end;) V$ j8 y" I. z9 e& ~$ B: Y! ^
end; -- of the method
* V" g- u2 G, @ |