/* called by: entrance ctrl of the object 'track'/ f+ A: I% D! _; R8 p( |- z: q% f
*/
1 |( I8 B: W4 @0 [0 e# iis% ]! S- S. G' |8 D* N. R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ z. K% F, u' b# L6 W& I$ L) z0 i1 M
do
$ n8 N- c- F" U5 Y, Z" J k Lan := rootfolder.Internal.Tools.AOLlanguage;+ z; l. M) B3 a# O# i
if current = @.Destination -- else return
( D9 Q$ S7 Q/ T `. R then2 I, h* [: U) }' e$ b
@.Destination := void;7 G3 n" Z- q; l/ M! h
if @.occupied then2 v* z. u. a$ x2 u% @' R
part := @.cont;' }( ^8 b( w) M# N9 R
@.transpOrder := void;
& {) I% M) p* P. @, x part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 O! @' ^5 R& {' n @,root.eventcontroller.simTime);& q- r. m5 T! h, W D
@.HasOrder := false;% G6 I9 `6 ^* p- x* h. ~1 t7 _( q+ N
@.DrivingHome := true;* i& A& i- S! p9 T2 d& x
rgManager.tryToStartTransOrder;
5 R" A8 Q& l# V3 r8 ]* z if @.Destination = void
8 u3 ^$ F% L- J `; Z" c2 `& \- B then -- no transport order for vehicle @
8 z1 x8 l3 B1 A% }* U1 `5 K6 v @.Destination :=
/ B; L' I' Q0 W rgManager.nearestFreeStation(@,track.~);
; u) E: [: v& @- a newDirection(@); 0 }# D( E1 I$ O. j
if @.Destination /= void then' l' p) i1 O6 ~+ x
@.Destination.NumReservation :=
" X1 H5 C3 I- S9 s @.Destination.NumReservation + 1;
* t& y/ U# ?4 ^$ l& w end;4 }# Z# G( P) _; {1 m3 ^" D
@.CurrIcon := "drivingHome";
& N' H4 M1 s6 K, D( f: a @.DrivingHome := true;* c$ R. _1 a, D8 p6 c9 y$ b5 {; D
end;
! x& G$ k( k2 y: }2 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) o) m; W5 }" T3 O9 v8 p% `) o part := @.transpOrder;
( Z; e8 f/ q! ^. Z part.move(@);-- load part
6 o7 {. u B' ]8 u" l @.CurrIcon := "load";% G2 g0 K/ n4 G0 I' g
GlobalDistObj := part.globDestination;3 a+ P8 Z% f8 c) ?6 Q/ J
assignLObj := rgmanager.rgAssignL;7 x9 D' t. j X: D- U3 V
row := assignLObj.getRowNo(GlobalDistObj);+ v+ _0 W7 F0 L- l0 t$ ] D
if Row = -1 then -- since 70) c+ B/ S: c7 I
if lan=1 then
# p/ N, C( F0 |5 L& k; S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 A3 a- }- q0 ^2 [) W5 P to_str("in der Andockstation: \"",?.~.name,"\""));
4 H7 U, j+ O; c+ M; ~* ] S else
, b$ }5 X" G* F' ^: _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 j! t: |# P/ O) C: E5 e to_str("in docking station: \"",?.~.name,"\""));
( l) q( M- }' B end;/ S! R9 J8 Y7 O" T
else
& ]9 ]! L7 b3 M3 k9 q; k @.Destination := assignLObj[1,row];
: L* k) E& {6 B s end; 7 K7 h) [* Y7 \- t+ E
newDirection(@);8 ~( @+ ^0 f5 @) Q5 B
@.HasOrder := true;/ a+ d5 z6 i& e4 d E
end;4 ?, X& l8 R& J% E- W
end;
! W, r/ v9 J) e6 send; -- of the method
4 U9 j; r9 [: o |