/* called by: entrance ctrl of the object 'track', Z( \: S6 l9 R- R5 d
*/, s& I8 {8 o5 _6 ~0 D4 O
is+ ^8 F+ X! R) B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- |7 Y U7 T$ _" Fdo- K0 N/ ~8 F- u
Lan := rootfolder.Internal.Tools.AOLlanguage;* u$ G! k, ^, u7 e
if current = @.Destination -- else return$ ^) O- i) E% f
then- F; V/ Y% K; Z" }! D& y& @* a; @2 v
@.Destination := void;) X6 _+ }( y$ C, b+ Y0 ^! u' d/ E1 u
if @.occupied then$ H+ L( L# i, `0 s
part := @.cont;
9 D) M/ o! D6 |+ ?* X @.transpOrder := void;( R' T* {* \; |4 R0 M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ b) }& c0 M, m5 P7 S+ c0 p
@,root.eventcontroller.simTime);: J3 T" J5 h n0 ~$ B% i
@.HasOrder := false;
( n1 t l! r z' ]' E9 M# o @.DrivingHome := true;
9 S% H) N7 p1 }7 q; a rgManager.tryToStartTransOrder;
0 N; I8 K* C9 ` if @.Destination = void
7 |2 e) }& \9 f% W- P B then -- no transport order for vehicle @( ]5 Y* j$ V. r/ C4 ` g( O* G6 k
@.Destination :=) a* @& t1 M0 y' [+ l* A, P
rgManager.nearestFreeStation(@,track.~);& n* G, @2 B/ \1 ^$ r' |9 t
newDirection(@); & U( u$ `7 ~' t- p; g. I
if @.Destination /= void then
- ?3 a( I* Q2 w A- V" ] @.Destination.NumReservation :=
2 d' ^8 s$ z4 E8 B' W @.Destination.NumReservation + 1;( W. {- t; k3 O, ~: Z) n- a
end;+ ~) h% K* y1 ~ a# E' p+ h
@.CurrIcon := "drivingHome";
$ ^! T; Z; j. R @.DrivingHome := true;
5 l. X+ f7 B: q$ s- i y end;7 T9 L) K+ { O) ?! q2 ~
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: t8 C: U1 ?% s- M) x4 v part := @.transpOrder;
+ p/ U$ U' ~# W6 _) M+ v part.move(@);-- load part; v/ t+ V5 b+ ?
@.CurrIcon := "load";
% M. w4 y* u+ O1 {! a5 y" f7 H GlobalDistObj := part.globDestination;
8 H0 F+ r2 c1 [: x assignLObj := rgmanager.rgAssignL;
0 X+ G/ y# o) M# Y row := assignLObj.getRowNo(GlobalDistObj);
4 Y5 |# j$ W- n8 a0 U if Row = -1 then -- since 70
4 w( N* h/ C+ Q+ X& Z if lan=1 then
( w0 Y( b! X: J: W: j# i' Q, B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 V1 `8 T" e6 f" ^! E( B to_str("in der Andockstation: \"",?.~.name,"\""));
+ q* I u1 t) g( N4 l else ~1 J* G) }( A$ P9 k) ~. `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 o0 ~8 B9 S+ q8 ^8 P2 s
to_str("in docking station: \"",?.~.name,"\"")); 3 r* y) v! N# Q* ^4 ]0 o4 W s$ E
end;
3 W9 M- f: o/ e7 L9 ~% u else, Y: |3 }% a! h
@.Destination := assignLObj[1,row];
7 i0 n0 T, E% W4 }. Q" d end;
. d2 w, C( V: ]# W) y" b- e newDirection(@);
& g) N- H$ h" F) w8 y1 c( O @.HasOrder := true;9 e* c2 i% t1 ~# e/ }
end;3 T! I n: w( _
end;9 F) e% n1 h1 M! {' @' ? }* R
end; -- of the method3 r' [4 ?9 T4 s) G
|