/* called by: entrance ctrl of the object 'track'4 J% j8 F6 b2 I0 B- [; E
*/
- k: _. `0 m) \/ {3 _8 Dis
^: N6 }4 ~; \/ Y- Q w9 K% S( [- [ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) F0 S; ~% a" K5 i2 b7 n. Sdo
7 U: A" j" h: O% f! h P, H Lan := rootfolder.Internal.Tools.AOLlanguage;
1 {+ ]; v/ g) I7 \$ T; |1 v if current = @.Destination -- else return
% T1 p& W1 d! ^( p* A then% E3 O3 C; g. Y2 |6 F( P
@.Destination := void;
3 W' N- ?6 U7 H" d* B& m if @.occupied then
/ |; m1 z6 C5 Q) h4 a6 e* | part := @.cont;& H( H7 T: P U z; g
@.transpOrder := void;
: D( q: a3 D2 @! J; J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% c0 [+ G2 B* [! ~
@,root.eventcontroller.simTime);" B+ \- P$ W, D+ s R. _) G" A
@.HasOrder := false; n: ~& W7 T1 q! u) D! x4 o
@.DrivingHome := true;, F: @. C4 F2 ?8 {% |6 T! w
rgManager.tryToStartTransOrder;$ I' j: O+ J( h/ D- q& m0 a( r; v' y
if @.Destination = void, N, \6 s7 k4 _: ^- U. b% q$ S
then -- no transport order for vehicle @
2 G: I( ?( c. Z: [2 Q2 x& C6 w, ` @.Destination :=
: |. S9 {! |, k rgManager.nearestFreeStation(@,track.~);
: Z0 t( }/ p" A7 I! [ | newDirection(@);
; W: H$ s+ Q1 Z) y0 t6 W9 L) w if @.Destination /= void then
$ t: s: ]5 W7 e4 M0 x; o4 \6 Z @.Destination.NumReservation :=$ u* r3 i2 Y; X' B
@.Destination.NumReservation + 1;. i6 L( }/ L' M. z/ B- d; U
end;
9 d8 A4 k' ~1 {, F! R7 U @.CurrIcon := "drivingHome";; F* R) B# H2 ^3 r6 n
@.DrivingHome := true;4 ^7 l$ D8 D; _% R' {
end;4 l: d9 i/ a7 e* S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' O( z# A- t1 \1 C part := @.transpOrder;
! D+ a4 ]6 R2 k* d: K2 R part.move(@);-- load part
6 a: f2 t( h+ x* p' m @.CurrIcon := "load";5 {# d* c: L1 e, {3 k
GlobalDistObj := part.globDestination;
1 |! ?5 h K2 P& ? assignLObj := rgmanager.rgAssignL;5 K1 S! |6 I# I( e% f
row := assignLObj.getRowNo(GlobalDistObj);
3 N! V- @ c2 r9 p& q if Row = -1 then -- since 70
3 D: z* y( k& _7 V if lan=1 then
4 u. p3 O0 ?8 M6 f1 @/ d: ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 M$ B) C" b, K: {6 F, ]7 |0 o
to_str("in der Andockstation: \"",?.~.name,"\""));* e9 R" l1 w6 M3 K) Z+ Q
else6 B# t' D$ g/ k S, E& @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* U4 d1 R( ?1 e6 @9 _6 ~
to_str("in docking station: \"",?.~.name,"\"")); % Y& _- C& }8 d1 W$ f0 ?3 e
end;
+ U/ Y$ i. Z; B" [! u else! c" Z2 J; {( U* u; Z% e: `
@.Destination := assignLObj[1,row];9 I( I8 T6 p% W' G
end; 7 K" P1 v1 ] r: z0 H6 U9 D
newDirection(@);
: K" Z/ l$ S, F3 Z/ E9 \ @.HasOrder := true;
. P" W* T0 t. O. x0 l7 `/ N end;
2 k) W9 n1 P# [$ V# B end;
) Q7 Y/ M, @' S2 Z2 Uend; -- of the method
1 h3 R/ p3 \/ t7 T5 Y! R) D |