/* called by: entrance ctrl of the object 'track'' N8 n4 V2 s; W1 y/ q, a$ H
*// n" _ N* x1 B3 h8 Z8 F
is
# ^9 D$ R0 L: e, J5 V8 z+ h2 e8 ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 l9 _7 ]( U: tdo
$ ^( d) S4 r, W5 J& y- n" X% B5 N- { Lan := rootfolder.Internal.Tools.AOLlanguage;8 H* F, { G6 q- z0 K
if current = @.Destination -- else return
5 P* [6 b; b! S. y then3 d, J7 z8 L& l' A! M# ~
@.Destination := void;( b, ^0 M2 N; R. U% _ W2 w4 X
if @.occupied then
4 G" O/ J4 z, T+ C* C6 x. k$ k" I, P part := @.cont;( G4 T9 o6 k1 }7 S7 a0 j+ O( z
@.transpOrder := void;4 ?/ Q! ]* q1 G% G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, f# Y9 g! Q0 M
@,root.eventcontroller.simTime);
" r3 B: S1 s. z% u- ] @.HasOrder := false;9 l% _ L' D3 _! d; H: {
@.DrivingHome := true;* o3 r: b$ S+ }' R2 A; j. g
rgManager.tryToStartTransOrder;
' [ }5 J4 D! t if @.Destination = void5 t+ W- p( O* _, m, C
then -- no transport order for vehicle @: M% E! u& P. C! M1 t0 o1 \: Z
@.Destination :=# u. h% x, T3 D( c8 A& ]" v9 Q
rgManager.nearestFreeStation(@,track.~);
1 k+ d& R0 b' q/ X2 z, s _9 \ newDirection(@); + s$ W ~6 |4 H# M$ x
if @.Destination /= void then0 Z9 e/ }" P9 v( W! P
@.Destination.NumReservation :=
9 `) m* P$ V7 f& S: @2 t) G4 I @.Destination.NumReservation + 1;
' m, @ |1 l( }, J' I end;6 R7 j. z( V$ u/ e, _0 }
@.CurrIcon := "drivingHome";
- r6 |* ?+ h& z3 _- B# p# ^ @.DrivingHome := true;* p6 [ z- F2 n" }, q; W
end;
" z& ~: a9 C% N* [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ p _+ |9 n% U0 |9 b part := @.transpOrder;, M6 q7 s5 `# f! v% ^9 t1 ~! g# c
part.move(@);-- load part
) N$ J n0 ^# N9 K& d. s @.CurrIcon := "load";! _: V& X9 n' M$ N/ q
GlobalDistObj := part.globDestination;
+ G' H8 p l& Z9 V assignLObj := rgmanager.rgAssignL;
( h# ~ [( b" m- [& |1 H/ K row := assignLObj.getRowNo(GlobalDistObj);
0 {' `( X& b- N, f) r. ` if Row = -1 then -- since 70! V( C3 z1 m C5 A
if lan=1 then9 v3 L6 M) \& K; H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" p: K# [. b8 |3 H0 Q' j9 A to_str("in der Andockstation: \"",?.~.name,"\""));
3 V4 I6 s4 L+ T" r else
9 h# s/ z9 }3 b! R7 e' ~. j. Q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ O; w& J6 X3 `7 i8 M) s to_str("in docking station: \"",?.~.name,"\"")); 9 k. V. I' B! n0 V: i) Y
end;1 r1 G4 V v2 s1 O o1 e) c1 b# ?
else Q* C( ]# Y" j% \- |( p
@.Destination := assignLObj[1,row];# V {$ A9 ?" m; o0 M2 k
end;
% u% i2 q( p6 k+ S! m newDirection(@);
0 x" R9 h7 N# L s @.HasOrder := true;0 V* t( o& z5 L, S
end;8 q) j8 i& w) V, i c
end;# y; J1 h( V. J, L+ T
end; -- of the method
2 v+ t5 G2 ^: I4 J2 R |