/* called by: entrance ctrl of the object 'track'
/ I" H; R" {9 B6 c, k6 m*/
6 q2 g# s/ ^ m" a1 d1 K( tis
7 X' ^2 ]6 _" f D; [9 H part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ p; L+ d; X$ Jdo
! `: x* T: G9 `" W Lan := rootfolder.Internal.Tools.AOLlanguage;4 ^3 K0 r' k4 n& M( ~' O
if current = @.Destination -- else return1 V( d3 h7 [0 J: W; e9 z
then
7 R% r2 i) y" e+ c2 j @.Destination := void;
+ _: B" {/ a3 x if @.occupied then1 x1 y1 T' l' H4 q
part := @.cont;5 v5 W: P& T6 n; `" \. y
@.transpOrder := void;
/ ]9 S/ ~) A; d- N, i/ P0 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! s- ?+ `. S) C6 ~1 w5 q @,root.eventcontroller.simTime);
9 N. y4 f. @7 v* W( ]# v @.HasOrder := false;/ A: R% P" \% n2 m$ N S
@.DrivingHome := true;
/ N2 H$ f5 N! s( a1 i" N rgManager.tryToStartTransOrder;
* j7 k* h# m5 U' l1 w( H4 ^ if @.Destination = void! ]) T& q8 O* U' ~ O" v( d. f
then -- no transport order for vehicle @
$ E7 F( Q' p; i0 m% \6 o @.Destination :=
, a) c: d$ O* t% \5 i rgManager.nearestFreeStation(@,track.~);# @- o# U$ d ?" E
newDirection(@); / R ]5 r; D {" {
if @.Destination /= void then
2 p# Q) {' B4 y; M. l. u" h! N @.Destination.NumReservation :=) M# }) v; v" b5 l/ H5 ~% B/ L6 T5 G
@.Destination.NumReservation + 1;- s) ~1 g: {5 k8 y4 ^
end;
2 R. @* c. p% t/ y) Z @.CurrIcon := "drivingHome";; j5 b0 z% i9 G5 `; X/ [0 }6 H, C
@.DrivingHome := true;- b0 F9 Q! ~( t) ~' ?7 _& ?( `
end;3 u% f+ O! U4 I. |3 x( B* u2 W# Z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# \( w2 G$ ~* I" S7 p) r2 w part := @.transpOrder;; o$ W4 y, b3 b2 |
part.move(@);-- load part
7 p$ q Z! H% _6 P @.CurrIcon := "load";
$ o. O& d& D7 K* O( `5 f. O! y GlobalDistObj := part.globDestination;
8 x0 P+ P4 f9 N4 E7 u assignLObj := rgmanager.rgAssignL;
) u! i0 ^ A1 z row := assignLObj.getRowNo(GlobalDistObj); N ?4 n/ [& x+ q4 o
if Row = -1 then -- since 70
8 ^. a& [2 {3 i3 e, ~/ s7 H1 Y if lan=1 then
: v7 {6 M1 R- K1 S1 \6 p* \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: y6 U9 x( z8 ~% U to_str("in der Andockstation: \"",?.~.name,"\""));
$ P x8 `. b7 q3 ~9 ?" A8 U) r else
" U9 @! r3 O/ b h0 m promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; q9 F* w3 K9 X. s
to_str("in docking station: \"",?.~.name,"\""));
: j! {2 @* C' t8 Z9 `/ c end;% a8 M' b5 _, c5 G4 P
else' @ ~3 J; V* R9 G$ T6 C2 M
@.Destination := assignLObj[1,row];( Q7 y6 Q( f& [3 E3 [) b! I
end; / R7 K1 H$ Y" `; Z1 w, \) P3 @
newDirection(@);
6 m$ j3 P4 e6 x& c" X @.HasOrder := true;
, C( A# U4 |% t# A0 O' { end;
) Q2 h, I- n2 ]0 z end;
/ k5 Z2 G8 Q" F" r* ~! bend; -- of the method; l% g- O1 J+ G0 b
|