/* called by: entrance ctrl of the object 'track'
2 }0 z( T& @9 `9 w: ^& P# Y; ]*/
0 [1 B* D- K r, d8 { bis
5 E2 \7 C8 J5 @3 _" Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 F9 \$ U, _' m f8 f- qdo
" W' L" E+ a! R( P( ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
- e2 N$ p5 X o% m5 k+ f2 z if current = @.Destination -- else return7 E/ u8 s! {% S8 T) _4 n% T
then" N- j% p8 V7 l- Y7 l
@.Destination := void;; {; n s; |0 e) S- y6 r
if @.occupied then8 ?# {; Z3 v. k8 x/ R. f2 m
part := @.cont;1 b6 ?0 h( C: [4 e, G) w$ v3 \
@.transpOrder := void;3 }9 h+ r) w2 G j; ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ w# Q3 z, m8 t% ^" u2 P2 g4 x @,root.eventcontroller.simTime);
! [+ R3 A( `( w% D @.HasOrder := false;/ w3 E! r# R6 B3 E: H5 F
@.DrivingHome := true;
# V) x+ t% a- b- w rgManager.tryToStartTransOrder;
7 X4 K) i8 c# v- i4 ~5 _ if @.Destination = void% A+ P: P L, j
then -- no transport order for vehicle @
" R: s( k# S7 W9 E! |* P% y @.Destination :=% m; }7 O& s% _. o6 o; f/ Y* V
rgManager.nearestFreeStation(@,track.~);/ x3 v3 i7 q8 s% X
newDirection(@); 9 }' L& `5 k$ y( t/ C
if @.Destination /= void then
0 w% y* j4 x* Y* \% f @.Destination.NumReservation :=/ y1 M) F0 g; Y# e) U
@.Destination.NumReservation + 1;; I" V, w! Y- A" c% u
end;
% e) s1 b0 N' T) o6 w0 x6 y9 g @.CurrIcon := "drivingHome";
: V: v, O9 l2 p+ l0 W @.DrivingHome := true;
4 m4 |$ ~7 W) H/ w0 ~0 V end;
8 [( R4 _1 M) ]* r5 D) ?: G8 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station; G0 h/ i* H/ r6 |4 t9 t! ?) t0 K
part := @.transpOrder;
1 r, j' ?' g! ~6 M4 ^7 y+ s part.move(@);-- load part+ I# X5 ]- h& v( y0 t' Z7 M0 u
@.CurrIcon := "load";
5 t+ l' z( ?' D1 h GlobalDistObj := part.globDestination;! p w" h7 I! v ]8 u' I
assignLObj := rgmanager.rgAssignL;
. ]- H' r3 v% M row := assignLObj.getRowNo(GlobalDistObj);
3 N" U# F# e$ ? if Row = -1 then -- since 70
1 R. F: Z) k$ v if lan=1 then* f, F; U/ G" B; v5 I% J% q5 x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 I6 O% N# \" ^8 X6 W- g, i+ i to_str("in der Andockstation: \"",?.~.name,"\""));" B, g7 G6 D- A# O3 o
else7 N, x k, J: y. q( ? P6 ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 n8 r0 s5 Q- T0 F, k1 I* Z* t to_str("in docking station: \"",?.~.name,"\""));
6 S* ^3 r& |$ E- Q end;
' ^( g' h' b% c! }6 @# `: \ else
5 Z$ T* ]0 P- y$ J @.Destination := assignLObj[1,row];1 C$ ~+ y" c% z1 A
end; , l2 R8 _ g' f* {
newDirection(@);
+ M+ j6 j3 t+ ^0 L; j3 t1 T! v @.HasOrder := true;
; f4 @/ ~2 q% }+ O# Q3 ` end;; H; i7 X9 u3 q3 f8 f: X* x
end;
* `% F1 v& w3 p( }$ u Q1 Cend; -- of the method
+ a( m' W6 P; g7 P+ G |