/* called by: entrance ctrl of the object 'track'1 S7 z8 t- A& w* x" z1 _
*/* v$ e4 `# C: s0 `) _$ z
is6 P& w V) S; @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, E! r) B% }2 z) Z
do
# [0 O$ a$ V/ e. m: x8 J Lan := rootfolder.Internal.Tools.AOLlanguage;
+ X& I3 t* u+ X o/ v3 A if current = @.Destination -- else return' x$ N7 ?* {* O& A" ?
then
# [1 k: |& v1 \ @.Destination := void;
% |8 x4 Y! |9 S) ^2 N! \! i5 i1 Q if @.occupied then
6 d. a h, W* s- ^ part := @.cont;
5 u4 V5 ]) Y9 `7 E' }$ r c @.transpOrder := void;
! ~, P# | V: w; `4 R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 |9 s D9 g- F& V
@,root.eventcontroller.simTime);4 m, K' A8 E- b4 x
@.HasOrder := false;
. Q8 a' `/ ^8 ~# s4 f& A9 D& x5 z$ _ @.DrivingHome := true;! x. ]$ u0 r$ n/ Q1 `* b/ J. p# l
rgManager.tryToStartTransOrder;/ d' a0 F( k6 D" ~
if @.Destination = void# J, I; }# m2 {+ }4 ?
then -- no transport order for vehicle @
* l% T8 @, f5 K' l$ P @.Destination :=
" r) G) D7 f* Q% M0 m" C rgManager.nearestFreeStation(@,track.~);
, p& Y5 V2 d5 `0 E7 i/ c newDirection(@); ! y# R! _( p1 f Y
if @.Destination /= void then
7 a A5 m9 y' g5 i- _/ M6 f @.Destination.NumReservation :=
$ q0 T5 x( U4 c @.Destination.NumReservation + 1;. D) p# \+ d1 O
end;5 f, ~9 F0 ^, D7 m# @
@.CurrIcon := "drivingHome";8 p6 \4 Q& x$ |6 I& z$ O! a
@.DrivingHome := true;3 V3 \' K6 O( ?9 e% d8 l+ K7 Q/ q
end;2 ?/ S: x* W- j$ J K+ M' F2 }
else -- the vehicle @ is empty, both vehicle and part are in the same dock station! ?5 }3 M; t4 r0 W
part := @.transpOrder;& u$ t( ^4 |* [0 f
part.move(@);-- load part# D6 \7 m) c- b% ^' e
@.CurrIcon := "load";
- J# V( t0 S' a* A GlobalDistObj := part.globDestination;" \4 X" |! Q# `4 D, Q. F
assignLObj := rgmanager.rgAssignL;
, l% D+ W. ^* v row := assignLObj.getRowNo(GlobalDistObj);
8 U! b6 S) R2 z+ [) z6 y: N if Row = -1 then -- since 705 V, B" _7 e) t
if lan=1 then7 K% ]) g) z: L5 D$ \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" F! F2 h# {7 d! d) V" a+ A5 j to_str("in der Andockstation: \"",?.~.name,"\""));
) X" M* j) }. c else
$ b+ e5 k' d* s) d9 q9 O promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 @7 z5 T. F; x, i9 m
to_str("in docking station: \"",?.~.name,"\""));
9 r3 U8 u% j7 a1 t end;
( J3 ~/ r! G7 C% u9 i! \ else
' Q- d9 f- G" c& V9 {/ b @.Destination := assignLObj[1,row];/ C( J& ^- f: u; L7 [0 L: p# D: A8 ^
end;
1 ]7 h" h1 x$ N) q+ X- ?( N& v3 X5 M newDirection(@);
1 j: t/ w8 c& M* V+ f5 P+ h; y @.HasOrder := true;- g3 a# \' ^* G4 S Z
end;/ \: v$ u: I+ I
end;
$ o6 L- n- T T8 w$ x. \end; -- of the method. P7 n0 r! U! ~( c0 }* y
|