/* called by: entrance ctrl of the object 'track'
* h& r7 V: Y; D q; K7 a*/
1 X+ r' u9 s: Q4 c1 k h) uis/ E: L% M( M" L z5 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 n% ~& r# _+ M7 Z% ^- ado
/ x: R" Z! ^4 U2 ]2 k9 D Lan := rootfolder.Internal.Tools.AOLlanguage;5 V* A7 B' v8 V1 H3 {
if current = @.Destination -- else return
% {- K' f" P# v2 Q! x then
0 s$ x4 w. o: r: Z( ^- l+ O! B @.Destination := void;
0 S( m8 e1 a4 ]3 U" C/ M# | if @.occupied then/ \& Z* ]! T. Y/ M
part := @.cont;. `! N3 G0 B5 I, k- N
@.transpOrder := void;6 f2 }1 F0 [. x: e7 Y# l/ }/ L1 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 D) @1 J* N, v; S4 s3 P
@,root.eventcontroller.simTime);% L& [+ u- E+ W! m6 G8 s! T2 ^
@.HasOrder := false;
% z2 K' ~ n' Z @.DrivingHome := true;
% v y2 _/ f! o3 d8 t5 o2 n rgManager.tryToStartTransOrder;
1 Z6 H5 t7 I+ J% J4 F& t/ n ? if @.Destination = void' L# _5 t2 y8 T' W1 w {
then -- no transport order for vehicle @% r, X7 _: e6 s( |" I7 _( d$ p
@.Destination :=
0 f4 f! `% I9 X6 C rgManager.nearestFreeStation(@,track.~);( S6 S9 c* r" l- J) V x, O
newDirection(@); 8 d5 R% b$ I2 @% P& I) `
if @.Destination /= void then) ~* y8 ]* u- }" q G3 Q2 o
@.Destination.NumReservation :=
4 i. E2 r, v7 V& h L. r, X @.Destination.NumReservation + 1;
8 f' C) {7 E4 E. E% w end;' ?5 J' s/ p! @$ w3 k6 v
@.CurrIcon := "drivingHome";3 Q* y2 h- o! @3 l* D
@.DrivingHome := true;# \8 ~& ^# U1 R- l8 E8 @% b
end;9 T1 S1 P! L; V+ X; n/ i- L
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* I. g; r5 X7 d: W9 R9 j
part := @.transpOrder;
. i4 B: I$ H7 G2 Q- F& Z part.move(@);-- load part
: e0 }& T9 y& @5 M# S1 `! b* h @.CurrIcon := "load";6 `0 O1 e: |. S
GlobalDistObj := part.globDestination;; m$ d0 ?: X3 i4 [6 x3 u
assignLObj := rgmanager.rgAssignL;
. |5 t) }& _) Q/ ~6 I: _/ {7 n- | row := assignLObj.getRowNo(GlobalDistObj);4 i5 l0 [$ t# u3 l) {
if Row = -1 then -- since 709 u' h( m" n/ N
if lan=1 then
' K* ~6 B3 J4 O6 H' Z' Q) h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), F* X, ]6 Y1 ~: b+ y+ Y
to_str("in der Andockstation: \"",?.~.name,"\""));
2 b z2 j7 A+ N5 |) A9 Z9 ^6 q else
8 e0 ]7 {$ K* j; K! O' I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( R0 t- `# V4 [& A! p2 |, O4 n7 }: k
to_str("in docking station: \"",?.~.name,"\""));
% |, V. L1 `9 @9 \5 A$ S+ M: v end;, o5 r' ^% n! ^! W! i
else
1 D# p% K/ W" ?! C! N7 k* M! W @.Destination := assignLObj[1,row];
9 n1 w) V. T% e2 Q2 [+ F1 v0 e end; + m( d& Q j. Q
newDirection(@);, B) h) g6 H5 N1 Z+ q. a
@.HasOrder := true;
- t% ^2 e5 `. k8 [2 k1 a6 B end;
* W- a& J. i3 T& @4 y4 h end;
/ J2 {0 @1 E* Pend; -- of the method
* d. y" W, \$ Y& \ |