/* called by: entrance ctrl of the object 'track'
, y+ k2 v9 v J" A*/0 m6 f* m' P1 D- t; m
is/ l1 o6 U* a4 R b# M
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. F; q, l7 e5 q. ]0 [do
+ U$ j4 G( W8 d4 e Lan := rootfolder.Internal.Tools.AOLlanguage;7 z% k( F5 _& j* d7 l
if current = @.Destination -- else return
; v' Q8 [8 c) a1 q* {& L then' s; ^& A0 ?/ }( h3 `9 |8 i1 D
@.Destination := void;
, E9 j2 ]# c; A3 j if @.occupied then
2 Q- e2 z# c3 h! _* K5 r part := @.cont;
3 I; d/ c( r0 r: [" E0 }& W @.transpOrder := void;: q( X* p# n, [* D7 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* k6 }0 K3 M( d/ L1 Q( l" } @,root.eventcontroller.simTime);
1 o9 }% F5 e+ S0 u3 K8 n! U4 O1 k @.HasOrder := false;) _" X% i0 y% \) A
@.DrivingHome := true;. @% g8 N( _' N
rgManager.tryToStartTransOrder;
, i; ]; i* z3 T; Q if @.Destination = void! z$ N8 r0 j* ]' }, P4 F- P
then -- no transport order for vehicle @ V, D7 D$ J Z0 c
@.Destination :=
. I |) n/ U7 m* A, p$ s rgManager.nearestFreeStation(@,track.~);% B/ N% a( h' Z+ v( T
newDirection(@);
9 m5 w6 b% f. F. s! f {) x' Q if @.Destination /= void then/ N% k4 P6 d- @6 s- G# h
@.Destination.NumReservation :=
/ k9 d; [' K" T( a! | @.Destination.NumReservation + 1;
. I3 i3 t) r6 [0 R end;
$ r7 y4 I: }- p @.CurrIcon := "drivingHome";
) }& ^) m- j- h7 W @.DrivingHome := true;5 u3 n) K8 `# a3 u+ y3 n% y N; {) K
end;
: J) J' f3 P7 w* S7 E else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 L0 x. q# x" \ part := @.transpOrder;/ E6 C* ~/ j3 j# c! Y
part.move(@);-- load part
/ |0 w( [ a, B! l @.CurrIcon := "load";
. y/ h7 C2 k7 J7 `& U8 v GlobalDistObj := part.globDestination;7 ^. o3 R; n- M6 s5 ^
assignLObj := rgmanager.rgAssignL;
) y/ z0 n4 l- i& F row := assignLObj.getRowNo(GlobalDistObj);/ e: v$ W& z. a7 c* ?
if Row = -1 then -- since 70
3 |& p% h- @, P# |' M if lan=1 then5 o" Y/ ~" Z8 [* z. H1 E5 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) F6 z! h; n4 L5 h% ` to_str("in der Andockstation: \"",?.~.name,"\""));
+ g- {% M8 Y4 t else
4 p, I' w( k) N3 G6 J7 B% B+ o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. W. K$ N# J; Q
to_str("in docking station: \"",?.~.name,"\"")); $ L0 D" x9 g) F* g
end;! B/ X4 B/ h( \: X# W
else
, ^- j9 `3 G: N# `8 N9 c @.Destination := assignLObj[1,row];
4 u0 B7 K# x$ @/ ^- G1 q6 ~ end;
: m6 B0 ^ G. n" W newDirection(@);6 H2 ?, T1 S7 H7 b$ @ D4 ^1 `; M2 J
@.HasOrder := true;! k% F3 u, C! t9 ?/ u
end;; L# e4 B. N# p6 e5 O7 |
end;2 Y$ p, @. c) }1 d
end; -- of the method
% J$ P( l% ?0 n L' V |