/* called by: entrance ctrl of the object 'track'
4 k" d# ~: B. P- K+ q*/
1 X0 q0 }2 w, e& ]4 W9 mis
* ^: P2 H2 S0 G4 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;* Y+ Q7 E b. c+ v
do' w/ l7 ?3 K3 ]& T; J5 ]& _9 o2 o' y
Lan := rootfolder.Internal.Tools.AOLlanguage;4 `4 d/ _3 W; @$ u* Y
if current = @.Destination -- else return* B$ }2 B5 J" m; b4 j
then; v# r0 }/ q2 B( E- y
@.Destination := void;1 d% w, _ Q1 M, ]: A
if @.occupied then
2 K, t. x& f5 }4 T) F* | part := @.cont;
! p/ F$ n3 O/ d6 S% Q" @ @.transpOrder := void;1 \. }' T& f! ^; F* G% L" C: f1 z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# Z$ \& Q/ W( n3 l7 F$ {
@,root.eventcontroller.simTime);5 }7 u( o2 g4 |8 h7 G
@.HasOrder := false;
) n+ w" Z: _5 i @.DrivingHome := true;
2 |: l8 B& i; Y7 z rgManager.tryToStartTransOrder;
5 G& j9 G' |, t. I if @.Destination = void
# F- A s! l/ n% a- T% C: \5 D then -- no transport order for vehicle @$ {5 X2 q8 z$ H! P6 w+ ^" F
@.Destination :=8 j% o. D1 y4 z
rgManager.nearestFreeStation(@,track.~);
# \0 j. Y- W, B: X8 R newDirection(@); y( x3 w1 L/ z+ C; t: G# Y9 O
if @.Destination /= void then1 f/ F& q& b1 C) r$ h# ]# H: A6 t: g
@.Destination.NumReservation :=2 U0 c# F1 u8 G9 @) m4 \
@.Destination.NumReservation + 1;
8 `. o, K- u8 \ end;
2 S' o0 d) x2 y' h( U0 G' h @.CurrIcon := "drivingHome";! ?" j: ], L3 x: g
@.DrivingHome := true;
4 f" X: v' _4 R% U4 F! x end;
* e9 v5 J$ R% P( h) ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ ^ w6 g! P" q6 q
part := @.transpOrder;
0 y, f. y" v7 j( o& P8 J. k part.move(@);-- load part* ?2 ~* O+ z: w2 V) _# W( H$ _
@.CurrIcon := "load";4 T0 ~' ^7 F3 q8 T0 ]# h) O' Y
GlobalDistObj := part.globDestination;) d5 b6 J/ C! b7 o. ^
assignLObj := rgmanager.rgAssignL;
6 h2 ^% A7 K, j row := assignLObj.getRowNo(GlobalDistObj);
, t5 Q# F8 C! U; U$ ?5 Z: H1 r if Row = -1 then -- since 70' K' n. J3 P/ `6 p
if lan=1 then
5 M; ]4 R G5 N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 t9 D* Z9 J7 D to_str("in der Andockstation: \"",?.~.name,"\""));
! e& g4 S1 n. \' Y, ? else5 R$ L, Q3 O$ w( r0 R) M
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 T& }, B* ~5 ?$ u to_str("in docking station: \"",?.~.name,"\""));
( g4 ?; A6 R ^/ O end;
0 f* X) I8 Y6 S2 H else( k+ q$ F& E1 r$ j9 \+ g
@.Destination := assignLObj[1,row];. ]! E7 x1 n" y& m" T
end;
; l2 v% A) ]" _0 o/ F newDirection(@);
1 g% q! p( N' \$ G, @4 G @.HasOrder := true;! @( v, V M( F. o: I0 r% @
end;
* {+ D( D/ h7 S# f end;
3 \# i: C& K H( H5 M' j7 Gend; -- of the method2 z5 u6 D8 A. e0 S$ L G
|