/* called by: entrance ctrl of the object 'track'0 y- l( s: R1 A" h1 |+ W
*/
. h& q1 ^1 q9 O7 x% D, Qis1 P0 u7 c9 v3 @3 L+ g1 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 q5 j0 J Y+ b+ I( _! udo- j' F& O9 E# _6 j V
Lan := rootfolder.Internal.Tools.AOLlanguage;( X1 r: @1 J. s( c4 K
if current = @.Destination -- else return
- u1 t' M- z% Z+ j: a then
w6 [7 t$ d1 \' q- b5 k @.Destination := void;, t& ]$ J0 @& p
if @.occupied then
& A1 z' o/ U5 U part := @.cont;
2 W7 p2 d" _ A# \: @: L @.transpOrder := void;
- o" m6 v! _* x" B' y) N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 `. h4 ?; y. G, y. o4 D
@,root.eventcontroller.simTime);
2 Q1 ~" S; F: f" s @.HasOrder := false;
0 Q% B* N& c3 _, ] @.DrivingHome := true;" c$ S7 F+ v4 U# }1 i; g
rgManager.tryToStartTransOrder;* ?! F |4 h) l* U# |* m
if @.Destination = void/ r0 X) s* H# E P0 U* J
then -- no transport order for vehicle @* Q2 d6 w, _# _$ B8 ~% g# r
@.Destination :=
; o+ A6 h# f% V1 Q; U: @" x6 M. z rgManager.nearestFreeStation(@,track.~);
5 a) n0 O5 ~: X: S' x7 x newDirection(@);
) T+ P2 [7 c0 G$ ~ if @.Destination /= void then- {+ [! y) f9 X
@.Destination.NumReservation :=
9 n8 |; ]1 z- I' i1 ^* C; o% w3 } @.Destination.NumReservation + 1;
" k6 o1 X; W9 k5 R6 u/ S1 F end;
N6 i4 m' m# \+ U9 ^* r" C1 z( l1 g @.CurrIcon := "drivingHome";4 o T8 ~& I+ B+ v, g; l. w9 f! X
@.DrivingHome := true;( r6 L v3 z. Y1 n
end; V0 o$ H6 f. f, Q1 }# h$ @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 x* v. W. N# C9 R5 ?* H; w8 E part := @.transpOrder;" L0 p1 @8 Z" }1 a
part.move(@);-- load part
6 N) R4 g& b2 J: Q0 x; ~/ f @.CurrIcon := "load";; l! @7 Y. n) \7 P: s; n
GlobalDistObj := part.globDestination;2 P( j- A4 J( x5 e2 B3 Y
assignLObj := rgmanager.rgAssignL;4 J# O- U1 b4 @4 j
row := assignLObj.getRowNo(GlobalDistObj);" L& j8 p- X5 u& q
if Row = -1 then -- since 70
# N. ?- Y9 G" B( @/ i- W if lan=1 then
4 b2 f" r, o7 i; l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( \7 a) E/ ^5 r' m to_str("in der Andockstation: \"",?.~.name,"\""));: w [9 D/ ~8 R
else
4 @4 ]+ s7 Z4 u8 }. n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 n. C8 L/ e. M- w4 q
to_str("in docking station: \"",?.~.name,"\"")); N& \2 O/ C. e+ |
end;
9 j( y9 {0 j* I0 I0 B/ Q! N else% u' Y) R0 Q& Z7 B" [
@.Destination := assignLObj[1,row];+ U. w6 V. o+ P5 c9 ?0 z4 y
end; & g1 p: m R4 F5 f/ f$ c$ c
newDirection(@);$ M; f2 f% {0 e/ [! \8 v6 C
@.HasOrder := true;
G! [8 ~5 f2 { end;
% `) x1 w0 ^" M' N# }. H end;/ {! Z. _' ~; `* t
end; -- of the method
7 A0 o; h' v! m |