/* called by: entrance ctrl of the object 'track'$ v; v9 ~' M. P' B
*/4 f) L7 [$ x/ I4 F/ S1 x
is0 q" {" b. i r4 m# _
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( |- _9 _ ]5 ?% q: ~1 Z$ q
do1 _* [0 F* P; ~/ x% H
Lan := rootfolder.Internal.Tools.AOLlanguage;, L: I, B- {& ^/ d9 F2 a1 c
if current = @.Destination -- else return
# y1 X$ a1 r9 H. i, b: C# {5 p then; [3 a* u- L8 W1 E$ l
@.Destination := void;8 O0 T. |4 Y/ b, u' B" y
if @.occupied then
6 O6 C/ D% L. P/ `' G3 E# M part := @.cont;
9 ^$ S: k" U1 o' q% C& T6 r8 L @.transpOrder := void;( X3 [; R4 Q; R( x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% y- _9 O& _! a6 ]! s( \1 `5 T+ P5 i
@,root.eventcontroller.simTime);) c! v. |2 ?1 e
@.HasOrder := false;
$ C) X- [# v7 f/ P* m @.DrivingHome := true;
- x# g5 L; _0 \3 o rgManager.tryToStartTransOrder;/ i; _+ }8 W y! l+ r! ?! Y _
if @.Destination = void
, L8 s& e6 ^$ H0 w+ Z1 g then -- no transport order for vehicle @; X* ~" E7 X7 w/ r7 R
@.Destination :=) d( C, X) M/ u- U2 H" b u% J: f( c
rgManager.nearestFreeStation(@,track.~);
+ X, X( {8 G. K! k ^ newDirection(@);
$ } v/ g$ b' ?2 `$ z/ x( C( [ if @.Destination /= void then
: P' D, g f- |8 P8 P @.Destination.NumReservation :=! K8 ^0 @0 F3 z6 z
@.Destination.NumReservation + 1;
4 T7 `6 w# |9 P& m) x; D5 ]! s end;& L8 n l. z! L: h
@.CurrIcon := "drivingHome";
4 g f, ?6 O9 O3 Y @.DrivingHome := true;
3 D. }0 o/ F' w. d end;' ?+ p2 ^, O. g6 s" r( T8 w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' `, {6 G1 l+ q" F, J) k9 E# | part := @.transpOrder;
: l) p) l& D6 |; w$ C: Y. [' Y4 ^* [# G part.move(@);-- load part' _# B. V- m1 o, c$ z6 U
@.CurrIcon := "load";6 r2 I U4 S( A' j/ l. D) G" p. _
GlobalDistObj := part.globDestination;! v6 c/ @" o ^. L9 w3 M: x9 ~" _
assignLObj := rgmanager.rgAssignL;! r- }/ D$ \8 w5 l0 d% k
row := assignLObj.getRowNo(GlobalDistObj);
2 Y" j( K& Z! s7 C# ?8 y if Row = -1 then -- since 70
+ \! P! U* E0 I# {+ f3 P8 G) K if lan=1 then6 y# B) N& s$ I r) n2 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),7 p0 C7 S; L; s8 D3 y
to_str("in der Andockstation: \"",?.~.name,"\""));
$ r! a7 L7 g$ J; _! ` else0 M7 C; [2 i- l$ q K
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ z, Z2 _$ U! y) e* S
to_str("in docking station: \"",?.~.name,"\"")); 4 i) d3 O- H/ l# Y0 U% F9 ]
end;3 }# \, u" U$ P% I) u! I0 @ G
else/ \; k7 s2 K7 M B
@.Destination := assignLObj[1,row];
' d* s6 D: O. ?9 S; R end; ( d" w% K! x" x" m0 @
newDirection(@);; K: ?7 c: T; S. L
@.HasOrder := true;! x. G& a" y1 T5 a3 W) w7 U2 M
end;
5 p3 U- z+ D# z6 z end;
, v. f0 q5 w3 _& v/ W( W7 U7 @end; -- of the method2 K3 n- H* R: e# U1 i; ^
|