/* called by: entrance ctrl of the object 'track'+ |7 X" e+ s! ^8 i: c' l$ g" v
*/
+ h$ |6 ^2 k& w7 vis
; A0 s5 v( u q0 z4 R5 j9 G* _6 I0 W part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" J1 G: X) ]" v8 B* h) odo { d5 L# c( Z5 r9 K& D
Lan := rootfolder.Internal.Tools.AOLlanguage;: F6 u3 S6 q% u+ z1 ?% g0 b6 l
if current = @.Destination -- else return
2 l n3 j' o( [" P4 _$ ] then
9 ~. e: C& c; `, _: \/ y& K @.Destination := void;
' ^0 A. m" k3 @5 Y7 V if @.occupied then
4 y! {% r$ q6 P. } part := @.cont;& i4 H0 C4 L: o2 @/ x+ C
@.transpOrder := void;/ q F0 _0 z- L4 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 a8 ~' Z* c; {2 L! o @,root.eventcontroller.simTime);5 O5 ~: m% X4 S* |
@.HasOrder := false;- b7 S% r# L' m% }
@.DrivingHome := true;
5 c0 ~8 A4 r& }8 Y3 Q* `( R rgManager.tryToStartTransOrder;
4 ?2 E7 ^) i) B& k! E if @.Destination = void; k$ z$ o" _0 x z- C8 N
then -- no transport order for vehicle @- a: K. t: s: r% R* o) Y
@.Destination :=. \1 e2 p+ x3 L. c4 V# v) i' a) M! D
rgManager.nearestFreeStation(@,track.~);, j+ [, M) R) Q8 G9 a7 L
newDirection(@);
0 `( d& S3 ]8 r$ U if @.Destination /= void then/ h0 R1 Q, v' Y* V3 o4 f
@.Destination.NumReservation :=$ u' T& G( P; {& X1 L
@.Destination.NumReservation + 1;
4 L& P& i9 T1 U0 i end;, x% J' ?( m. [# D! h8 E$ u
@.CurrIcon := "drivingHome";
7 D% e" U' D+ I8 p: M# r. R @.DrivingHome := true;; i3 L& S5 f6 ?7 n
end;
v& u4 C8 {9 H1 F s else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 l+ @% |+ W/ x1 S) ^ part := @.transpOrder;6 }: T! V# }; S) Q
part.move(@);-- load part& ~) x, J4 J& R( b
@.CurrIcon := "load";
' a; y; [1 @. t$ v6 M GlobalDistObj := part.globDestination; R2 ~* r' w2 f5 y
assignLObj := rgmanager.rgAssignL;4 y) Z/ ~) z9 H. w% X; u
row := assignLObj.getRowNo(GlobalDistObj);
0 d! D: m; v: @9 V. a. v+ f6 C if Row = -1 then -- since 700 R. z! O. |, _$ F/ r! ~ s+ N
if lan=1 then# d) B6 Y" R( g# @+ ?+ ?) J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% j) G0 D( _; }# @! z G to_str("in der Andockstation: \"",?.~.name,"\""));
% _& V4 n F% s$ ~8 G else7 ?- s5 l6 ~ i8 c7 w; s% V* ~: f# _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) U3 _( |* G: B! N4 `
to_str("in docking station: \"",?.~.name,"\"")); " L& }" ^" r, b; E
end;9 Z; a0 _/ V: [3 R" C' T, t# v1 }
else! m5 H! Z+ G" `4 o. e
@.Destination := assignLObj[1,row];
" B2 g- f: g% a; |! A0 B, Q end; d3 S5 n" f" a$ j5 g
newDirection(@);
& G& ^! E: Q M+ P% p @.HasOrder := true;5 Y \4 ^+ x4 i, I, n
end;
, {& O! D1 w8 ^* e) M; c0 R+ g end;
: o$ Y7 k: N/ |+ | hend; -- of the method
; N4 x9 s9 Y7 D# s0 ?4 q3 } |