/* called by: entrance ctrl of the object 'track'" I v4 ^& d @% D
*/
( Z$ a4 I5 M, z* ]is
5 i5 A J: V0 y1 u. e( @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' n& U( \8 [* j9 e/ k) q, D2 odo7 {. o z7 [; w
Lan := rootfolder.Internal.Tools.AOLlanguage;
+ i- Z# z3 S, ^7 l if current = @.Destination -- else return
" U% c8 ^$ a! G7 B4 B2 i then. D2 C* Q: A0 \1 t' D1 r
@.Destination := void;% W% S# z w; ^9 x! ]' E5 \
if @.occupied then0 n, I" T8 D# o- d
part := @.cont;
. | k' j) W6 S) X9 v G ]- z @.transpOrder := void;! Q: p( V9 s- Z! g, I9 M. d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% _; T; i6 I6 G @,root.eventcontroller.simTime);5 J/ H& x/ Q! x- V+ b7 u+ U0 W7 U' Q
@.HasOrder := false;6 G, \, n+ ?6 S) g
@.DrivingHome := true;
/ {, F, o3 u+ {7 z0 L1 D/ `2 B rgManager.tryToStartTransOrder;: u( ?$ u3 Y: G. q9 _
if @.Destination = void. q2 W% D. m& t) d/ t
then -- no transport order for vehicle @7 U" ?7 k( E- x5 X" A+ Y
@.Destination :=, O) w& f- H6 z. S8 z
rgManager.nearestFreeStation(@,track.~);% I" X6 O1 e% B( Z) c$ W$ g
newDirection(@);
" Q6 w3 ]3 T% {5 T if @.Destination /= void then
6 c" Y; o+ T& \3 x' v @.Destination.NumReservation :=
1 k, K2 t: i- B% _ @.Destination.NumReservation + 1;3 K# e/ m; ^1 c/ v
end;9 k+ A5 M ]% W4 j# s
@.CurrIcon := "drivingHome"; g% h4 y; W0 j) q8 d( Y
@.DrivingHome := true;
q4 W8 f6 N$ B* x! R8 p, p( }. C end;5 z9 F& c5 M% U: T; Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& B" ?2 k7 T; ~$ J part := @.transpOrder;
# Y. f" u$ ?) v/ F& \ part.move(@);-- load part
1 w3 X# }+ r3 Z \/ r" g) K) C @.CurrIcon := "load";$ Q$ n1 O; d$ F* V+ `9 h( D
GlobalDistObj := part.globDestination;
0 x; a! |. }8 g. L+ V) n4 X assignLObj := rgmanager.rgAssignL;! u+ c3 ~' r0 g+ ]+ }
row := assignLObj.getRowNo(GlobalDistObj);1 ^9 a# Z/ T- g" O# U! i
if Row = -1 then -- since 709 ?9 V2 G$ d& i5 W( o4 U
if lan=1 then* t: K3 X9 U5 d0 y1 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
`0 z# M) n- s# m2 o4 R+ p to_str("in der Andockstation: \"",?.~.name,"\""));
0 y% C0 C" B H9 Z9 ^ else6 @6 v) ?- b3 s, F& @( ~7 z; l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 ~: B s& G$ O/ Z2 v6 B
to_str("in docking station: \"",?.~.name,"\""));
" u. X+ [6 l7 y' [, B- Q end;2 l- k- h' [5 S* Z1 D) s
else
0 Q1 F" |8 X, i4 [ @.Destination := assignLObj[1,row];
3 G! P2 t1 ]: Q Z end; 8 n! o y( m3 u: G0 s
newDirection(@);
' S7 g( j9 |! u) o% s: D @.HasOrder := true;
1 U- G4 E2 A& Z+ A' e$ L- X) C3 i. s end;( ?$ T. `4 n6 H* T+ x9 O* a
end;# \4 Z& r0 N, g* [( e4 J+ r
end; -- of the method4 m/ d# Z$ s0 x/ I& @' l
|