/* called by: entrance ctrl of the object 'track'8 b; V/ `0 N% S9 D# m& Z8 S# ^
*/
8 H3 D2 `1 z2 Q5 C3 S9 ]3 {" ?1 T4 tis
# N( S) ?3 U1 T% d0 r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 F, K/ Z! s% Mdo% W/ ~. Y8 \6 H9 H! D+ _) C5 s( C
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 N, K& k% A2 x if current = @.Destination -- else return+ d+ Z9 @1 A2 V
then9 T- V1 y9 a% T1 l6 c
@.Destination := void;; M$ i2 a% i7 P
if @.occupied then
6 s6 j$ c' w) j4 b$ ]3 E. u9 v0 w) e part := @.cont;
K& [* F! x; ~# [7 j @.transpOrder := void;
6 C+ A- a% `& T part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 t" c% V: a2 b: r# @5 O @,root.eventcontroller.simTime);
8 q9 U! m( D. A& Q3 { @.HasOrder := false;
& ?' b6 b+ o' a2 L @.DrivingHome := true;6 d6 [$ k; D9 P9 g6 o, c
rgManager.tryToStartTransOrder;7 f3 W$ d) B4 @2 M0 m0 K% L
if @.Destination = void+ p/ L7 I# w# c/ [5 J, i6 F
then -- no transport order for vehicle @
1 D: z5 |5 t) V7 `7 m p. J# } @.Destination :=) K1 z, o5 e; S9 f/ b: {$ v6 S$ b
rgManager.nearestFreeStation(@,track.~);4 o+ f8 |. m) `: A2 w# g& h) b
newDirection(@);
% i3 o9 e# r" W: X( G9 M: A if @.Destination /= void then
8 V1 X6 |. R1 s: v- K% x% R @.Destination.NumReservation :=
9 @+ C5 t8 d( A# r @.Destination.NumReservation + 1;
7 E, L: a& g+ r1 s end;
6 a+ g6 l$ q5 A @.CurrIcon := "drivingHome";
( S/ n1 G6 r3 I9 }! J" K1 G @.DrivingHome := true;" _8 y- N* ?2 w) o1 n' s9 G% t6 B
end;
- G0 Y" @3 d' O+ u Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ `" P0 B. r! X' Y2 }0 d part := @.transpOrder;
5 s- ^2 I& H4 l6 f part.move(@);-- load part
. M" M9 ~( n9 n$ S7 B2 v# X9 s7 w @.CurrIcon := "load";
. q+ Z2 X; G% O9 G6 z* `( F GlobalDistObj := part.globDestination;
( v+ n3 Z2 K9 M3 F8 X assignLObj := rgmanager.rgAssignL;
3 V# m- w0 ?, x2 X0 r2 b row := assignLObj.getRowNo(GlobalDistObj);
! t0 g3 p3 U, O3 v, `, O if Row = -1 then -- since 70
' z# M8 ], Q2 Q! u if lan=1 then
. k! g& j0 M; m9 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 u9 m1 i6 \. V3 z7 G E# A
to_str("in der Andockstation: \"",?.~.name,"\""));
' W! L% B2 F2 t5 n- D else
$ q, u$ y# R3 z0 U! O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) g! ?6 ?5 {" y9 [6 I6 X to_str("in docking station: \"",?.~.name,"\"")); 7 Y8 u- ~* Q, h! H* _" O E
end;: F( S9 v+ }8 M# q
else, B& q+ z- i* g: T5 J+ ?/ ^$ J
@.Destination := assignLObj[1,row];6 d3 j% Y' Y- _, F( e4 g
end;
+ O$ p$ Y( P; a- f3 `' I newDirection(@);
3 I7 s5 n. P8 ]; @% X( u# k' O @.HasOrder := true;
: k1 W Q6 }( e* l8 `. N$ N end;
: {, j- ~& j! v/ I& o# R* p. |' p end;
6 b& a! z, z$ `3 |: ~0 c: g; dend; -- of the method
. H" m4 R, s; o, {. w" [ y |