/* called by: entrance ctrl of the object 'track'
8 a7 p5 G: Y' a6 P( @: \& |*/
! j4 E: [$ r; x6 _) [4 \is! ?2 @# q/ j* E/ E* X9 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 g, K4 X- J! ~4 ]- L9 I- T0 }
do
; N$ T5 y# r* D5 R Lan := rootfolder.Internal.Tools.AOLlanguage;
/ @( A% y* n2 E" q if current = @.Destination -- else return
- Q% F8 r8 A$ k. K( A then
6 j; C2 d4 O' ^ @.Destination := void;% e& _: |) g: C4 R
if @.occupied then# i# l* Y2 b% s. R0 w8 X
part := @.cont;7 k" {+ b5 T/ Z7 D
@.transpOrder := void;
3 s8 p' r( z" H! m# o, w! D6 g5 B) I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 P: ]$ b2 H: c) F) @/ a @,root.eventcontroller.simTime);
# N/ [* b0 |& H) x% W* ?- q @.HasOrder := false;0 O; [1 }6 t, x( o6 s8 S0 L+ z- b
@.DrivingHome := true;4 E+ [1 a, f# Z9 p
rgManager.tryToStartTransOrder;! Q' M$ S+ I6 c4 H, g5 _
if @.Destination = void) G7 k, B1 `: A! E1 P9 \( F
then -- no transport order for vehicle @
- |4 b4 h) m t @.Destination :=/ B- D0 Z3 q& H; @- I' X
rgManager.nearestFreeStation(@,track.~);1 A1 y5 k1 K5 |8 K9 o" t
newDirection(@); : c1 z' w" d6 e" k: f( W
if @.Destination /= void then7 c8 u8 o+ j( \; r9 s( S% r
@.Destination.NumReservation :=
% u+ ^, Z; o6 U' j$ C @.Destination.NumReservation + 1;, V7 b' i/ ~& H. W3 D4 @
end;
/ b. n, v4 U. V6 ^ @.CurrIcon := "drivingHome";: u5 N: `; ~. |6 a, a2 O6 p
@.DrivingHome := true;
) G u2 k* t& u+ W end;+ x( j/ h0 X' C. {9 a; B6 |/ k
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 W: `0 @1 v, T* W. H# {' V part := @.transpOrder;
3 Q6 Y- E1 n. H3 D, @" `8 J: S part.move(@);-- load part) w; q, c0 o& g# j2 f
@.CurrIcon := "load";$ k) X N$ b# x% u) R& [8 J2 N; k
GlobalDistObj := part.globDestination;. w4 ~% Q) K2 L, M% c( g }
assignLObj := rgmanager.rgAssignL;) U: ^# G+ z; ]* L* r
row := assignLObj.getRowNo(GlobalDistObj);! A L$ `; p6 @ d e/ k$ h
if Row = -1 then -- since 709 {5 e) f8 ~2 n0 P5 [3 j* Y* \
if lan=1 then
8 d! H3 V4 i H1 q7 ~- X9 Y0 z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 c9 [. ?! V0 z to_str("in der Andockstation: \"",?.~.name,"\""));
1 j5 {+ D2 X! }7 u else
2 ?7 K3 K) h0 M& c- M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: T% _1 `. z( I) N3 n to_str("in docking station: \"",?.~.name,"\""));
. z7 M# Q' D8 M$ n1 ^/ l; V4 \ end;0 x9 S; o/ V O% w' s W
else, ^5 t3 i, H% @% A1 ~: H
@.Destination := assignLObj[1,row];
! ?2 [9 W- e' r) D. D9 T end;
]# u$ |- h! D) y3 w1 b newDirection(@);
3 M- K3 V( ]" ~, _% ] @.HasOrder := true;
% n' ?" A; M8 |. g$ g. Y end;3 X- i$ x [, j* K+ s
end;
" i' a1 b) k% P; Nend; -- of the method @7 _8 { \/ g: \8 C* a
|