/* called by: entrance ctrl of the object 'track'9 ?: T6 i# q4 C; q
*/
2 l& e! ~4 b0 z3 Lis
% C% x- ?/ j4 I& s part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ ?) _. L# J L3 r& z+ h3 D
do
, t {' H+ C$ u) W/ r4 d. O2 Y Lan := rootfolder.Internal.Tools.AOLlanguage;$ f$ ~8 M8 R# J- g* F/ [
if current = @.Destination -- else return( q% {, e# q+ @
then
9 y. h7 R8 m, j* N @.Destination := void;
1 M! _" g2 G8 H if @.occupied then
; r1 j h+ q2 R9 n part := @.cont;
; D1 J# E; R4 A0 H$ Y0 } @.transpOrder := void;
' B8 ^, L9 l# i# C0 h Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, j( s) i) ^! T3 C! I G; e
@,root.eventcontroller.simTime);
7 L: B, s: o& b$ Z @.HasOrder := false;# S4 ]/ } N0 n5 I( m. m0 \( X# t/ u
@.DrivingHome := true;
% |9 r0 Y& c4 F; W" N& S rgManager.tryToStartTransOrder;; w3 y4 X# q- j8 @' S- F' X8 I
if @.Destination = void
) ]7 O; B0 v0 P" ^4 _ then -- no transport order for vehicle @
1 l. D0 u1 _$ L: y1 E& J @.Destination :=
% Q3 W5 x* l: r$ M rgManager.nearestFreeStation(@,track.~);
8 ^ u# N( z( Y8 W newDirection(@);
# v7 X1 X6 q4 V1 t2 y if @.Destination /= void then
1 N: q8 K: s3 v. \6 F d) R @.Destination.NumReservation :=
) U7 H+ K6 k+ V- F2 {! T @.Destination.NumReservation + 1;9 {- e, q! t9 {& S6 G
end;6 @. e8 {1 g( T8 A
@.CurrIcon := "drivingHome";
! _! L* u: r+ Z1 a4 H: v @.DrivingHome := true; n' q7 [$ e; X4 o! v
end;, \8 d3 n; i* V1 S; B8 l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& h& R$ h: b9 z: k4 ` o part := @.transpOrder;- x G/ v( ^6 v2 l
part.move(@);-- load part3 C6 A; i+ Y0 ?
@.CurrIcon := "load";
- m2 i( s+ P/ \ Y& w/ T GlobalDistObj := part.globDestination;
$ w4 k& o4 T; e7 O; t% r2 T assignLObj := rgmanager.rgAssignL;
+ F3 L. P7 K: T+ x" v row := assignLObj.getRowNo(GlobalDistObj);
; E/ q$ n8 a& N% y% Z if Row = -1 then -- since 70+ X) K# b# n& D6 V
if lan=1 then) B- ~: ?4 }. X. d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 h" s: Z/ z6 M$ t to_str("in der Andockstation: \"",?.~.name,"\""));
& l9 y) p& x7 R" i& T2 i else
1 R+ B) }* S2 O" Z& Q2 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( r e' ?! z7 X) c) f2 ~
to_str("in docking station: \"",?.~.name,"\"")); ' b1 C1 y6 w8 C1 T
end;( K! O2 s' F* f" s; y% g2 J
else- D( u! i* N k/ W
@.Destination := assignLObj[1,row];5 X) ?+ M7 ?1 A. `
end; ; A1 y& D5 H# @6 ?: `- y
newDirection(@);. w C0 n5 C8 U. Q
@.HasOrder := true;- {4 {+ H4 ?/ z$ J
end;
8 u. @$ e7 M( B2 ~$ w2 ?+ ^ end;% U" q0 h1 n6 K2 F$ \+ _7 X2 ]
end; -- of the method3 _$ [, o T0 ]
|