/* called by: entrance ctrl of the object 'track'
' I |* Z# ]9 W. a8 R*/+ r( {& D4 g* [ Q4 S1 \6 m1 M
is
[7 n( _) P8 S; `2 m part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 d. V* }& @/ C: X2 f5 B: Zdo
- e, z" O3 \5 a% U Lan := rootfolder.Internal.Tools.AOLlanguage;
( F9 x5 r3 h) v6 M0 b3 j" A if current = @.Destination -- else return( ^' |) H+ C' A( b9 {
then |) C3 G0 ~2 i
@.Destination := void;. ~% Q) P" ]! ~. H- p! R
if @.occupied then
/ d/ a) ~( A3 u3 [( d) H& e part := @.cont;$ Y( `1 l8 S, }
@.transpOrder := void;' N' i! R) u+ q4 Z2 C! c" i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ~) \2 P% t1 d0 a8 \
@,root.eventcontroller.simTime);$ X S, ?1 t# K' i
@.HasOrder := false;
/ T7 q# ]: }9 `! s @.DrivingHome := true;- G, z4 X, i. b# Z# ~% N# p- t' Q
rgManager.tryToStartTransOrder;" |) [! ^% E2 I: i& F+ f ^1 [
if @.Destination = void
9 l0 C7 T# l8 ?0 @1 g( E2 K6 K then -- no transport order for vehicle @
4 t. O0 c% w& D, c J @.Destination :=% @: z" a$ ^1 g; W
rgManager.nearestFreeStation(@,track.~);9 b+ F8 b# I c; t8 z+ _
newDirection(@); - Z- f. M. N6 _
if @.Destination /= void then8 h+ Y2 d! H! O) f
@.Destination.NumReservation :=* P' t, G& o) h* P/ @ m
@.Destination.NumReservation + 1;3 w1 y2 D( w( O# r% v
end;
2 ^3 s: q; u2 m5 a+ p7 R4 x* _# O @.CurrIcon := "drivingHome";
, _) N' \1 ~6 j1 @" N* e1 n: ? @.DrivingHome := true;4 ]: {: a* ~* }, r% c9 ~; \
end;$ i3 ?$ Y# s; U* j
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* T4 E. c. }8 e1 Q5 Z1 V
part := @.transpOrder;) i/ Z) l! R# r" B# D( x
part.move(@);-- load part, I! {; w4 O' p
@.CurrIcon := "load";1 X h6 G1 w/ i8 }
GlobalDistObj := part.globDestination;# m( Q! a T$ {$ s
assignLObj := rgmanager.rgAssignL;
% v9 i6 W: ]# e1 Q: q2 d( [ row := assignLObj.getRowNo(GlobalDistObj);+ ?% t& ?2 ^6 @: y! P) a. ~+ g
if Row = -1 then -- since 70
( A! W! W5 f$ _, Y9 a5 B if lan=1 then
1 A' [4 x& J% `4 i: o' |% s- d, h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 q* [' [* j) {( ~# s; F+ [1 A8 S to_str("in der Andockstation: \"",?.~.name,"\""));/ C+ ~ ?" |$ V& s/ R( [ u
else
! Z7 Y- t; R. h: p I: p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! x9 H y# j% \4 \4 J- s, M
to_str("in docking station: \"",?.~.name,"\""));
' d. c6 l4 c% T1 \% Q3 M end;, L# k: D- d% k% o+ c
else$ b c- _/ y L
@.Destination := assignLObj[1,row];4 F. Y* y7 E+ ?$ s! y
end;
7 ], ^: Z% K2 j. t8 ]+ C newDirection(@);
+ a. \9 m* q4 N7 J8 J6 R8 G6 p+ ] @.HasOrder := true;! w5 S& o0 g- Q, m* N
end;
) y! T' V9 F4 y# c: ^/ d7 X& J5 c end;: F4 k( e) f1 J6 R$ h; d
end; -- of the method0 N) m, T& g! Q7 V
|