/* called by: entrance ctrl of the object 'track'
4 N" w( ^; }8 y* s7 h5 N8 f6 b4 `9 g*/' f1 z% P& B/ D; y4 n. F
is
7 y9 d& |& j! T part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 X) D( s+ s% H8 Q) Z6 w4 L% udo% x1 H, X2 F4 T0 V
Lan := rootfolder.Internal.Tools.AOLlanguage;, Q8 r' w* }$ q: N1 h2 l; b* |
if current = @.Destination -- else return! A, A2 J( r/ f( o, {
then
! ~' f/ i6 @! t7 M! I& R! m5 s @.Destination := void;
% g9 F. O6 ]2 q0 j. ^ if @.occupied then
- g% F! I5 a* Z% D part := @.cont;
a' F+ \4 q) j2 X+ [8 I0 \9 D9 J3 Y4 J @.transpOrder := void;
# n; Q' ?- \+ s8 y: w4 g: _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( m' @, x/ }- d) M4 F: P @,root.eventcontroller.simTime);
X/ T- e3 _$ Q* D6 v6 G @.HasOrder := false;7 A* s2 y# o) |! `! V
@.DrivingHome := true;
! L8 \0 Q* Z" g3 ^4 w rgManager.tryToStartTransOrder;8 c* _0 L' ?1 `/ V- I9 n! K* v
if @.Destination = void6 m( z* w2 G' {+ n( W2 R }* v
then -- no transport order for vehicle @" b# e& v7 j; m- j6 w0 p N6 d
@.Destination :=. V+ y5 s# z8 r2 A) I& h5 ^# E
rgManager.nearestFreeStation(@,track.~);
0 y# j8 `+ Q$ f2 S" s newDirection(@);
6 e4 j5 }$ [# y2 [+ A: h% H if @.Destination /= void then
# f7 \8 g5 P z# j7 h3 ^4 ` @.Destination.NumReservation :=# m9 _" Q7 y! Q% s% i% U/ ^
@.Destination.NumReservation + 1;
! f' @/ _+ W7 L end;
0 _& ]' g& M/ C& G$ T' Y @.CurrIcon := "drivingHome";
2 W* H- W0 u* B* e! K @.DrivingHome := true;
# T+ t' M) ]6 l$ [ end;
& J7 \1 d+ n2 h% o/ X1 ?. F$ [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 s) l' K* R" ^6 ^. V& a- ? part := @.transpOrder;, l9 ]+ m8 \5 P: r8 j6 u
part.move(@);-- load part
) ~& N& N+ Y) K$ r. |1 x" w9 G ] @.CurrIcon := "load";6 D0 K$ k4 l A' `: f
GlobalDistObj := part.globDestination;
! O: P$ M3 ?0 b assignLObj := rgmanager.rgAssignL;
4 D% X! O5 T: s6 u7 [0 e row := assignLObj.getRowNo(GlobalDistObj);7 o- ^0 G9 a* C7 I
if Row = -1 then -- since 70
0 b+ O7 H% n2 y# a% t if lan=1 then1 L7 K: {/ X4 b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 ]4 D8 T# z2 h) y, P1 `. e: N) V to_str("in der Andockstation: \"",?.~.name,"\""));
# ^6 f& c2 l2 e else
/ n# p$ G3 X( c3 M* ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; f/ S3 Q8 q5 R4 ]* l( B; A0 r; F. c
to_str("in docking station: \"",?.~.name,"\""));
0 o2 _. W, d# J9 O$ u8 q end;, m1 r. w) f! j: a7 S
else( F3 ~* d/ Y! P/ b( x2 n
@.Destination := assignLObj[1,row];
$ L( B, [3 F# W+ u+ F7 ~: L2 L end;
! }! h t# E8 q( d: i newDirection(@);0 J, i% o4 u+ [, s7 ]( _
@.HasOrder := true;
" }8 i- H. A( n1 Q5 U$ q2 _ end;! c& _ R" ~- B% `. T! K
end;
8 y; a0 B+ l$ g5 Q6 dend; -- of the method8 T4 R$ n* b# q% C
|