/* called by: entrance ctrl of the object 'track'
, O: o- u: E) f) y7 L6 D, R% B% u*/
; D3 c9 ^+ y/ l, Vis
9 i: F$ i7 L: @2 I3 {- y6 h2 o part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ z* b. ?; T( i' K$ ^
do
$ {6 I* D( d9 j% o9 v+ T4 m Lan := rootfolder.Internal.Tools.AOLlanguage;
! ?4 T7 L9 C0 Y+ c x if current = @.Destination -- else return0 \. z$ |2 K6 |, D7 g* N
then' h" f% ]$ C* {% y* P! e
@.Destination := void;" w- K. I' g: W& B; }
if @.occupied then7 S- b/ X' C# X: s" z
part := @.cont;2 {8 z! J& p. @8 U
@.transpOrder := void;
2 L3 Z U) `$ Q7 s+ Z+ T/ \. C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ U4 D" } @; B: g
@,root.eventcontroller.simTime);
( m. Y/ C ~7 J# i4 b @.HasOrder := false;0 ?; i, b/ |: n e( q" \% x; ~
@.DrivingHome := true;0 X; c1 M( q% L+ Y4 H
rgManager.tryToStartTransOrder;
1 v! Y- p4 [ \/ U4 r4 L: { if @.Destination = void
5 k2 ^4 A: x! d, X; @4 f then -- no transport order for vehicle @
6 N6 v3 Y, w0 K; y2 n/ [ @.Destination :=, [% c; l/ \" d% j3 O* Z
rgManager.nearestFreeStation(@,track.~);
& Q; n( ~' A) q- J: p newDirection(@);
. Y6 r) X& T3 R& M6 W& Z3 ^ if @.Destination /= void then$ M8 {" E* T% I4 o1 y; h# I
@.Destination.NumReservation :=
$ D# U4 X5 a0 Q0 l B3 k- m @.Destination.NumReservation + 1;
1 L( ^9 _2 `" X' l" r end;
# N8 Z$ c! e: Z1 O# p @.CurrIcon := "drivingHome";' m' h' ?7 w/ C% h( b
@.DrivingHome := true;
' c9 O: W- [9 v1 O( { end;6 @" N1 d1 @# q5 c$ G' E+ T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 v9 ?8 Q% B8 M% _# \ part := @.transpOrder;! k6 j8 c3 U. s2 I. t! p
part.move(@);-- load part A7 h6 E; f3 c; o C" B
@.CurrIcon := "load";9 p6 ~! }7 V/ j- g$ S8 M5 U; Q9 I
GlobalDistObj := part.globDestination;
% v8 L* a1 h9 E# o! N0 B5 s2 ]2 I assignLObj := rgmanager.rgAssignL;
) r( z' g- o5 }; \( h0 \6 t row := assignLObj.getRowNo(GlobalDistObj);+ J$ }: E1 I; {' m x1 F7 w8 k
if Row = -1 then -- since 708 G6 P, g; \2 i! R: x) j
if lan=1 then; g5 H% J8 T+ e8 F$ U: e8 Q; s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( L, `4 y; n. E# D to_str("in der Andockstation: \"",?.~.name,"\""));
9 z8 E0 Y a! ^# x5 T1 s8 ?1 k( p else8 l r+ t2 W! ~* h; F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 x" x( Z$ u( Z8 I, s" Q) E" u
to_str("in docking station: \"",?.~.name,"\""));
4 c3 r& q5 f" @- w end;7 B* Q2 F- j7 Q% \4 v. m; g3 @
else
: q& d* A# q0 E8 r) Q; S @.Destination := assignLObj[1,row];
e5 Y" |! B* k+ c end;
0 e" @) |9 }$ ?$ T newDirection(@);
: y' r% ?$ H# ~ @.HasOrder := true;
/ p. k& x& W, q* S end;: Y2 c f L. t/ z8 ?4 g' m
end;
% e( F* B- S! v1 O" {5 f/ m3 Bend; -- of the method
; [4 s" x4 W0 N+ ^8 | |