/* called by: entrance ctrl of the object 'track'
1 A+ z& C/ I6 a" X, I*/
" a/ Z) A& ~; z' }; i. K, His: j4 _- R. j) K) F" y3 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ ^, `! @+ L' `7 q/ ~) edo
8 _3 B0 [. ]1 P$ J/ t3 | Lan := rootfolder.Internal.Tools.AOLlanguage;2 Z; V0 c$ S! g8 Y
if current = @.Destination -- else return: ^2 a( Z& D* b
then% S! L7 q% _7 L! f M- Q
@.Destination := void;' J. p5 D3 t- `7 ?! [" d& e) J8 o
if @.occupied then
) J* @0 ^! h' Q5 ]2 P J7 e" y part := @.cont;1 g$ ]% K0 \- I1 B
@.transpOrder := void;
, c7 {. e% k" @7 y6 i; R part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, Z8 U3 |6 N7 e( C; _' U
@,root.eventcontroller.simTime);
! E" A2 g1 d6 }7 L" f# J @.HasOrder := false;# g! v+ L T/ k) j# p. V
@.DrivingHome := true;
7 r0 P+ o _& ^3 w rgManager.tryToStartTransOrder;
. W+ d5 P+ W) L if @.Destination = void, X S& Z# ] ^
then -- no transport order for vehicle @
( s. [( l8 a1 y @.Destination :=
5 A) t, ^ V7 j; Y0 r rgManager.nearestFreeStation(@,track.~);9 u( ^ }9 p% \( Z8 [* K
newDirection(@); ( I1 P# [, ~% \5 c0 O
if @.Destination /= void then+ Z2 t" e+ e- F$ r( |: g
@.Destination.NumReservation :=+ G: O6 U# i3 m; ~- e
@.Destination.NumReservation + 1;6 j1 W4 M0 `# D" T% Z3 r% Z: f8 p
end;4 U& h3 N) S6 k3 k1 N" {/ y2 f
@.CurrIcon := "drivingHome";
3 Q* l2 w% ~1 y @.DrivingHome := true;
/ o7 x: i9 L2 e0 _+ g) w# K end;
4 A6 f# k+ u2 F% C* o else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 ?4 J4 M; Z7 Y part := @.transpOrder;
: I/ V4 d6 C/ S5 b* O4 O' X' _4 B part.move(@);-- load part9 w: u- }+ T8 y7 U! t6 r3 }3 n
@.CurrIcon := "load";' K& H3 g! k: R! M! D [! a
GlobalDistObj := part.globDestination;
1 y2 \& S- a' Y& L* w8 y assignLObj := rgmanager.rgAssignL;
) u3 u# s3 }, Y; R& s6 t! K O" B5 Y row := assignLObj.getRowNo(GlobalDistObj);
/ [. c$ k: i3 n. y6 S E/ z if Row = -1 then -- since 70& H4 ?/ z/ e+ p
if lan=1 then
: u" e) {/ A) C4 C0 M: L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( O k+ t( V" P to_str("in der Andockstation: \"",?.~.name,"\""));
% F6 w- Q2 H1 W# [/ { else
, w' n* t( O9 a2 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, J9 F- D* Q5 a+ i- d to_str("in docking station: \"",?.~.name,"\""));
' r+ h" B: B+ _2 [; M+ x" M# ^ end;# D! x n8 i& Z) K9 t
else
3 u- n$ d6 l+ @$ e @.Destination := assignLObj[1,row];5 L7 q* Y8 n: Z W6 N
end;
! x& A, Y" q1 M- x1 L# s. o' O& @' W: t newDirection(@);
- l* J$ R4 t0 T @.HasOrder := true;. w4 }5 s' q- L
end;
7 l- l" E, g* S6 r3 l- w$ I6 E end;
6 z& s8 v& |' ~% s3 a) @% iend; -- of the method8 D- @" V# X" j$ D
|