/* called by: entrance ctrl of the object 'track'8 n' W6 J& p4 p0 h. S# ^) X" R
*/; N& p/ K% B0 n" d2 v6 M* ~
is
) }* W: i, ^8 [. j6 l part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 R5 e @9 _. n) T0 q
do
8 @- s' n) K- S0 `# ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
1 N: q2 L3 v5 o4 Q) w if current = @.Destination -- else return, D- b7 h, Z4 B
then" i( L+ c9 k- M
@.Destination := void; H K% ~. X2 R/ ^3 l+ R
if @.occupied then
* ]" ~$ E# [& m `( N# m0 T part := @.cont;
* Q& W- M# S/ m( n# n @.transpOrder := void;6 C- s- q& H) X4 P5 Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, a! @/ C) E' { h! t3 o4 X
@,root.eventcontroller.simTime);: t% _& S2 |9 ^. m: m' \# A2 [$ x
@.HasOrder := false;2 j4 V9 Z6 @& | O0 y( ~% P
@.DrivingHome := true;
% Q4 E- m' H. O0 R rgManager.tryToStartTransOrder;
( \% ]6 a5 q+ S- { if @.Destination = void P( A$ F8 @( V" e, a
then -- no transport order for vehicle @8 t# h: t- U( [5 N6 W8 u
@.Destination :=
/ g% p! ]# i9 r rgManager.nearestFreeStation(@,track.~);! Q: i' L8 X2 W K1 c; D8 g7 t
newDirection(@); # z7 g: R Q/ G7 x9 o( y K+ G. p
if @.Destination /= void then4 r$ W. w3 l( ^" @- d
@.Destination.NumReservation :=
0 j3 v2 X0 N* w2 c( s T( Y% O @.Destination.NumReservation + 1;0 |: R) R8 M0 z- g: S
end;+ [4 D6 z r& |3 j9 e
@.CurrIcon := "drivingHome";2 T. @& I F1 q7 T2 W r
@.DrivingHome := true;
w q, G3 N) q# ~) t end;
9 p* U+ u! N; d( s3 w6 |. o, q else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 f% e" q$ v7 q' k& X
part := @.transpOrder;
6 h( |1 l+ B! p' S part.move(@);-- load part
. O# n7 b; M7 s3 ?9 x3 p @.CurrIcon := "load";
0 A: w( y9 P+ k6 x" M6 J GlobalDistObj := part.globDestination;( I3 J" X3 P; t* h
assignLObj := rgmanager.rgAssignL;
( y$ L1 x8 y# s/ j1 P- i, k row := assignLObj.getRowNo(GlobalDistObj);
@, m$ r/ W* T8 C8 K if Row = -1 then -- since 70
; O4 e& k- M+ Q! k; b6 h; O if lan=1 then
. W0 F+ l+ k3 ]/ g, c9 e promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
X$ t8 n& I: e& e0 m to_str("in der Andockstation: \"",?.~.name,"\""));
" E8 y8 h4 U* o/ w$ X else+ _' o2 V' J7 \. K* @6 \! [3 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 {% R+ z2 C" x% e; ?
to_str("in docking station: \"",?.~.name,"\""));
$ D& r0 ~2 w$ e0 s end;
& n4 c- m: t" X" B8 Q8 F! O else
+ M5 i$ w9 @) d( k, u f4 O6 c @.Destination := assignLObj[1,row];, C9 E. I3 S5 Z4 c5 v
end; 3 L0 p- k' G3 b+ @& A+ i) A* z. c
newDirection(@);
) n3 n" U: c }% q3 G @.HasOrder := true;
/ E W* j: R4 f8 L) r @ V end;
' W/ t b5 m% ~ end;8 V5 ]1 _( M3 [2 j4 K$ P
end; -- of the method
& Q9 R. p- i3 y- h; X |