/* called by: entrance ctrl of the object 'track'- x7 K5 J/ v% I4 }1 ?6 K; w
*/
* U$ h5 w* P) x) H+ Xis
3 q4 p) E# o% `' D( v4 B part, GlobalDistObj, assignLObj:object;row,Lan:integer;) P) U6 A' F$ x0 y
do
; K( A7 y3 Y# K6 e Lan := rootfolder.Internal.Tools.AOLlanguage;6 N9 R: v, a8 c
if current = @.Destination -- else return: l4 L1 v+ q6 g2 Y$ j% j9 F- o
then
" o9 j- F% ~3 Q4 g: p' |- e/ x @.Destination := void;/ `; i/ p* n! r2 Y0 O
if @.occupied then$ g6 R1 a' V' |0 U8 @( |
part := @.cont;
1 l; _' o. F3 `& U0 y5 O% A/ C3 W8 g# o/ S @.transpOrder := void;
% H" H0 }3 g9 w0 Y: C part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* a+ S2 {! g5 R& A
@,root.eventcontroller.simTime);
5 Q0 t1 z% S0 h, }& ?$ R @.HasOrder := false;
; H# \: J/ P+ j% I3 A @.DrivingHome := true;& z3 P2 N3 }1 q( |# \1 u$ }8 ]
rgManager.tryToStartTransOrder;
7 j3 m# L" h& }# P8 N, h2 { if @.Destination = void7 v9 M& |& b6 ?/ A- e
then -- no transport order for vehicle @
* N% Q$ ^, ?+ o0 A: A( u @.Destination :=+ } ]3 K5 V* ]0 | _! T$ {
rgManager.nearestFreeStation(@,track.~);9 z$ E9 j+ N5 ?/ y2 R; J. a
newDirection(@);
) @9 O$ V% j* B6 m |+ l. g1 R if @.Destination /= void then
: P7 j; h. A7 |" [2 j( M @.Destination.NumReservation :=
$ B! \$ H/ T, I: c @.Destination.NumReservation + 1;
& i) U) }; }* w end;- x$ f1 p6 _7 ?9 p& p
@.CurrIcon := "drivingHome";) p' i5 g; u- Q, I$ _
@.DrivingHome := true;) m1 O# {: ^/ P9 ~ z/ @$ U& s
end;
% ~$ z/ z- A7 X- c, k else -- the vehicle @ is empty, both vehicle and part are in the same dock station' g! R( t0 d5 }# l
part := @.transpOrder;
% \8 E1 U _/ s- ?# d) t part.move(@);-- load part6 x2 a" _2 `5 k) k* R
@.CurrIcon := "load";3 }) n# ~3 {0 Z: T6 ~( M/ ^
GlobalDistObj := part.globDestination;
5 i! Z- z, g' ~, G assignLObj := rgmanager.rgAssignL;( O) D0 e. \; d& I
row := assignLObj.getRowNo(GlobalDistObj);% n, |+ x! [4 M8 N
if Row = -1 then -- since 70
4 H* I* j; T3 a6 j6 f: g if lan=1 then
4 F! f) `) t; R: y5 d4 q3 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. z1 `# N- H1 J7 s0 l
to_str("in der Andockstation: \"",?.~.name,"\""));
& E6 \8 H; i0 M- a" [* D else F G# o% u3 v+ p: D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. e/ `' D: Z, h% f( I! t to_str("in docking station: \"",?.~.name,"\""));
Y1 R# o: U j4 a$ D9 X0 D end;
a! ~1 l8 `' B0 h3 e5 C else! G, I6 T6 |) ~" ~2 s. n/ N7 o$ Y
@.Destination := assignLObj[1,row]; A; Z2 `4 w' `$ @5 _! K
end; - B/ _9 j$ o: x( _8 _8 B/ u
newDirection(@);
1 H0 ~6 e) \- I9 R @.HasOrder := true;* I, x' p( K; ~2 Y- N6 ]9 X- Y8 b
end;! H1 C! ~7 p; R
end;
* }0 Z6 Q& d4 r e4 d3 cend; -- of the method$ B& m! _3 o$ [/ y# J( ^3 g
|