/* called by: entrance ctrl of the object 'track'4 I6 H6 y) ^4 T @0 Z- k
*/4 j, t0 Z% b7 E% s, s* ~
is; k& L0 |* C5 f* ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! ^/ ^" v( T# |1 P! Q3 w9 U& l' [do* I- T2 L9 W8 p1 }& Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
' o- p* `. g7 ~9 O# y% A( r0 O+ X if current = @.Destination -- else return" G7 J4 u. y; C% z: w5 p) a
then L' Z B( l( t# u+ O) K x5 v
@.Destination := void;
. D2 i9 T* L/ k+ | if @.occupied then
( w' L. j9 l3 p$ c8 B8 J9 j part := @.cont;
* x" ]6 ?' V! o* } } @.transpOrder := void;4 l' F7 z7 O# W3 F1 z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 J- `& n- G$ m9 b: n: |$ s( m8 t' m @,root.eventcontroller.simTime);$ d! s* o+ a0 K0 K) c! r
@.HasOrder := false;9 m; _0 g, \# O" z5 |. K- C2 ]
@.DrivingHome := true;( I) u* x) \5 D
rgManager.tryToStartTransOrder;% A) K. L* `% ]# R
if @.Destination = void; I- p7 I7 z2 C3 }4 h% Y/ D
then -- no transport order for vehicle @
( S! m+ r" n8 M& p l" P3 W. H @.Destination :=' E" G+ ^' V, o
rgManager.nearestFreeStation(@,track.~);
4 R( D2 M9 M5 ^; X0 P newDirection(@);
, v+ q) M7 l, H& z if @.Destination /= void then
) `, ?9 \6 }* Q6 X) _6 |% O- T% Q6 f @.Destination.NumReservation :=
; ?, z" A: O5 Y @.Destination.NumReservation + 1;. [7 x( {* z7 Z: a5 _! o" B6 W/ }( `
end;4 g3 E6 R! |+ @ G) Q/ f: z
@.CurrIcon := "drivingHome";1 E% |3 Q' G( J. U! G
@.DrivingHome := true; O3 p5 ^& ]6 M. t" {! o
end;
2 ^' I: P3 ]$ r* e+ S1 t2 o& c# @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- I* S* I1 h3 {3 U( c' d. } part := @.transpOrder;
/ A3 z- H6 J# G, d. | part.move(@);-- load part
, }6 l3 R& A3 i( W5 ^/ p) x8 Q @.CurrIcon := "load";
: b5 y& W/ n G1 o6 _* H" y GlobalDistObj := part.globDestination;$ D! K( L8 q( d, z6 |% A3 G
assignLObj := rgmanager.rgAssignL;
( l, a; _, G( r; e3 i/ O row := assignLObj.getRowNo(GlobalDistObj);. H/ k- G: d( S9 s9 T T4 v7 \& Q2 N
if Row = -1 then -- since 70/ L2 T% n& o7 \; n8 O
if lan=1 then5 o3 L* T5 h. u) ~5 g" E( r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 m8 i9 l, `, z3 }5 K9 |+ C to_str("in der Andockstation: \"",?.~.name,"\""));, E! A x8 j0 j/ Q- y8 |7 x- Z
else5 N+ U. K" B0 n- T7 g2 L% T+ {- v2 L
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
& \3 _$ G/ ?% g to_str("in docking station: \"",?.~.name,"\"")); - F( O3 r1 o+ S( x1 d! m
end;9 s. K- K' t6 A2 P5 Y: w
else. g# E( L! y) q0 C1 C6 W
@.Destination := assignLObj[1,row];: ] M2 E7 h" y9 f6 K" J
end; " L5 H' n# W. b0 v0 {
newDirection(@);
' H8 }6 e8 y" m5 B @.HasOrder := true;" c- i+ a! _4 v0 h
end;9 ?: S& [+ M; V, \2 H0 X
end;0 m) [ V! n1 `2 @
end; -- of the method
0 I. u! h1 u6 A% b" X0 C/ i+ b |