/* called by: entrance ctrl of the object 'track'8 F! G6 {- N) T. N0 K4 v
*/( O+ ?! k$ r4 [
is6 u/ l( r0 {7 T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 S: e _5 T4 i- Q. sdo: K* r, h' @) r% B6 q9 h
Lan := rootfolder.Internal.Tools.AOLlanguage;
: d2 P! `$ s( P1 q) o4 _3 x; L if current = @.Destination -- else return8 f0 \' J3 x" N- h. D
then
$ p7 a4 p- O' [1 b& A$ W. j. D @.Destination := void;; _" ~) V, V m/ {( e
if @.occupied then
" D5 \4 J) ]) _ _8 [ part := @.cont;( n7 g q6 G' h0 p" i4 ]" L6 n
@.transpOrder := void;
/ }: f" o$ p2 m" p part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 c5 w' y" B, y3 {8 K
@,root.eventcontroller.simTime);
# M7 D* j. V; X" [/ P/ c @.HasOrder := false;! g+ V& A- p) k
@.DrivingHome := true;; d( R2 I0 ^4 P% _5 @$ K7 ?
rgManager.tryToStartTransOrder;
# Y2 d# W/ M4 m# J- e; N if @.Destination = void/ v' l; L* g+ c! J& M
then -- no transport order for vehicle @8 R5 }# U; j2 g- j; W
@.Destination :=4 d: C% R$ d& Z& g
rgManager.nearestFreeStation(@,track.~);
: I8 S+ o4 v1 \/ e newDirection(@); 8 O$ k* I8 C4 [+ P Q
if @.Destination /= void then
( m' c" a+ h3 A" H: g @.Destination.NumReservation :=5 B ]5 n) `) H) r
@.Destination.NumReservation + 1;
/ T1 H6 l' H/ \ end;
( F) W2 }- r1 q& e) j7 T @.CurrIcon := "drivingHome";
( k2 b7 U v5 e6 p8 A6 n @.DrivingHome := true;2 o+ y+ j: Z. U' Q3 s
end;
+ a6 s9 B& R& o, ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; l# S+ l% T3 |2 ^; _. d1 g! b part := @.transpOrder;
5 l3 n! j" m6 ~/ D* f7 n part.move(@);-- load part% q- M; z" @$ j4 a+ V7 x7 A z9 b
@.CurrIcon := "load";
) a7 `) ]" j; y9 ^$ E7 {0 | GlobalDistObj := part.globDestination;0 u$ i( w: Y7 s
assignLObj := rgmanager.rgAssignL;
# l. z3 a" Q* ]1 B* j$ M9 E4 D3 X) W row := assignLObj.getRowNo(GlobalDistObj);
2 l* y# U2 u8 H/ c$ I4 q- p if Row = -1 then -- since 706 h# D' T3 E+ t X* b
if lan=1 then+ D+ K& x/ s! z7 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 x* a# Y( K. A5 V3 i5 i0 _1 P to_str("in der Andockstation: \"",?.~.name,"\""));
9 f% x9 u, t) X0 a# A4 d else
, S" h# `" z- i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% E; M. J4 u8 E: b8 I; x to_str("in docking station: \"",?.~.name,"\"")); / j( L' D, O, @0 [- u% ^' Q
end;
$ d- n# e" U X: E# a. }4 `$ f3 j. N else
1 ^3 D) z0 `) N" v% ]2 D4 {# Z @.Destination := assignLObj[1,row];
! l" x& ~, Z$ R end; ! Y# |0 O! O' Z! o: m. c
newDirection(@);' L8 N. Q% o+ U# M& q+ {
@.HasOrder := true;0 ]4 v( E& `6 k( H
end;
9 k; N/ E% U2 ]( U5 U end;
9 @- c' ?: n7 [2 J4 o7 r- [end; -- of the method
3 ?* y3 |7 ?. R, W, { |