/* called by: entrance ctrl of the object 'track' u+ r/ ~ a0 z1 t) L- y5 X* a; ~
*/
5 F: S0 {0 I5 K+ q' O# Ais# F* E; ^1 p5 y" ^3 S5 m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; V7 v3 h/ `2 P
do; i+ x% C- K5 J' X0 i M6 M
Lan := rootfolder.Internal.Tools.AOLlanguage;: r9 O; e8 H- `% R4 I
if current = @.Destination -- else return
$ o2 T e) J3 G8 k. E) { R then
5 N [5 m& K8 y0 |$ q/ t @.Destination := void;2 C( u4 W7 f8 A8 O7 e7 {
if @.occupied then
4 `1 N! u9 m! e3 a4 f part := @.cont;
6 T& L6 g1 N2 w0 [ {2 Q @.transpOrder := void;/ K6 F0 e* d, r& d6 e6 `5 i+ p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( i! [; R6 x% w( z0 G3 B2 f3 M
@,root.eventcontroller.simTime);
6 R/ \" o3 n) B# g ~: q! T8 d' [. D @.HasOrder := false;
6 u4 z4 `. K3 p/ ~9 A7 G @.DrivingHome := true;+ u: e' p6 b* Y% |
rgManager.tryToStartTransOrder;2 n0 M8 b* |) U# T# N3 z
if @.Destination = void% @. N: [+ m3 T( p
then -- no transport order for vehicle @
" m# u# |+ E9 I, Z; B- t$ V @.Destination :=$ F) v* |- N! z- o1 S" z
rgManager.nearestFreeStation(@,track.~);6 l) }; a' z: Y9 e' Z' ~$ T
newDirection(@);
2 D) p% b3 ?/ G# D& q- e if @.Destination /= void then& T! o) T3 }8 \6 i P, o0 X
@.Destination.NumReservation :=
& a# X r, d" P. z4 T( g3 X( F; d @.Destination.NumReservation + 1;
9 n: R' L9 d7 i9 x! u, p, Y+ T% e end;
0 J% z+ j( \+ f( L @.CurrIcon := "drivingHome";
# `$ X& n, f3 `8 W1 \/ ^ @.DrivingHome := true;
8 o& m3 `- p3 E9 Z- L end;
3 j" O2 P) D5 V( \& v4 R6 g Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 @' f4 S( P. }1 V, l8 L part := @.transpOrder;& w( {) a1 @% m: Q7 W+ T
part.move(@);-- load part
( A/ N$ Y5 N0 u- S @.CurrIcon := "load";
) I2 y+ Q3 S) e( c$ s) X GlobalDistObj := part.globDestination;
' M1 w8 p: w8 h3 Q- D' l. T2 V5 F assignLObj := rgmanager.rgAssignL;
1 n' ^4 ^- d" d row := assignLObj.getRowNo(GlobalDistObj);: _. w p; w! `$ k5 A2 S
if Row = -1 then -- since 70
* f) `- T8 R4 T; {) v if lan=1 then
9 W3 W4 f9 f! \4 K% m1 o$ R' f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% t6 M* U' Y% {& K$ M: d" ~% ]7 |! D to_str("in der Andockstation: \"",?.~.name,"\""));
4 m; j+ r8 w0 b. u else
1 S$ ~ w' f2 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 {) b) u+ Q$ W% g' T- s
to_str("in docking station: \"",?.~.name,"\""));
# e; d" u0 Z1 r: d! w end;1 s3 ~3 L& e; U M3 D+ ^
else
0 _1 D* F8 I" C0 _" u @.Destination := assignLObj[1,row];: c) Y: I3 i! o; N1 I
end;
' j7 f ^' c- A3 N newDirection(@);
+ @$ h, s9 O$ M @.HasOrder := true;
; o) V' c$ e8 t! s1 N6 g7 e end; e! F6 o1 \# G' J
end;0 W1 b6 t( H3 n& P
end; -- of the method6 N- U2 r, Y2 M, A+ c4 @, f
|