/* called by: entrance ctrl of the object 'track'
! l0 }9 ~) c2 o+ D: R$ |*/
- _! u8 e; k& t2 Ois5 v) h0 {9 f2 B" D
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) |5 p9 J8 v9 e1 H
do
, p- i: r3 H6 T/ k+ c Lan := rootfolder.Internal.Tools.AOLlanguage;
4 f4 `$ @8 V% S) ^0 }, {+ s if current = @.Destination -- else return6 ?1 G6 O" r: O
then i7 P3 H3 e$ O: s2 j: |
@.Destination := void;' V+ Q! d0 n$ r+ p2 F
if @.occupied then/ z* b# r$ K3 \4 Z: V
part := @.cont;
2 t3 d! G& V. X) m, { @.transpOrder := void;
) ^% N/ c- P$ K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, j7 n# N& Z* s. p1 Q @,root.eventcontroller.simTime);
5 v% K/ S1 N2 _$ Y( |7 c* } @.HasOrder := false;7 I$ J' S. ?3 T6 K7 `
@.DrivingHome := true;
1 h% A. ?1 _" N1 ?& I rgManager.tryToStartTransOrder;
* c5 w0 |7 u5 E, } if @.Destination = void2 p) t/ h1 O+ b4 v4 Q
then -- no transport order for vehicle @* ]: S0 `0 A) W( j1 C
@.Destination :=
5 Q" p- u" g }' o8 d/ S: e rgManager.nearestFreeStation(@,track.~);
( n! h6 l9 Q" ]& u newDirection(@); % j! w1 |: s+ v9 i( ~, E7 K
if @.Destination /= void then
/ O+ n' X: C2 ~# K& ~" h* z. z' o( n @.Destination.NumReservation :=. ^" h U6 N( e8 u" o; x
@.Destination.NumReservation + 1;
% d0 S( e, \1 e) N( x3 z7 f; s a end;. o" H9 A8 Z/ g L/ e( l- P
@.CurrIcon := "drivingHome";
7 ~8 F4 P% b& r7 J0 ?9 n0 x/ g @.DrivingHome := true;
6 c, J6 [1 C# V+ \6 D end;% Q) B: V. O6 Z' s5 I3 B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 D1 F# A* b9 O3 h" T" c
part := @.transpOrder;* r; H- D& z/ p2 ~4 M
part.move(@);-- load part
: L2 L- W5 V" v* s5 a @.CurrIcon := "load";
" T B' G) ]- y0 @) F [# b GlobalDistObj := part.globDestination;
" U8 g5 B8 _* e assignLObj := rgmanager.rgAssignL;
# [2 F2 v" ]. l0 G+ N row := assignLObj.getRowNo(GlobalDistObj);7 Y9 g& w1 X1 O8 p8 Z: R! C) C" C# r! b2 d
if Row = -1 then -- since 70) h5 V( f( S) x2 B7 k) @, j( ~# H
if lan=1 then
2 `- K9 y9 K$ _. g, T6 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
N7 f- ?4 t/ V9 ` to_str("in der Andockstation: \"",?.~.name,"\""));
7 A4 G \( i& v# A else7 W" _. g8 {% }3 _; I$ n5 y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, G; o) Q: [: k+ d7 x3 { to_str("in docking station: \"",?.~.name,"\"")); " ?/ w( v4 f* W+ n/ b/ @! P+ a8 E
end;9 P' ]7 I2 A4 R& n
else
+ D7 _3 {, ?# S) e& u+ Z p+ m @.Destination := assignLObj[1,row]; `" b& L* e$ @. j3 Y% q$ K
end;
; g: X6 a {! @3 u) Z newDirection(@);
x" A% n3 H9 X- ^6 n c/ f! j0 @ @.HasOrder := true;
, N7 P4 n* P8 E; r; Z9 D end;0 c2 i; \! ~. t
end;, M$ S/ l2 x( ?. Y. U
end; -- of the method' M$ R( f- m1 U: ~
|