/* called by: entrance ctrl of the object 'track', H; e5 n( J. n9 H/ f1 b
*/. q' f0 i: s- V) j2 n
is2 h# r$ ~9 _6 i& T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) D' W4 a! O* g- N9 G- ldo
, _1 o( D& Z+ V& H: x Lan := rootfolder.Internal.Tools.AOLlanguage;, x1 M _& |$ i( t' d% ~
if current = @.Destination -- else return& K# p; i) \+ _ l
then
3 N: ?0 g2 E* D* X @.Destination := void;5 T! ?& ~# t3 o6 ^8 D2 O
if @.occupied then
; s" e4 j2 G' G7 T part := @.cont;
( h' b' E4 |& }8 [! ~ @.transpOrder := void;
7 k! r+ {, s6 [+ c$ z$ ]- z i* U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( j4 T& g' T+ n# w/ K9 A9 V
@,root.eventcontroller.simTime);
( y2 V7 `% j) P% H/ V+ G @.HasOrder := false;7 M% ] Q1 k, O
@.DrivingHome := true;
' ]! m6 B8 P) o: q) }0 q/ C4 ~ rgManager.tryToStartTransOrder;' {% |2 z: @/ l6 `0 _% F
if @.Destination = void. y; {( P' s0 m+ n2 ]
then -- no transport order for vehicle @; H! i* s& _& Z0 p$ J: k
@.Destination :=
2 @/ P9 L) j$ Z' u2 T' d) E a rgManager.nearestFreeStation(@,track.~);
) [' |. C/ y. f! D) M. r newDirection(@);
9 `( i6 f! ?" d. F4 c if @.Destination /= void then! m3 N: w4 t: b/ u+ @& h
@.Destination.NumReservation :=
. V, [; g; _9 y @.Destination.NumReservation + 1;( G! |& c% t7 r- {0 D. J8 w
end;1 `9 C. S: ] j" h- ]
@.CurrIcon := "drivingHome";+ j& @2 ~# F! J0 O% I3 y' K
@.DrivingHome := true;
" b; E2 r; K' L7 [0 W* f& M( v# d end;, j$ w, h9 U) X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: V" ~! q7 X5 W" y% Q part := @.transpOrder;! I. B5 K4 I# a& z0 H
part.move(@);-- load part' d- Z7 e$ Z* V) @* u; p
@.CurrIcon := "load";
$ w- p6 \5 y9 F8 r+ O }) {" g GlobalDistObj := part.globDestination;
/ h, J) j( P! L4 | assignLObj := rgmanager.rgAssignL;
# A6 l& x& [! p1 {( l row := assignLObj.getRowNo(GlobalDistObj);
' W! H) x# P. h' C9 E6 @2 i if Row = -1 then -- since 709 t! h- [5 u: M: ]
if lan=1 then
/ @4 f$ n7 r( N' _" W$ s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), V1 R, C* j5 ` B. t
to_str("in der Andockstation: \"",?.~.name,"\""));& ?5 e9 P4 F- z) J
else5 Q/ g- q3 K+ Y) v+ }& c( Q. z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: I& }4 C& a* j9 j5 T8 m
to_str("in docking station: \"",?.~.name,"\""));
5 R, h' Z5 D) T3 V end;
e/ T& B c9 a else
% ^5 d1 i# \2 K9 }0 g @.Destination := assignLObj[1,row];( @4 G' o2 K1 F0 y/ v% o. ?$ d. P
end;
3 `/ S6 Z4 g% ?; r" i- W* f newDirection(@);
' f1 m+ [/ I3 ~# `! D3 X: L @.HasOrder := true;2 V! f7 E% B$ t$ R1 V+ r
end;
$ `( k! E" y- d# ?3 R! P. c end;% x/ ~. T$ l2 h) C
end; -- of the method0 R- j/ t& s* C) q: f
|