/* called by: entrance ctrl of the object 'track'
& |) |) U2 b7 D, i. A1 j; F*/
- w; l( @: H* x' @+ [& Gis& c O Z- K" s1 J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) {/ c$ v A- m ^1 p: g2 `( N
do
, X: P# h3 l4 `5 B0 y5 @ Lan := rootfolder.Internal.Tools.AOLlanguage;2 u; C( |; d6 P/ T7 W
if current = @.Destination -- else return
! w* g: L, I0 G+ ]. G then
w \6 r" m& {+ { @.Destination := void;
8 Y- G/ ~+ t. E- `: Z3 y if @.occupied then" R/ G% `2 A7 v/ W- F- u/ i
part := @.cont;& @ V+ U1 t# W
@.transpOrder := void;
0 | g/ |3 k& R+ f2 e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 p1 G. e* C0 Y8 J7 h: M @,root.eventcontroller.simTime);
4 G) x0 f5 G G" I; L* n" ` @.HasOrder := false;
/ c9 S8 U9 b1 ]; W f @.DrivingHome := true; T& B0 l" j- b, K i' g: t) s
rgManager.tryToStartTransOrder;* ^5 b- P$ V M& M) k
if @.Destination = void
9 q8 Z& @4 ?6 l+ Y1 n- L then -- no transport order for vehicle @
9 y$ U, ], I+ U! a/ U. W, Z' C% M @.Destination :=
. C0 g, a! {, D0 h# `+ e2 b+ ~ rgManager.nearestFreeStation(@,track.~);
' R5 N9 t! r2 S! v$ _1 n( b newDirection(@);
; t7 e) R; @; b1 [4 P% I3 h if @.Destination /= void then) q0 `1 U0 U4 c) J7 q
@.Destination.NumReservation :=
6 |; O1 q6 T* w7 a7 Y @.Destination.NumReservation + 1;
" x/ i& }- ?! ~3 C% P, ^; y3 y end;
, j! k+ \- x( N1 { @.CurrIcon := "drivingHome"; q/ {2 j1 T3 \3 ]. F& K/ }; i
@.DrivingHome := true;
; q- _6 A- [2 T& p6 r/ J. E1 i& h end;, K6 t2 U) }7 y" K2 M! |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: N3 _5 A3 H5 t
part := @.transpOrder;9 k' k( v' w( _# g0 P y+ P8 A% ]
part.move(@);-- load part t8 J. Q) J# ^8 e5 b$ ~* I! G
@.CurrIcon := "load";
- l1 p) _( ]1 ?& s7 N( T2 h/ Z GlobalDistObj := part.globDestination;% c8 i- F! k' z4 M
assignLObj := rgmanager.rgAssignL;: E; u& G8 s9 f7 n6 R( f R; T
row := assignLObj.getRowNo(GlobalDistObj);
/ f) G0 `- P0 b" J7 v if Row = -1 then -- since 70) K& K0 y- V( X& p! e9 O6 P
if lan=1 then
4 B5 v/ A$ V; v3 M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 v3 O; _- k$ J G4 O- Y+ k to_str("in der Andockstation: \"",?.~.name,"\""));/ H. n$ A$ i& h2 k5 K. `
else5 s) ^8 ^( T' O+ b* ]9 X- Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 ?7 b! U1 @" f
to_str("in docking station: \"",?.~.name,"\""));
+ w: M, B) @( c9 M9 X end;
- r8 }* p4 S/ b3 Y% x else* T+ s& G; e6 G' {
@.Destination := assignLObj[1,row];
8 k0 O2 k" v8 p3 X' w end;
3 ?4 Y; G; [4 L! I; i newDirection(@);, z9 v& c) I+ S2 Q* F9 u
@.HasOrder := true;8 Y5 @2 S m9 L4 Y& @4 B
end;
$ o9 i9 z8 d* g3 ~ e end;" {9 G( t; F+ e; I
end; -- of the method, Y7 f; d8 I1 a0 j3 h5 S5 k
|