/* called by: entrance ctrl of the object 'track'
4 A; |8 W0 Q/ n# O*/! Q# n7 {7 q- Y( S6 t$ S
is8 s/ S( U; X* M0 r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) {8 i0 \- H9 u, @, T3 P5 @do2 A2 ]) N7 i% Y4 r) B5 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;
- Z3 f" }+ \% Y) H if current = @.Destination -- else return
* L( k; n6 b; P then
2 E$ j, ?8 P% }# e @.Destination := void;
: t3 Z4 q& h2 n* I if @.occupied then) m0 t+ _0 q4 T; Z; b* U0 \
part := @.cont;- Y4 U9 f2 C9 k. J
@.transpOrder := void;% N; I/ B! f# ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 o4 u* D2 W- w! t @,root.eventcontroller.simTime);
8 w/ r* m% z: e9 K1 C5 ]% e; u @.HasOrder := false;
7 K0 j Z. N6 l/ _ @.DrivingHome := true;% ]' S, \: ^6 ?# w
rgManager.tryToStartTransOrder;" h ]( s m w" V) c( e
if @.Destination = void+ h8 G" W) Y, a/ j3 u8 n8 P
then -- no transport order for vehicle @0 w. c4 T f" n+ W' M
@.Destination :=& \+ A/ j& A& x/ k! L
rgManager.nearestFreeStation(@,track.~);, U) [0 {4 b2 A# B. ?2 l7 n
newDirection(@);
9 A# p' h7 t2 ?& Y if @.Destination /= void then' q, f7 l3 b6 V# U8 a; s7 K
@.Destination.NumReservation :=
, }: S/ q4 H0 `7 p9 ?1 ~ @.Destination.NumReservation + 1;
7 I% h, {$ i1 G( k0 m8 n end;: T! V! t) u( w4 W7 o
@.CurrIcon := "drivingHome";# d# p" Q3 N1 O! G/ T
@.DrivingHome := true;5 u, d# b% E; z Q% Q
end;9 D0 m3 \$ z, N* ^, L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ A" E* J( A$ E) H part := @.transpOrder;
. u4 O7 g0 y/ T part.move(@);-- load part
L4 R0 d+ z3 ?' I/ I7 y9 p @.CurrIcon := "load";
! Y) F8 n0 M3 ~9 J2 E& E6 ?( Y0 t GlobalDistObj := part.globDestination;: M8 Z9 p% T N8 C- |9 w4 ?, C
assignLObj := rgmanager.rgAssignL;
. R: Q) U" \4 A2 ^$ h- H$ f row := assignLObj.getRowNo(GlobalDistObj);
( v2 T# e+ _8 V" ]8 `3 J if Row = -1 then -- since 70
8 ^' m6 [2 P3 C: l! Q2 V- R4 v& ^: _ if lan=1 then9 u7 I q" l& C; y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& I9 M" @) y$ Z- c! k/ H to_str("in der Andockstation: \"",?.~.name,"\""));
9 w9 @, D6 _& k, w& W else
9 B6 Q( q B4 V; Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 L6 F) g9 n" D2 e3 {' L9 T
to_str("in docking station: \"",?.~.name,"\"")); 2 X. o3 j7 B1 D% H; N& t
end;
) d0 k/ A: Z2 p. M& w else/ S6 V8 b& V- V8 ?* c
@.Destination := assignLObj[1,row];
k# p# y2 c' @# I3 @1 _ end; 6 \5 q' e+ S; v" B" _. _
newDirection(@);+ k7 k) {& w1 g: p# g
@.HasOrder := true;2 j; B: d: u% v
end;
9 l8 G0 }! D; e6 P end;
4 N; ~ |1 `$ D! jend; -- of the method1 s1 R P& C I% w! J
|