/* called by: entrance ctrl of the object 'track'% W: E9 X) _8 Q ~2 S7 R
*/
8 a1 d2 u) A5 x0 vis4 u2 C( c8 i0 [ T+ G- Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) P( r. o8 `8 l+ M p. I% ^+ j+ |
do
4 I4 `' J$ ]5 o* ?8 }; { Lan := rootfolder.Internal.Tools.AOLlanguage;
+ K0 ?( Z4 R. R& X if current = @.Destination -- else return, e: j2 {- s+ J6 I$ I/ Q
then9 h9 ~1 g- p, ~# d! B
@.Destination := void;
' M* }) j* ]* r8 `: R7 m8 z if @.occupied then3 @4 y3 s# c" C7 q* n- `
part := @.cont;3 R: N3 H) f4 D* l
@.transpOrder := void;- ? M' m% S1 D! f. o* q3 h' ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% x; g0 O- w' H6 n' Y @,root.eventcontroller.simTime);3 r* n, n" B5 X5 y+ C
@.HasOrder := false;
% a: a, p, t; c% g0 r @.DrivingHome := true;
* k5 K, W3 j4 E rgManager.tryToStartTransOrder;8 w; E" G( Y$ o9 H& y
if @.Destination = void8 T# R$ }& k! @% c& G4 c% P
then -- no transport order for vehicle @
6 w/ d F# r3 u, E: ^+ H5 x4 o @.Destination :=& a5 A$ h& ^% a
rgManager.nearestFreeStation(@,track.~);
; q9 I* `7 S+ f newDirection(@); : P4 Q4 T7 L, Y: K6 j0 T* M
if @.Destination /= void then
) l: `1 `; g; y) c @.Destination.NumReservation :=/ K" L6 e9 A c* r/ p
@.Destination.NumReservation + 1;0 B1 [ D: L0 a0 Y
end;! r) u$ ^, R% ~3 r
@.CurrIcon := "drivingHome";6 Z" @; D& N, U- W6 X. R9 R) d
@.DrivingHome := true;/ R* s( h* J3 v! S
end;+ {: O0 y' ^& C% R1 u' [ |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- d! J7 H6 Q. X( w part := @.transpOrder;6 I5 j( m4 ?, d) }% a5 Q4 y) D
part.move(@);-- load part
, L( q$ q/ u( J* @6 ~$ @* O @.CurrIcon := "load";# ?% I1 M- K( \3 G
GlobalDistObj := part.globDestination;' x$ k0 w9 d: Y; Z; l! P3 X+ `: P9 \' |3 |
assignLObj := rgmanager.rgAssignL;) |) `* {* ` f7 P
row := assignLObj.getRowNo(GlobalDistObj);
* _6 Y0 _: r! \1 W if Row = -1 then -- since 707 R1 @- o3 _3 \' f' w% N
if lan=1 then* {( {; q! E6 g* Q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" B" H8 ^* R! q3 D' S7 d0 h to_str("in der Andockstation: \"",?.~.name,"\""));' E1 a6 T9 a! m6 U
else
' ?4 I$ {& Z( x+ K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 R! D2 F" ^( n8 D
to_str("in docking station: \"",?.~.name,"\""));
+ C+ T5 f0 _/ u% E/ d. k' R end;
/ f4 n- d) E/ A- t2 J1 f else
9 x) y j! e, E( h2 A0 Q: _ @.Destination := assignLObj[1,row];
. g( _9 k- p y$ y1 k. ^6 L end; ! A# K3 h2 p/ P2 ^1 O
newDirection(@);$ u( A" M3 G/ _1 _* |9 E( b7 ^! y
@.HasOrder := true;$ y9 w; s; _+ p6 w" l: E4 u
end;
. |3 F7 H6 o' B) d( J end;
, U1 W6 Y$ |: {5 x8 Mend; -- of the method' I( |7 j6 W5 H$ k9 G. i
|