/* called by: entrance ctrl of the object 'track'
8 R' @, D, U% a6 Q& ?. Q6 h*/, s7 r- K3 S& T! P/ L) x: W% R6 x
is' A/ `8 y, B |' i! }0 n' ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& \6 j/ @; G3 n9 Wdo( Z6 z4 t N0 E: |% f+ }
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ H5 A3 n4 x. W; J: d* w if current = @.Destination -- else return0 y% o& }0 y8 ^: @/ @4 ^
then
5 i% O' n! K% M0 T1 g$ F6 @; [9 s @.Destination := void;
2 u& h y% a) D' N. w& o1 ? if @.occupied then
2 y/ q. K/ q7 }. z* w: g8 i part := @.cont;
; d4 r/ s* n- k* F7 Q( r @.transpOrder := void;. e$ z1 {- N- u; E! M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' |3 r8 Z0 q8 M5 x2 \ @,root.eventcontroller.simTime);9 W: R: @# K& c. c1 ?+ x
@.HasOrder := false;, A0 W6 H2 b" U9 ?8 q: O
@.DrivingHome := true;3 m X2 E; d! B0 p
rgManager.tryToStartTransOrder;( x# S4 K5 T1 c
if @.Destination = void
9 T4 V/ v# g( Z6 }# T- w then -- no transport order for vehicle @( H4 I3 J; V6 o. v& n
@.Destination :=3 N' r- q2 p% K! Z" g
rgManager.nearestFreeStation(@,track.~);( u+ C8 o+ h$ | S: n
newDirection(@); . G" o9 i2 r2 G' C2 }" [
if @.Destination /= void then) u; e( K; B% j& q- Q
@.Destination.NumReservation :=
! A+ |2 P6 g) W o+ x' d4 ^/ I @.Destination.NumReservation + 1;
& \+ U6 ~* e; {9 ^3 @ end;
0 b0 K Q0 ~: X* u/ y: v @.CurrIcon := "drivingHome";
5 l% B5 w& D/ ~ @.DrivingHome := true;; D1 h1 u n2 K% `( z
end;5 c' n1 b$ s2 H5 _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station h( k7 H0 N+ R1 A+ p
part := @.transpOrder;2 i1 v& V/ b6 k9 z5 @
part.move(@);-- load part" e8 o$ m' v; _1 Z* {3 {% |
@.CurrIcon := "load";. P" Z) v% F0 G
GlobalDistObj := part.globDestination;
" d2 `8 P) S( X/ U assignLObj := rgmanager.rgAssignL;
3 ~* R! `; R" |, O. R P- j, { row := assignLObj.getRowNo(GlobalDistObj);
, e' G1 B6 ]$ O* C* i6 a if Row = -1 then -- since 70, [5 M4 X5 X; _' D6 Z5 c' d
if lan=1 then
, s8 E+ J/ A4 E: S& j8 Z# w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 g# K8 n2 r- d* M7 G8 A/ i$ T to_str("in der Andockstation: \"",?.~.name,"\""));- g- t; N5 ]$ l7 O! t; K" v
else
" c O9 B9 f' a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 M R0 D6 }2 i9 X& W
to_str("in docking station: \"",?.~.name,"\""));
0 ~% g% j* S o) A$ x4 j6 A end;
4 c$ o5 {4 ~# |6 j7 i2 M! y else
+ x4 I/ Q$ G: |/ e# F) Q2 r @.Destination := assignLObj[1,row];
& Q F0 d# r0 R8 ` end;
- N$ ~1 j/ r& }, |/ |1 ] newDirection(@);& u* F7 N) S( x, z6 D) l
@.HasOrder := true;6 A. z# A5 ?, y6 H/ M
end;7 _+ {0 J, @5 a: r2 g' O
end;9 t! y0 K/ a$ d2 `! n
end; -- of the method
$ p" h9 I& I# Z! K0 b" l |