/* called by: entrance ctrl of the object 'track'
9 `/ e& E# r( r" v0 Q*/5 d, ?8 x u2 Z6 b2 S
is; M R( _* \$ k) h; @: a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 y( M. P0 ~: L3 |5 V+ Q- d
do7 }: `$ ]* t8 {& k: }3 p0 `$ C9 m
Lan := rootfolder.Internal.Tools.AOLlanguage;
|1 T/ D: |7 b. G4 x/ s% ? if current = @.Destination -- else return8 f, H0 k& v2 l( ?' `
then3 b! l+ _2 ]2 B) ]9 I5 A I
@.Destination := void;8 D: `! H6 B( J) A& N: E
if @.occupied then
& J' J. x+ @- M6 y3 e. f part := @.cont;* W% D1 \0 D6 p. X) v
@.transpOrder := void;
2 b2 K& W! q C8 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 z: f" b2 v; u9 \' o7 `; z @,root.eventcontroller.simTime);
* F+ g2 t' P. _$ y- A- T( v& H% U @.HasOrder := false;
, k6 f+ t4 T" _ @.DrivingHome := true;
0 [$ s9 x& k1 b4 A) ^. J- C rgManager.tryToStartTransOrder;' m& Z, ~4 z: u! P. j5 \
if @.Destination = void" ~9 G6 @; b w" p' L
then -- no transport order for vehicle @
- K: Z0 J& Y+ \+ A. M' B$ j @.Destination :=# b: i: X) C* f9 @: @3 A- u
rgManager.nearestFreeStation(@,track.~);" m- u2 ? C" y0 b# {. p$ V
newDirection(@);
6 i3 Q2 o: R K( V5 B" u3 s( y if @.Destination /= void then* j' A* B1 }5 E6 Q! y f% k6 ~9 N
@.Destination.NumReservation :=
2 L( v& I; f2 W( Y8 y# } @.Destination.NumReservation + 1;! h0 N0 e9 S: T6 Z a$ I! b9 q3 I
end;
0 i# X- ], c" ]% J- M" M @.CurrIcon := "drivingHome";
1 V: P: f% G7 J/ w6 W: n& k @.DrivingHome := true;
8 b( d* _) Q% G7 e end;1 `% C# E9 M( u3 i; b* E8 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: w# c/ S8 M* O0 M3 y! w
part := @.transpOrder;
$ h& S; ]. B$ [ part.move(@);-- load part
4 y( i: k) J+ ]- t# g- V& x# R @.CurrIcon := "load";) m4 s0 A: i& m( j J7 c
GlobalDistObj := part.globDestination;
u* _. l$ l4 i assignLObj := rgmanager.rgAssignL;
# ?# [- Z4 v! N, R, } row := assignLObj.getRowNo(GlobalDistObj);
+ B$ b8 M7 N1 } v- |6 ^ if Row = -1 then -- since 70: K8 u, P) f' M+ ?) |: i2 s8 Z: |) R8 Z
if lan=1 then
: ~' t' F; x b) ^2 z+ p0 ?& q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 L5 n( ?6 I( T- g6 J5 F to_str("in der Andockstation: \"",?.~.name,"\""));7 Z$ D Y* P# O; b8 K! w& G3 \9 l- ]
else
) X8 J5 A$ }8 t. I9 q" H0 _7 H: n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* @1 q) F+ [& Z1 V/ T, I
to_str("in docking station: \"",?.~.name,"\""));
2 M |0 B, D# |! ?5 s2 {6 E6 t. ~/ Z end;
# N [' q' r+ s; a. B else
9 _0 c( p$ t) h- } @.Destination := assignLObj[1,row];
; x: {/ c6 N5 G! b, E$ Y _ end;
1 m7 _' P" M* w) j, N. ` newDirection(@);
' a0 E$ V R0 m" O# H @.HasOrder := true;: ~" S, q& C5 `) m8 a$ w* q
end;
/ s7 Z/ v) Y# A$ }% e end;
5 i* j+ W5 a$ |0 I6 M+ J- \end; -- of the method8 S% D. B9 T" z
|