/* called by: entrance ctrl of the object 'track'
5 h2 o8 k g. h6 ], K*/7 K( c' \5 c0 w1 D
is
+ \& P, d4 u) ~+ {2 [" e part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ p5 T! S0 ^$ J% \, s
do
6 _& { [$ `0 J* o [9 V" _ Lan := rootfolder.Internal.Tools.AOLlanguage;
}; c3 k7 c: ^+ K* f% g if current = @.Destination -- else return0 F, R1 [" n$ T! [8 ~+ q
then
+ D) i; s( v# Z' R3 E. m! P! y @.Destination := void;
# b' Q8 o; V$ |7 E: t- b" L$ o if @.occupied then$ q- G5 w! K( F) U. B: m0 h- E* W( }: }
part := @.cont;$ a. |( v$ E% J8 M0 K# c: _
@.transpOrder := void;( Z6 ~* h3 ?9 K3 S; e; E* u7 l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 ^8 \, ^5 ?; q, v @,root.eventcontroller.simTime);
& s* z% V5 c3 {5 l; W8 V" F @.HasOrder := false;
) G0 R, r1 x# P! l2 c @.DrivingHome := true;
" H$ q# R! H$ ~ rgManager.tryToStartTransOrder;3 M# \0 |0 M* X) q& z7 O
if @.Destination = void
; ]& |! u, I( N( f7 M! R9 ?& i then -- no transport order for vehicle @$ |5 w" `# t ^0 I8 q
@.Destination :=
8 a- Q" r) e5 F% z/ c rgManager.nearestFreeStation(@,track.~);; R" k2 @3 S$ z$ l0 O% |% c' j8 r
newDirection(@);
8 n2 \$ S" W2 H if @.Destination /= void then
9 D/ ^1 A1 q6 a# k @.Destination.NumReservation :=
/ Y9 w: Y# _& a. y8 o$ N3 w @.Destination.NumReservation + 1;
: p0 I' X, h# G+ S$ g end;2 N, B) d$ v/ l" A9 g( D
@.CurrIcon := "drivingHome";- Q+ @) x/ s% T0 H0 X
@.DrivingHome := true;. C6 f0 o! n! |. D0 j6 ^9 O
end;
) \6 @4 ]% @& V! p g2 o; U- i6 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 h* B4 l5 ^: o" M4 I! P
part := @.transpOrder;
i) m- `. c& q6 d% x, X* I& E part.move(@);-- load part
7 r, l7 Z. ?! A6 b+ y @.CurrIcon := "load";* u) H) n- E8 o+ \4 n, B
GlobalDistObj := part.globDestination;7 p; j, @0 T$ }2 p2 d8 R+ s) `
assignLObj := rgmanager.rgAssignL;
; m _( @; E4 ~/ O& b! ` row := assignLObj.getRowNo(GlobalDistObj);
/ k9 }' z/ B6 u. N9 X- T if Row = -1 then -- since 70
2 l7 {2 g" E6 z if lan=1 then
" U/ T: S! B9 M: E* c promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 s$ W( l, l- Y! c l) }; u& [, X to_str("in der Andockstation: \"",?.~.name,"\""));+ K Q p- w; C$ _8 P: P; ^& O
else
- q/ D. x* J- {' M6 f+ K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ S t5 s7 c3 z0 C
to_str("in docking station: \"",?.~.name,"\""));
3 \' Z& p; N! y5 N' x end;
. s5 V2 t" Z/ z else
2 `/ G. i9 D( M# ~) l$ [ @.Destination := assignLObj[1,row];' [5 |. ~& |- N: W1 z" a6 e
end; : X) F4 Z% [9 F* E; Z) Q/ R0 L
newDirection(@);3 _8 B+ W$ m$ p. T
@.HasOrder := true;8 X# \! s+ k* f6 I( M
end;$ M& X! a# l" j4 N, H1 L
end;
- w5 R! A7 g( K# k$ V) Y( Cend; -- of the method
4 G) j( s8 Z p* t) m1 ]% d |