/* called by: entrance ctrl of the object 'track'
4 ]# T+ G5 G I*/
7 |) G( M7 ]: m) Yis
2 t. N+ C: s0 c, S9 x part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 z9 J/ r7 ?3 O9 n, |, ]/ Ido/ \ K( a; F% m( A0 [3 f, k
Lan := rootfolder.Internal.Tools.AOLlanguage;
, `3 e# ~* {6 m7 y2 c9 s& k if current = @.Destination -- else return
# _# J; B) r1 b) |# R then
+ y/ Q5 _/ r6 _" `, @ @.Destination := void;
) ?+ [5 G4 }; Z3 a7 Q if @.occupied then
; q! A* T! i2 I. \* l part := @.cont;
7 N$ ~- K# y3 y2 s/ s @.transpOrder := void;
7 D" n$ m$ x2 ~9 \* w, i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( m* }* l) T8 T9 a @,root.eventcontroller.simTime);
; i, I3 X8 O# S' Z! L @.HasOrder := false;, n1 q% Z9 t7 Z) ]; Q
@.DrivingHome := true;
1 ?0 R# u( R8 Q' K( S7 k rgManager.tryToStartTransOrder;* N+ J0 q i( A' p% g3 \. k# d
if @.Destination = void
( j9 O2 M( p& M. m3 w then -- no transport order for vehicle @
0 }4 g$ B. R* I v @.Destination :=
8 Y* m' b, O8 _9 y rgManager.nearestFreeStation(@,track.~);( _8 K. R. r( u5 _
newDirection(@);
( V/ ]& y' O" Z) L& Z if @.Destination /= void then. j3 U8 g. j; I) p2 d
@.Destination.NumReservation :=
( E2 G: [# N0 Y1 k1 x @.Destination.NumReservation + 1;9 _" y) U6 N0 t4 q" @1 v
end;
9 p$ y- R3 C3 t0 D& M @.CurrIcon := "drivingHome";
. r% V: Z7 L2 e7 ^# b8 X @.DrivingHome := true;
- g: q+ [ F* W$ u6 }5 t end;
6 a' V! s0 z) t& w& l& { H' a: z, P else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 j- W# F7 v( a
part := @.transpOrder;
5 q/ Z9 I0 c0 C) ~ part.move(@);-- load part9 H! a+ b: T1 D& T/ L6 P
@.CurrIcon := "load";
$ X; p5 \* \1 q- r+ U& L* {5 L* Y GlobalDistObj := part.globDestination;
( R; P1 m+ t# V# { assignLObj := rgmanager.rgAssignL;
$ I4 V" ?0 J$ m! E. Y) r* {; L row := assignLObj.getRowNo(GlobalDistObj);
9 B0 K- Q4 O2 Z4 F4 D+ @9 \3 L8 q if Row = -1 then -- since 70
- {3 o0 I9 H o+ |6 {% `1 ?5 V; e: A if lan=1 then
5 s* l( \5 B9 ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 U, p, {- C$ `2 ` to_str("in der Andockstation: \"",?.~.name,"\""));5 ?; S& ], I+ i
else
, m: e1 |' T" h1 P/ F( T2 ? promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 ?. r# N! x& t: V! R p1 H to_str("in docking station: \"",?.~.name,"\""));
" R3 m: t( c v! S( z end;( H' \2 A' i7 T- K8 I# x1 `
else
/ G9 ^7 P# E- t# Y1 f& A2 Y3 d) ` @.Destination := assignLObj[1,row]; }" N. t e2 h4 A6 D
end;
% k I- X( f, t! {1 E) V newDirection(@);
- s2 H5 u9 F5 z2 p @.HasOrder := true;$ A( ]- z3 x; u# ]1 P
end;
/ k% c3 k9 ?% g) L end;
# x* h0 V$ A+ q' E# n5 Uend; -- of the method1 U/ Q# N; D; D( k3 o9 Y
|