/* called by: entrance ctrl of the object 'track'# N" R( ^* U% ?2 S' l3 J* Z
*/
* H8 h p# t3 ~% t# Sis( @- d4 {1 n. A3 Y! x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% B* m: @: I) B1 A
do
0 ]% l! q3 s0 G" ?9 `6 f* {% N Lan := rootfolder.Internal.Tools.AOLlanguage;
* s$ f" g* Y n7 { if current = @.Destination -- else return7 u2 L9 m' C0 M; b- S& Z9 d9 {% Q* [
then G, t+ [9 y& q1 k
@.Destination := void;) g! }; u: V. o* Y# D Y8 ^* p
if @.occupied then5 U _! ~1 y* M& N" U
part := @.cont;
$ A4 C9 e" i% ~! ~' c2 x @.transpOrder := void;" l; h5 D/ b8 m1 A0 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 L' r6 x! d5 U6 D1 ?* R- h
@,root.eventcontroller.simTime);
% l$ N; @" v* j# y4 N @.HasOrder := false;: t) k$ C8 j. T9 {! C: q
@.DrivingHome := true;# A: W. m9 h3 r( \1 K. w
rgManager.tryToStartTransOrder;
# W5 I" s0 p- b; s& H' a if @.Destination = void
- d: @% R# Y: _+ O" ~; z" H: V then -- no transport order for vehicle @* ?' o: }# p7 c" X: A+ s
@.Destination :=/ b& M9 h% J2 ^% I) D5 z' n' I
rgManager.nearestFreeStation(@,track.~);
, T) I6 W$ [+ z2 A( o4 a# X newDirection(@); 9 U* y5 G, N% \( l7 M. Z# D3 E
if @.Destination /= void then
% ?2 A+ ^( [, v8 x5 n: u/ a @.Destination.NumReservation :=- U) X4 A2 Z2 e1 J: T9 y9 ~
@.Destination.NumReservation + 1;
9 I9 S6 F6 J/ S2 ~+ q end;% _8 Q: d. A, b5 }
@.CurrIcon := "drivingHome";* ^& d ]! _5 z% b' X2 N
@.DrivingHome := true;
' M! o- ~" H; ] end;
# [# j+ U* g" }' K7 R/ y6 O: A else -- the vehicle @ is empty, both vehicle and part are in the same dock station# ]6 D& _: j. C9 c
part := @.transpOrder;! ]# u1 |; Z( v. i3 l& Y
part.move(@);-- load part% q1 @* Z7 S" T- q) t. ?& o9 l/ Y
@.CurrIcon := "load";
2 d$ e4 @" ]( G& i" z GlobalDistObj := part.globDestination;: N6 n+ I4 }6 c* }- ^6 E- l1 h
assignLObj := rgmanager.rgAssignL;# h: P9 `& E6 w" ]: L6 M0 |" s
row := assignLObj.getRowNo(GlobalDistObj);, K! E' J% U* }; }6 {& r
if Row = -1 then -- since 70$ q+ b2 Q9 E2 ?
if lan=1 then& `+ v+ ^/ d/ P9 g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 k2 T1 K# N$ E$ x( n to_str("in der Andockstation: \"",?.~.name,"\""));. [3 r, W9 e0 R2 ]$ G" p+ p
else
# ^" M- ]8 B/ a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# q& E3 F9 i: J6 X/ E* ?' |4 K5 Q to_str("in docking station: \"",?.~.name,"\""));
+ _! U4 ]- k8 l* f; i+ t$ N end;7 g5 z7 D& E) B; `5 M! n
else% t) `7 Q) d7 j8 _% Z8 H
@.Destination := assignLObj[1,row];3 `6 W. Q! e. k1 n
end; # ]- ~, P. y5 n+ `8 P8 q( g( D5 ` `
newDirection(@);" \$ ? L6 u. ~3 t1 O- j+ G
@.HasOrder := true;8 l+ c u# b& A2 P7 B# s
end;! N: n! M' [0 G
end;1 e6 G) c4 d O. a, G
end; -- of the method4 ~; z: D( g( j9 B6 J
|