/* called by: entrance ctrl of the object 'track'4 |! r: u6 ] n& S
*/
+ S4 t Z" S& E" O2 @is9 N. F9 ~) o/ H5 N8 ^8 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 D7 z; u$ i. s3 U4 e4 ^
do
6 d6 M* i3 N6 a& ? Lan := rootfolder.Internal.Tools.AOLlanguage;9 j+ q6 j3 ?/ \4 q2 m
if current = @.Destination -- else return% O' m6 z" e* B# B
then
# Z$ C( w7 r4 W" W' X9 c% S4 T4 q0 h @.Destination := void;6 S/ I/ F) u6 {2 R' X1 C. F3 O
if @.occupied then7 S$ q% E/ e8 o& l. b7 M
part := @.cont;
. |# ~9 k5 n$ f Y @.transpOrder := void;% p/ V0 [! _# ?, J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* {7 X8 O7 J+ `, X# D& y, m4 Z# e
@,root.eventcontroller.simTime);6 H$ u- @, Y, N0 N0 F4 [
@.HasOrder := false;
0 r+ @* Q: @. U, }3 a @.DrivingHome := true;9 g: C$ V1 }$ P1 B
rgManager.tryToStartTransOrder;
$ `7 ^9 C: e2 r. K$ i if @.Destination = void1 N z- a& a1 v: _. [" y9 c
then -- no transport order for vehicle @
& K0 L* n! W2 ~) A8 X @.Destination :=
9 q* t: A5 M, x O+ y$ o rgManager.nearestFreeStation(@,track.~);
5 I( S% Z; a7 Y8 s! h! V4 z newDirection(@); ( C$ y0 h4 o3 o) y9 [5 w# c. Y
if @.Destination /= void then
2 Y; B3 t3 \& e5 Z @.Destination.NumReservation :=
! V' m# ]: \7 \" ^ @.Destination.NumReservation + 1;
! ?' R( `; d. z, A end;
_5 {! T6 X/ u/ r @.CurrIcon := "drivingHome";* a. e1 D1 |; M6 W* \5 a
@.DrivingHome := true;7 [+ u' E, @% O- Y! {% {
end;
. W8 B3 x* t2 {' ?; e2 c' Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station; Y# v8 o! | t- r, P& m; Q
part := @.transpOrder;# d" M- v1 d7 X
part.move(@);-- load part
: x; w& W; j% s @.CurrIcon := "load";9 s/ b# U" V. R6 x6 Y
GlobalDistObj := part.globDestination;9 M; W- j) e; o r- w" h
assignLObj := rgmanager.rgAssignL;- ?1 ~% {; e) T: H C1 R
row := assignLObj.getRowNo(GlobalDistObj);! f& c% F& f1 v2 p* G8 Z) w4 i
if Row = -1 then -- since 709 |, v# G( t" r, X
if lan=1 then2 C3 h# V3 X7 f3 `
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
" N+ A3 s; `$ y# w to_str("in der Andockstation: \"",?.~.name,"\""));
/ h4 N+ J& ^2 T4 ^; i else
2 Z+ q# S. g6 z+ R- D+ _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ W. Y) M" v+ d; Z to_str("in docking station: \"",?.~.name,"\""));
4 r) i5 o- A& ? end;+ Y6 ]% u- [# S+ O* ~, P
else
% I& ^1 a; S+ G0 g1 F s3 c1 Z d @.Destination := assignLObj[1,row];
& W, W; A+ z! O9 G. A end;
! Z' {9 C1 G/ w+ r% L2 c+ A& U% q newDirection(@);( K" [- K% r2 R/ r; C
@.HasOrder := true;' _( @ t( V$ F1 |' a
end;7 |- s% |: E' S B v
end;
" K; s4 R9 S* s& q% `end; -- of the method
% C8 [* e+ U, n$ `; a6 H |