/* called by: entrance ctrl of the object 'track': D* {% J: [, @7 Z6 Q1 E9 A3 K
*/
) t8 R- r' b; Vis
^0 n9 V( M& U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# R* ^0 a5 X l% N! e& i7 Rdo, F( E* T: D, W+ s& Q# E5 L
Lan := rootfolder.Internal.Tools.AOLlanguage;
( k3 B) e7 J0 a6 x8 i& R if current = @.Destination -- else return
6 K- h; k5 T' a- R then
& L$ V$ X" |+ ~4 v3 z3 T @.Destination := void;& N- ~7 b5 G+ j0 ~/ f
if @.occupied then" [1 s }' O* v0 B
part := @.cont;( K- o$ @# B5 i( X
@.transpOrder := void;3 }% |7 ^: {; }8 v3 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* }( a. w5 `. P3 }" q @,root.eventcontroller.simTime);7 v1 j' O" }4 l0 z. o) c
@.HasOrder := false;
7 r2 L3 a5 \+ [/ x @.DrivingHome := true;+ k- k+ z5 L0 A, I7 P9 S+ m7 {% l
rgManager.tryToStartTransOrder;
5 O2 [& t' Z3 J& t" z$ E/ M if @.Destination = void+ e. ^. B7 C) d6 c
then -- no transport order for vehicle @9 v2 L& j) e( X7 ^) D7 x
@.Destination :=
0 c0 L P0 s3 z rgManager.nearestFreeStation(@,track.~);' k: G1 J& h* h4 p5 X7 r
newDirection(@);
; ]. D5 @+ n- s& u# D4 V) q1 m if @.Destination /= void then
/ E( v! y& j* u9 h% k @.Destination.NumReservation :=
4 t+ j3 n7 m% a @.Destination.NumReservation + 1;
e7 D$ A! Z: u' D; s5 c3 |8 | end;
% Y7 f0 b0 }: R. U. | @.CurrIcon := "drivingHome";; c1 A6 I8 o& x6 f4 G0 d
@.DrivingHome := true;4 Q( D, ^4 @' p1 _4 a5 M) [
end;9 B3 a( Y! b' ~& n( q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# q0 \9 l) r% }9 R: z% }
part := @.transpOrder;
( r0 e9 B8 i6 h part.move(@);-- load part+ w) Q) d# |( [
@.CurrIcon := "load";' a9 Y' c- @4 c# s; Q" b j
GlobalDistObj := part.globDestination;
- k& e! j* J) u$ i8 I1 `! |4 ~ assignLObj := rgmanager.rgAssignL;
) Q% e, X# k. A; X9 @ row := assignLObj.getRowNo(GlobalDistObj);
! K2 y5 n) Z! p4 h1 l" t' C if Row = -1 then -- since 709 ?1 m, D- a. v
if lan=1 then0 W- I% V+ f8 s- p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! B) ~9 u; @2 x! W, @ to_str("in der Andockstation: \"",?.~.name,"\""));- j8 F0 E9 g. J9 c4 s, U
else
H5 H6 w) p# F' ]1 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ r8 p4 L4 Z2 t1 v1 W to_str("in docking station: \"",?.~.name,"\""));
6 z+ S" `! m& _2 Y9 F0 Z0 B end;2 ~5 @+ D6 X2 t: [9 ]/ Z5 ?
else9 {- ~' @: O. g j
@.Destination := assignLObj[1,row];: Z7 A" m; o$ b" e
end; * H7 G% ]+ y S) N5 {
newDirection(@);
- e1 j! s) m4 }* \5 c4 n @.HasOrder := true;2 O; J0 e8 B/ i0 u
end;4 q9 U) R1 K" U6 ]: O9 k$ s
end;8 C$ \5 D! o9 j/ U" ~! l
end; -- of the method
# o4 m) s# K5 m& A$ T |