/* called by: entrance ctrl of the object 'track'
5 X) X9 d+ V% q) k% J*/
6 T9 z- a4 O4 M6 w& A$ \% x1 Qis
* p2 O. j/ q: x# r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 i3 O$ D2 G! c' pdo W; Z2 X7 \8 W7 ]; V9 T7 M
Lan := rootfolder.Internal.Tools.AOLlanguage;% \ ~/ i* D( Q1 c$ P6 p. X
if current = @.Destination -- else return# c+ e& b, J7 E- m
then
- j; A6 X3 ?, C @.Destination := void;
2 I$ O, \1 z$ X+ f( ~6 X4 ^ if @.occupied then
* r( M9 U6 _ S' T6 w part := @.cont;
; V# ~, C S X# L5 U @.transpOrder := void;
% j1 K; ^6 _5 k9 \) b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* q# ]) P; {0 V1 B- s+ w% Y1 E5 U. m- q @,root.eventcontroller.simTime);
9 [. F: P/ f( K6 U/ D- E @.HasOrder := false; H/ F% |/ F& g3 K, |
@.DrivingHome := true;
1 e6 X$ ~$ C2 T6 y rgManager.tryToStartTransOrder;
7 u8 {: v: f2 q! ` H9 F if @.Destination = void6 {8 @* x) g) p0 \$ b
then -- no transport order for vehicle @
; K# \! v) h g7 P; X, j0 B% j @.Destination :=: }- L9 J, k( `; e6 _ u
rgManager.nearestFreeStation(@,track.~);
3 E d" V: G- y; M$ K newDirection(@); , Z2 a! E" H( A" J/ g! q( ^
if @.Destination /= void then
" n5 G( M: M, `4 h) w, D; Y @.Destination.NumReservation :=
! ]" K$ N9 e0 O' z' H0 ? @.Destination.NumReservation + 1;1 P( _. F @ I/ }
end;
, }' Y! n+ w' G7 S3 z @.CurrIcon := "drivingHome";
3 I" [4 E+ b* ]; @2 z! i/ m1 ? @.DrivingHome := true;
0 Q, l6 h( F2 j: D* H end;
1 f" k8 K/ S& [( v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% S7 Z8 X3 ]1 l% z* p part := @.transpOrder;
9 Y4 F) z: _' h: O- ~ part.move(@);-- load part7 c+ T' I# ~) z, e5 Z/ J
@.CurrIcon := "load";
! C0 P2 l% \# h! O GlobalDistObj := part.globDestination;: X0 i. [' y N
assignLObj := rgmanager.rgAssignL;
9 [9 Q$ Y q' b row := assignLObj.getRowNo(GlobalDistObj);9 B, A, c4 \+ E: N" d
if Row = -1 then -- since 70
$ N- B& B% S' b1 a8 `: @/ c if lan=1 then; D$ F+ V, `9 F7 S+ G/ R5 E5 Z- V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 u9 v3 Z# N1 `% l8 v" R1 b& b& t
to_str("in der Andockstation: \"",?.~.name,"\""));* o. {9 Z( s! H& X. [6 y, |
else7 o {5 H) W0 w) P! _+ z2 D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 D; A/ o. j8 g( a+ b
to_str("in docking station: \"",?.~.name,"\""));
. s, x* E7 a/ C( k. p z end;
, h" f# d8 t, ^9 ~; n6 J else
" M: E# Z+ r8 d$ L, q3 c% h' M @.Destination := assignLObj[1,row];4 G/ \2 K- }' j, V! M0 X9 K
end; % _# c* {" B" W$ \
newDirection(@);
9 j& K; B0 Q6 Q! H5 c. s: K @.HasOrder := true;
) A8 ~2 q* @& ]1 ?; G( I end;) v8 o$ Z" J" w" S
end;
7 ?, k; o) ]6 u% Zend; -- of the method4 F! H+ [2 a& u+ {; s4 o, o
|