/* called by: entrance ctrl of the object 'track'
, P6 q0 p& X! V* U0 X* B*/" n7 N; v. l7 R
is
# q2 z0 f2 l( G: g( H( ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 ?4 q( B# ?$ J/ |* C5 n
do
& H+ T6 D1 y3 Q6 n Lan := rootfolder.Internal.Tools.AOLlanguage;0 [! @* F. g5 D! d( n
if current = @.Destination -- else return
+ q% K' I% ^2 Q) P. N then% f+ Z/ {7 a" t* q [2 Z
@.Destination := void;
) ~6 Q& p( T7 o. p2 R if @.occupied then
+ V* Z- n9 `$ o1 } part := @.cont;
$ h6 o$ i; k% a) n- b9 p$ m9 w @.transpOrder := void;
5 h6 Z/ E' F+ P( ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& \( M F- m9 y @,root.eventcontroller.simTime);/ a6 Y9 I. c( ~8 k+ r1 x+ m! G9 V6 X
@.HasOrder := false;
2 e( Y: C" ]7 l6 n; g+ |9 U" M: O @.DrivingHome := true;
, @ x1 X. a* P rgManager.tryToStartTransOrder;5 D6 f0 ~% { p$ F5 p x+ h( {
if @.Destination = void0 z, m! n; S7 k: k3 f. K
then -- no transport order for vehicle @ U6 W: Q: T1 F$ U- W% a9 T; g
@.Destination :=/ H/ E. `+ E7 I# | ]- ^
rgManager.nearestFreeStation(@,track.~);, e0 ^) _3 p0 Q2 h2 \
newDirection(@);
3 \- f# x+ R. Z U* z% j if @.Destination /= void then
/ f% V3 }3 F1 s! E5 o8 w" i5 q @.Destination.NumReservation :=
* S8 `+ t* L! [7 q+ U, B @.Destination.NumReservation + 1;7 r+ }/ W& j! z4 @
end;2 z$ {1 q& {9 `! |2 o
@.CurrIcon := "drivingHome";
: _& u( o* V% c @.DrivingHome := true;
2 t. }& w% g* x# q4 z0 h: t end;
/ u* O; N3 [3 C9 ]$ I2 H+ e else -- the vehicle @ is empty, both vehicle and part are in the same dock station' z$ `; X6 R/ R
part := @.transpOrder;& p% \ d7 O% @: s9 F3 m
part.move(@);-- load part
- i8 A: X8 k# W @.CurrIcon := "load";5 {$ r* n$ b- z5 Z8 k8 {. z1 E
GlobalDistObj := part.globDestination;7 m) p! V( F0 B5 N9 R' M% [
assignLObj := rgmanager.rgAssignL;
2 {2 j8 h, W) Z: [5 S; s) [ row := assignLObj.getRowNo(GlobalDistObj);( ~1 k% O' H3 B5 V& I* T
if Row = -1 then -- since 70
, l' G2 S7 T! c) W* q# Q6 Y if lan=1 then. C2 X) F; S: n8 \" j& T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), C5 f3 H( ^) }, |
to_str("in der Andockstation: \"",?.~.name,"\""));
0 r$ q* j- u0 X( e( ~: W else
9 Q. T/ K$ ] I) N4 V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 D. ?. q, V, y7 }3 q& k
to_str("in docking station: \"",?.~.name,"\"")); ; E) N8 H1 m! j) X. r
end;
( }( |1 a* H9 D* _' y$ H else
! n# T) E/ b0 q# V( _3 {- t7 S @.Destination := assignLObj[1,row];0 o* v) `6 y! V
end; 8 m1 g- Y7 S8 W" Z' I
newDirection(@);
" |7 a# M' ]6 j8 n) {4 V1 P9 e @.HasOrder := true;
, i% ?/ f- u+ p* ?: y end;, G8 I4 E Y% ~+ v5 i
end;/ w7 F$ y a8 D# M) Z; p
end; -- of the method
. ^% Q6 {( Z9 |; t" _$ n |