/* called by: entrance ctrl of the object 'track'
# f/ I3 W7 {6 }: P; c7 a*/
2 D n# `* k9 x8 p. ]$ {4 Eis' _- n h4 t" g3 ?; T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% F% N! V# |# h4 A8 jdo. S, k& X: a8 M0 Q% T2 L
Lan := rootfolder.Internal.Tools.AOLlanguage;3 j- z8 B8 d h: O
if current = @.Destination -- else return
, @) Y x1 L# `* I' Q then( E9 K$ d$ ~" J% k$ z& b# g0 K
@.Destination := void;1 g+ r' r' B: d" E) A' w' ^
if @.occupied then
2 B# e. f* C. G. f part := @.cont;4 J6 z! H3 J4 u8 c- V" R
@.transpOrder := void;* Q0 N( Q7 S& n! D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 ?4 Y+ c8 @0 p( w) e* r @,root.eventcontroller.simTime);+ O" Z$ m0 n1 T! B) M# \
@.HasOrder := false;( P0 t+ y. q' R/ o' c
@.DrivingHome := true;% I. v+ U4 |( L% Q) r: e" X
rgManager.tryToStartTransOrder;" [- e- W5 ~6 T/ D% n" J6 T
if @.Destination = void
& u8 J; T; G" ]& E then -- no transport order for vehicle @( d" [3 L7 F5 J& m* P! C
@.Destination :=
4 w1 F7 P: \% S% C; a7 K rgManager.nearestFreeStation(@,track.~);5 {1 }. R/ k! t5 h9 u
newDirection(@);
Q6 E5 X9 H6 z2 f: j9 t; P& U if @.Destination /= void then
, w- w* O: M% C# O \& \ g @.Destination.NumReservation :=- V$ {0 ?1 ^5 z n1 A, H
@.Destination.NumReservation + 1;
, O7 X2 C _- m8 w, o$ A9 o end;) D. j& u3 P' O( i
@.CurrIcon := "drivingHome";
! t' C, f1 L$ I @.DrivingHome := true;. Z2 g! {0 H- f5 A. [: }9 ^
end;
3 K) T; |0 d \ K# ]0 N/ s1 [* x else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 W6 ]3 N. W- ]- c3 m8 U8 | part := @.transpOrder;+ W4 U4 W* z8 y5 Y' I
part.move(@);-- load part
7 G* Q( U( u; Y- h# P @.CurrIcon := "load";1 ^ T1 y* {# K
GlobalDistObj := part.globDestination;
" u) m! A- _$ d2 ` assignLObj := rgmanager.rgAssignL;8 t3 i" U1 a' H. \$ `) x
row := assignLObj.getRowNo(GlobalDistObj);
2 J- G# ~2 K$ Y6 k: { s* Y if Row = -1 then -- since 70' J% g! {2 }0 h, {8 a# q E1 A
if lan=1 then
+ |) T& h4 p3 b8 f# t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% T* q; q% W/ U( l
to_str("in der Andockstation: \"",?.~.name,"\""));
7 k2 _/ i3 e2 l+ H else
/ H+ n9 P$ a/ M% K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ C; S% q/ [. K& H
to_str("in docking station: \"",?.~.name,"\""));
5 d* ]0 V) q$ @( R) z4 e end;. i- ]1 F: ]# x8 O) Z
else
5 c/ i/ o1 S( S% P @.Destination := assignLObj[1,row];
9 U& V5 B% L9 L* r- \; y6 ?. N end;
$ D2 Z7 Z( U; w newDirection(@);9 d( \- p" z) L: B
@.HasOrder := true;2 q9 G0 u9 Q+ x8 ?# t* @
end;; N+ M3 Y+ ]2 u( s1 S8 A
end;
5 d- L5 k, I6 e Jend; -- of the method3 h1 O! C& Z; |! } u
|