/* called by: entrance ctrl of the object 'track'3 C9 r* x0 e& y8 b
*/( B1 z/ ]1 z. A" l/ V( M8 p; ]
is
, F; e! ]. b6 A4 Y. e& o' Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% X E3 w# c; {- Udo
) [8 `# O# W0 D* Y Lan := rootfolder.Internal.Tools.AOLlanguage;! ^" \# l+ [% H: @* U
if current = @.Destination -- else return4 B' |' V1 ^0 j9 F3 V# Y* i
then2 |8 B/ ]0 x. e4 B' N H" z
@.Destination := void;+ r3 m( e( y4 H& B8 Z( F6 z
if @.occupied then
5 Z; f v* A M" m: P part := @.cont;" r; [: g5 `8 a
@.transpOrder := void;$ {; p; d9 F" f# V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! l; O; Q# j7 l2 T+ I1 d @,root.eventcontroller.simTime);7 B3 a0 _3 ^# N
@.HasOrder := false;# R* U- o5 N F. \. |& Q1 h
@.DrivingHome := true;: |& n4 n( o3 C1 ~) ~
rgManager.tryToStartTransOrder;' y8 r! B. y6 q$ [
if @.Destination = void
; g$ U/ M4 }. b- n( Q( K6 ^ then -- no transport order for vehicle @+ t: S, B% o5 d/ E& W4 ^9 a/ I
@.Destination :=
: m& }* l2 S. x% w3 b rgManager.nearestFreeStation(@,track.~);5 B# d; _! x+ ^# n, a# p0 L
newDirection(@);
6 k3 }1 O0 Z% a/ |" e if @.Destination /= void then% x& r1 Z/ @/ ~
@.Destination.NumReservation :=
/ i: k& l& [, I: ~: v6 i @.Destination.NumReservation + 1;5 w v9 k( i4 ?& w
end;
9 s: I+ h# h1 J- [8 p5 U7 u @.CurrIcon := "drivingHome";
4 W# C5 L% [ Q/ |; x) K% m @.DrivingHome := true;# V! L4 V2 C5 @, w
end;
2 n3 t& p9 Y) y& C: r else -- the vehicle @ is empty, both vehicle and part are in the same dock station& j& Z4 A5 D$ ~" _6 E
part := @.transpOrder;
6 q' h9 O8 C. w* v9 E part.move(@);-- load part$ I3 P9 i. J5 h$ H$ ]
@.CurrIcon := "load";
4 }8 S5 f6 p1 K* d* I GlobalDistObj := part.globDestination;
& k, E; m' b2 L$ Z% O" d6 Y assignLObj := rgmanager.rgAssignL;
1 I9 P( c2 y$ J6 X1 e, k row := assignLObj.getRowNo(GlobalDistObj);
, R4 A# h f, W if Row = -1 then -- since 70
% c" p5 ?6 A3 t: g, v! s, j. D if lan=1 then
$ E3 V9 r% F, Y9 o& B6 Z$ d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. q. O0 n5 ~ I. V0 K
to_str("in der Andockstation: \"",?.~.name,"\""));# p6 s4 V# i6 ^9 g
else( H! ^' Q0 l) V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ I. s9 D* \$ S9 H- n5 R
to_str("in docking station: \"",?.~.name,"\"")); 2 T1 t9 S. k1 M. V% j
end;
$ B% r; N" h8 ^& ]9 u/ s else5 z% `! ]7 P/ I/ h0 @" b) F
@.Destination := assignLObj[1,row];
% S5 G: I' t7 C end; & ?# e: O1 d1 Z2 J
newDirection(@);
9 w$ N; X0 H. ^$ r @.HasOrder := true; I7 x5 L- N9 Z% ]2 ^
end;
& Z) _' }+ i2 b* o* d end;( |% R. i9 D! |& t( g* v6 o
end; -- of the method# e; b7 v6 v5 {1 R
|