/* called by: entrance ctrl of the object 'track'
" ]( M: w' p/ h5 r0 h*/
: {, D4 }( [2 |is
1 c2 Z- E' R( D5 l% J$ t# {! m part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 N& t: b, ]+ [* K% _
do
; _- E/ J; ]0 x8 a9 K Lan := rootfolder.Internal.Tools.AOLlanguage;& P) k$ t! q9 D, P- t7 M& W1 o
if current = @.Destination -- else return- h0 y, m0 W0 O, f0 F
then
9 [* j- d7 \4 s7 f- B ]. y" ?6 S @.Destination := void;
5 z. B% @* v8 A! a: x if @.occupied then5 y, ~6 h* _$ [* M. _
part := @.cont;
% J; q \: p) _% Y% t @.transpOrder := void;$ W' N0 b( ^- L. t# I7 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
U" R/ h% z. @3 e0 r; _ @,root.eventcontroller.simTime);
0 {' \/ {! u: g! ^6 B# g$ }9 k) u. G: g @.HasOrder := false;
0 V+ U2 W: {, h' D9 J! f @.DrivingHome := true; o/ W/ |9 u; l
rgManager.tryToStartTransOrder;
2 b- v# K! B/ _# x if @.Destination = void4 {0 d z7 e2 p @
then -- no transport order for vehicle @! `0 e* J9 c" V2 G
@.Destination :=( o# Q6 Y+ L, z+ R
rgManager.nearestFreeStation(@,track.~);
) R5 A- A0 g7 f( G; g0 j newDirection(@); - h) c: h" _! _' e( g) b9 u* v
if @.Destination /= void then, G$ E9 B+ f8 P' L9 y0 k+ A, `
@.Destination.NumReservation := X- w8 l. j; ^- H, b
@.Destination.NumReservation + 1;
0 g; f! e- ?7 _& q end;, j7 G# H2 T6 D- A0 ~' m* F
@.CurrIcon := "drivingHome";
7 v7 ?' k8 p& ^3 M @.DrivingHome := true;
6 P7 G3 t- Q* i5 ]' u8 [9 \$ i end;
7 y- w2 l% U. P else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 g4 q" G+ b0 J3 s* p0 E, l: m
part := @.transpOrder;
/ e; K$ t, r% ]$ ^6 p part.move(@);-- load part
! J' P( x2 ?5 H' f: K6 ^) M @.CurrIcon := "load";" a3 Z9 b0 d2 t) G3 a& t
GlobalDistObj := part.globDestination;
: t1 ]! b/ l3 }9 a, X1 T assignLObj := rgmanager.rgAssignL;
8 S6 Q2 l4 u/ U: C6 ]4 l { row := assignLObj.getRowNo(GlobalDistObj);
" g" T' P5 W( P, P if Row = -1 then -- since 70+ R4 P4 F$ k, F" U9 j9 Q
if lan=1 then
/ F6 ^7 l7 _ _+ d2 L4 t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 }5 v/ f& N" d to_str("in der Andockstation: \"",?.~.name,"\""));! {$ u# l9 @0 I- l! P; z! j( f
else
4 u4 c! n4 v% Z! l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) ?& i( U- V5 s to_str("in docking station: \"",?.~.name,"\"")); 5 X& D! z+ V U- k$ O
end;* |0 i+ R( X& S: A+ q. F B7 Q
else
/ U7 D1 W* ^9 }; u! m6 S. U @.Destination := assignLObj[1,row];( k8 W6 r. F% Q v& o
end;
8 o' c8 F6 T B" ~# V5 m, D* u newDirection(@);
5 N Z( f8 y3 M( ~ @.HasOrder := true;2 l' u8 o0 e# V& r9 M, b4 X0 H
end;
5 j. ?. ~8 D3 U: ^ end;( F) F7 R1 S1 ]5 Q t9 |" ~* N+ b
end; -- of the method/ o$ R6 z8 s4 m/ }# ~# {9 W
|