/* called by: entrance ctrl of the object 'track'* d( Z3 U. L2 U
*/
- |* f5 S/ J \6 d# ois
; @3 O7 X/ e* f7 I* ~4 C part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 g! f5 ^0 p+ c$ ~0 k3 a ]5 F# E) Cdo
( ?: N9 K4 `, z! A; l* ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
/ _, Y# ]: x3 t( I if current = @.Destination -- else return
q* X) m5 m* a# h5 |; V9 N then& ]) M8 y. }1 s
@.Destination := void;( h; U0 i4 o6 |& Q0 S8 f4 v
if @.occupied then
$ {: v" ~4 c, ?5 y+ R" H9 C; U part := @.cont;
' R" w2 f4 P, \8 @3 Y V6 K; c6 [ @.transpOrder := void;
9 ^) E3 M: e3 a( i5 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( c4 r) m/ d/ u
@,root.eventcontroller.simTime);
5 R& K- S W% H' z: O: T/ I @.HasOrder := false;
; R' n; z7 V1 m Z2 N+ n+ U @.DrivingHome := true;9 O4 X# l2 Q' p
rgManager.tryToStartTransOrder;' I' _6 G* t; M" E. a$ m, R
if @.Destination = void
1 b' c6 `2 T: M/ u- c9 u then -- no transport order for vehicle @
& Q1 r* j+ s; { @.Destination :=5 a% z6 J/ \* {8 V2 n2 _( J
rgManager.nearestFreeStation(@,track.~);
1 w" Q5 M8 g- U2 }; o, K3 n newDirection(@);
. k6 I$ f' ]& ^/ ?. Z: u) w if @.Destination /= void then1 s* \8 d8 E" ]6 @+ |- w4 X# ?
@.Destination.NumReservation :=
1 T7 x9 n6 x, x @.Destination.NumReservation + 1;+ a0 W& x4 \$ @& q% ^
end;7 N7 [' I" e; [/ q% k0 Y. s
@.CurrIcon := "drivingHome";
3 l- ~4 w5 G0 d; h @.DrivingHome := true;
! ~! w0 z8 M2 e3 N+ X; L% ]- Q! c$ i end;
( S8 z2 t6 H+ z0 ]6 }) U) H" u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: K/ @" C5 {% P. e: e6 H1 @ part := @.transpOrder;
K& s' k: @# x L. N9 a! t# d5 M part.move(@);-- load part6 a z1 b% g- } \3 [9 M! Q
@.CurrIcon := "load";1 {7 R/ g Q7 R
GlobalDistObj := part.globDestination;) h5 d: b1 w5 h8 c
assignLObj := rgmanager.rgAssignL;
$ W) V# L& I5 x, J' S$ m/ l' {# S row := assignLObj.getRowNo(GlobalDistObj);
* c I$ p$ O6 ]- m0 E8 W if Row = -1 then -- since 704 g+ D# b7 n/ G l/ ^5 R+ u
if lan=1 then
6 Q4 @6 m$ ~; K7 P4 u' k+ ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
C h: Y" K- H6 y4 | to_str("in der Andockstation: \"",?.~.name,"\""));/ e+ Y# U" h% m4 X# e a; B5 o6 N
else
% I- `6 e9 G$ B0 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 I6 t# v7 Q/ s7 P! a/ H, h( C
to_str("in docking station: \"",?.~.name,"\""));
0 \0 c7 e6 E/ `; I+ i end;
! q0 B$ S6 ]+ b$ M/ N, A else
( X. |. b5 m8 k$ A9 ?8 } @.Destination := assignLObj[1,row];
! l4 t& {8 z }5 g- z/ o end;
% H" b! u7 @" y2 ^5 w" z- G! t newDirection(@);% f! I+ b2 C# ~9 e2 y
@.HasOrder := true;
/ F% o% B. A! i, \+ A+ _, O, d end;
5 G# Y& N4 o7 S4 m+ k% ?9 G end;5 |9 z8 d; T- X( s" ~/ `, J/ B
end; -- of the method6 {2 b, b% s0 L, |) p0 E8 k1 B( F# R
|