/* called by: entrance ctrl of the object 'track'+ h, I' F! k; x
*/8 r2 z& m$ l" H% @& c5 i
is
3 h, G$ \1 L) ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; g8 J' i/ v! L( F4 Cdo
. h" V+ H/ ^, s6 k9 p3 f Lan := rootfolder.Internal.Tools.AOLlanguage;
; ~+ r. V$ L9 j, o3 W g, \8 @, k if current = @.Destination -- else return
6 s; _9 r& h& ~& c# W then
" [4 \4 ~6 g, q# W8 v: [/ }, O @.Destination := void;
. m/ O) j6 p% R% Y if @.occupied then) O( z5 I( T/ C; F q4 p; q
part := @.cont;
4 Z: F, Q% u; ~4 x9 w5 Y+ e! P0 b @.transpOrder := void;' n. |. v) s7 ~" c: ]( \ m6 U) n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
e# \8 X! M, T9 z @,root.eventcontroller.simTime);7 g* A( W# v" T& {2 Q
@.HasOrder := false;
. I @) r* {( w2 A/ }6 u4 p! } @.DrivingHome := true;
; u+ t1 m3 D% d3 o% g$ _$ ~ rgManager.tryToStartTransOrder;% N+ E0 A! E h+ ]
if @.Destination = void
- g6 G/ h) D" o% C4 r* P) S5 a then -- no transport order for vehicle @
8 \7 T& d; {% k4 {3 d# g& H0 _ @.Destination :=) B1 \/ O* b9 i+ x) C
rgManager.nearestFreeStation(@,track.~);
c: _5 a# h4 t$ c7 l/ v" p newDirection(@); ( v$ a+ _3 E4 C5 X
if @.Destination /= void then; I4 L4 M- ~* I) _: G+ h
@.Destination.NumReservation :=$ z' N' l x6 ^" U# C
@.Destination.NumReservation + 1;. T' B1 G/ c& A3 ?6 y
end;$ [5 O- R7 U: @5 T4 ]+ U4 ?
@.CurrIcon := "drivingHome";" {! I# k0 j# z7 M
@.DrivingHome := true;
8 K- g# f( P! B/ u. ? z end;
! b0 L- Z. w3 Q) Z5 v) @" Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station- {" A5 E, l+ f8 `/ r+ f
part := @.transpOrder;, `( T+ t9 c: }7 r( ]$ I
part.move(@);-- load part8 Z9 @# U' S: }$ M& f9 z& ^
@.CurrIcon := "load";
9 J4 d, L* u% T& {8 M! D% M GlobalDistObj := part.globDestination;
( d( @. U/ ?4 p) b/ R assignLObj := rgmanager.rgAssignL;
! h% g4 D# v: b8 C" E5 k row := assignLObj.getRowNo(GlobalDistObj);
# I% \3 v* e$ j- y' E if Row = -1 then -- since 70
, W/ [$ V4 o- u, @: |& F2 r$ B3 ~. v) Y if lan=1 then
0 ~$ v- f0 @0 A W% x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), S7 U1 n4 ~, a% y& q$ M
to_str("in der Andockstation: \"",?.~.name,"\""));
* w R5 w9 e% G$ O else. U2 y( e4 p- ^! b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- E w \, I& T9 C& x
to_str("in docking station: \"",?.~.name,"\""));
- g% ~* _% q4 W* I# H end;
' l9 F( z; d/ D% x else
) I' M& ]8 u) D @.Destination := assignLObj[1,row];
8 M2 i2 ~; k2 y( ^) q" r0 \5 Z% ~: n end; 7 ^1 K+ z' N7 H A/ ~% g% k
newDirection(@);5 R* L8 S2 ^0 h8 I* g( u: w
@.HasOrder := true;
4 w" n3 }& `# o: S end;
5 S6 Y1 ^6 i" K9 e0 m6 t s) ` end;
1 ~) \3 W- n5 t" S' o, z* ^6 h& ]end; -- of the method6 J4 D; x! ~0 W, X2 y4 K7 E9 F- `
|