/* called by: entrance ctrl of the object 'track'6 ?, ~* T) j4 g* R- N6 `$ i7 P" p
*/
2 }! L5 I. Y/ c/ T( gis
d2 L& P/ `3 t/ y+ t* a# y6 V3 [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; q1 G9 a# v0 Z2 f% p3 Jdo9 ~( X3 I3 E" M& Z( G# c9 S
Lan := rootfolder.Internal.Tools.AOLlanguage;
& N5 j' Y& V9 Q ?7 T& U if current = @.Destination -- else return
! t: A7 _" _& C: P. Q then
2 y# l" z- K9 q @.Destination := void;5 o! h1 ^, P1 k( y4 n( p
if @.occupied then
5 }8 M; e, }- b% D4 U part := @.cont;- z% ~2 I, F' o
@.transpOrder := void;; x) x: o8 P( o1 P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 O$ p0 q0 P4 A2 j' ]. z$ _
@,root.eventcontroller.simTime);
0 _3 j' m1 C* U @.HasOrder := false;
) f {/ T- J; J2 [0 \& D- r7 \ @.DrivingHome := true;2 \4 C8 Z( j! y* C
rgManager.tryToStartTransOrder;
+ j8 ?7 l& y' H' T9 ` if @.Destination = void
( y: l- q5 Q- O, n6 u then -- no transport order for vehicle @
$ x! o; n4 k( Y1 D! Q' ] @.Destination :=
7 W4 H9 t1 t: f1 ? rgManager.nearestFreeStation(@,track.~);
) O4 j' r# w; q1 s/ T newDirection(@); - W$ ^& U2 X3 K
if @.Destination /= void then
1 t6 `" G y7 Q- u: L4 j% o @.Destination.NumReservation :=
" a: p' \2 _/ C2 A3 { @.Destination.NumReservation + 1;. S5 {3 g" C8 \" ~5 b' b9 ~
end;
& ?! }! I; Y/ K: L& A! i" S m @.CurrIcon := "drivingHome"; _! r+ b7 S' P
@.DrivingHome := true;4 B0 J5 r) g4 ?7 S! S
end;
Y5 n4 B5 n1 `6 g- _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 S; @) C L$ n3 c# T" i; |+ @- {
part := @.transpOrder;
7 }5 Q" ^8 \5 e( K. n; I part.move(@);-- load part7 S3 i: O1 n- P' V$ _
@.CurrIcon := "load";
% v- w' r; l2 }" ?" f GlobalDistObj := part.globDestination;2 V, j+ ]8 S0 S; q# i$ G
assignLObj := rgmanager.rgAssignL;
, Y, ~' L8 F9 e4 {7 P1 `4 t row := assignLObj.getRowNo(GlobalDistObj);1 N- U$ q9 V- D ]! M0 v
if Row = -1 then -- since 70
7 x: t/ T+ e2 S- t, v* f3 u if lan=1 then
* u( W6 Z/ @2 K4 P+ K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 m: p1 i: n' a ^3 m' A to_str("in der Andockstation: \"",?.~.name,"\""));
- l/ U# O" q G ], O0 B* y else
8 b9 @* V% K$ \3 O! \" }5 L; f) _1 y( z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. j8 q' W& c K5 r) b
to_str("in docking station: \"",?.~.name,"\"")); + P4 H% U5 k7 c' ]8 H
end;/ Y- A" o/ _ m! N3 c$ |% U
else
5 J3 @& w* T- ?4 g, s$ k; i @.Destination := assignLObj[1,row];
# ]% [. W! M8 x* q$ g end;
/ y3 p/ U$ {& J; p newDirection(@);
' E9 G6 _0 H2 j+ L4 k" x+ W6 f7 X @.HasOrder := true;4 T- s+ ?5 m. K+ J. f2 z
end;
) H( n k5 J0 x* Y1 K end;+ ]# W9 A! P# U& z2 t+ P
end; -- of the method
& [4 h% ?. A4 v |