/* called by: entrance ctrl of the object 'track'
0 s1 P4 o7 b- i) O: U6 _# G*/
& Y/ {3 f; G9 D7 E, Uis
2 A4 ~' }4 c! S& y+ ^" W# E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 P9 L, p5 d( t% ?7 T0 I/ Jdo
9 N# H4 Z/ \2 K0 B/ {, K Lan := rootfolder.Internal.Tools.AOLlanguage;/ _+ R9 [7 P1 t9 K/ C
if current = @.Destination -- else return( D: o* T6 c' c7 ~: n0 i
then
! w/ W$ Z$ m* m% C. ~: M7 ~& w @.Destination := void;5 H0 {! s& a0 |$ n
if @.occupied then
3 Y% C! R& J* i& ]$ l7 a7 W2 ^ part := @.cont;! R- C4 |7 y! M) W t3 n+ F3 x
@.transpOrder := void;
2 M0 \- W# k. ~, Z- | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: P" Z: g& m" S( T; w
@,root.eventcontroller.simTime);
4 k0 p A7 N `! q4 r @.HasOrder := false;
' H+ H- D5 `- |" C% \- v @.DrivingHome := true;
" M j/ l+ t/ n4 ?" ] rgManager.tryToStartTransOrder;9 X, s1 p' y6 o( v/ @( Y
if @.Destination = void
: t8 b! B( C ], q0 l then -- no transport order for vehicle @
7 |) C7 h) s* g5 X$ a* @5 f# R/ j @.Destination :=
$ k5 U5 Z* W# c2 x rgManager.nearestFreeStation(@,track.~);6 d5 `1 y+ f/ y- E; q
newDirection(@); 1 ^$ k5 u# ]' ^; `9 o
if @.Destination /= void then- r& H9 [3 N+ e1 K+ p. Q
@.Destination.NumReservation :=; `2 O9 _ |$ c) P& w% X
@.Destination.NumReservation + 1;
9 k% R, |0 W4 d& n/ c% T# x' N4 H end;( v2 r5 ^4 O2 [; V/ K; {
@.CurrIcon := "drivingHome";
+ P4 O6 L' Y* G* A, C8 c6 C @.DrivingHome := true;' H6 [+ r p n( {2 p8 `+ d
end;! j# y# N* M, ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. u$ V. D- h+ D+ K; D- V4 k7 n9 q part := @.transpOrder;: d7 ^. t" S% T; E, `8 D: C( }
part.move(@);-- load part) O1 u: }( {" M& M3 D/ r9 s* {
@.CurrIcon := "load";+ S& B: b/ l! {0 {& ?' D0 M% D9 i4 O
GlobalDistObj := part.globDestination;
4 g2 _5 |( s* @! s8 E assignLObj := rgmanager.rgAssignL;
- ?- c8 H1 J0 P* |2 {! P5 i row := assignLObj.getRowNo(GlobalDistObj);
1 H% d# a- C, m; d4 N if Row = -1 then -- since 70
4 [1 s3 h# O( E) j( a if lan=1 then
# w% z' _' T7 @# ?( S" n4 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( ^$ s4 k# u4 [" O
to_str("in der Andockstation: \"",?.~.name,"\""));
) \ B9 S# I' v+ x1 j6 J, @ else
$ W/ Q5 N0 S* H6 e, f' u, i( B( l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) q+ Z K4 q6 @" S to_str("in docking station: \"",?.~.name,"\"")); . A+ D! I' ^+ e5 @
end;" F* X8 ]/ \: ]$ {1 O9 `
else
& a1 T& o% d& R* W @.Destination := assignLObj[1,row];
6 y# ~6 J" j% r8 A* X# c1 @4 h" ?; s end;
1 O% p! l& `" f Y0 P) m" H newDirection(@);
2 D; A5 s( K9 J" C, p @.HasOrder := true;
3 M5 r. S) `( a% {: Q( q* C end;
7 P# [' @7 \! X# W. N9 `0 C end;
* C3 W: L4 d6 C3 B' l) qend; -- of the method
; f; g2 ?. ^! d/ r, F7 ~: Q |