/* called by: entrance ctrl of the object 'track'* _+ h+ h5 u8 N- y( T, E1 Q! e, ]- ~
*/
8 b* E0 l. I" @1 E+ Mis' _6 Y2 U* ?3 e- Y+ X- L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ m- G$ |5 T, ado9 E0 x: x* f4 r; W6 n
Lan := rootfolder.Internal.Tools.AOLlanguage;
: Z y1 W( _) Q# V if current = @.Destination -- else return+ L' p* [8 [: X9 Y/ d
then( @+ D# G! y0 x4 R
@.Destination := void;& U6 c a4 I$ b: A, G
if @.occupied then0 X3 X2 D( c; V l$ w4 O6 S5 t
part := @.cont;- |7 Z9 w7 U1 h0 T
@.transpOrder := void;7 v+ U, x3 l1 q' ?2 S( c) C: O
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) ^# H/ C5 ~" y3 e" [" a6 L
@,root.eventcontroller.simTime);% l) o, W' a; w' @
@.HasOrder := false;7 Q- K) I4 ]1 e) G; _% R3 `
@.DrivingHome := true;0 H+ \ T& H7 f- O* Y
rgManager.tryToStartTransOrder;- C; N, e. @& U9 J1 R, n- y
if @.Destination = void
+ y$ t+ ?/ z" L2 P2 _3 C then -- no transport order for vehicle @
; e5 h" |6 D* C U @.Destination :=% e; x. A5 n, W$ z4 S; ^
rgManager.nearestFreeStation(@,track.~);
! l6 Q' f/ z5 C3 y: s newDirection(@); ! Y& p. N, ^7 u
if @.Destination /= void then7 |% c- x1 b' I" g
@.Destination.NumReservation :=
3 R4 X j# |. o( v5 Y0 J& L5 t @.Destination.NumReservation + 1;
z3 {0 n6 e' x$ p end;
6 X& U( j" _4 t9 N @.CurrIcon := "drivingHome";
2 ^7 X: S: m) O+ P3 `- X7 W @.DrivingHome := true;/ U! L7 v8 @5 C0 V& }/ |! F) z1 D e
end;
/ C5 D# g: Y \9 V+ D else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 I( I0 r. P5 c3 h; g8 l- P
part := @.transpOrder;
( D+ `0 b# {9 r part.move(@);-- load part
0 z4 L9 R9 Q$ f) u @.CurrIcon := "load";
2 Q3 D) v2 w3 S5 w4 U9 t$ @& n1 v4 P GlobalDistObj := part.globDestination;
5 O+ \6 w; @$ g9 p. ^ assignLObj := rgmanager.rgAssignL;; W. Q& i" v8 T- v
row := assignLObj.getRowNo(GlobalDistObj);
2 @ }/ z9 k& B' G+ s3 ~3 n if Row = -1 then -- since 70
- J# {8 @6 C8 P9 d if lan=1 then
8 E5 S2 @% N, g# a j1 f: w promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ S0 g- f8 Y4 h8 o8 F- b to_str("in der Andockstation: \"",?.~.name,"\""));, [ l% E1 P- g! V
else1 W C: }% B- q A- V+ x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
! R- t$ ?& V! R% i/ \& j to_str("in docking station: \"",?.~.name,"\""));
' u- b0 Q& F, q: ^9 B: v8 T end;+ {. o1 ]- P9 T& d, @
else! c1 P& R: q; v! I6 P# s- K
@.Destination := assignLObj[1,row];/ g4 b! V( I* Z C, ?
end; : g" Z6 |1 H& X `! }
newDirection(@);
. X! S- g6 y& w7 U @.HasOrder := true;
* T2 H) Z, q' M6 b0 A end;8 e. u2 g. i/ r
end;0 P/ E* ?8 p$ @6 [5 B8 p# n) M/ b
end; -- of the method
% f3 `; u" v. Q4 C- H4 H# y6 ] |