/* called by: entrance ctrl of the object 'track'* f1 P1 L- y4 h# u
*/
* j2 V* r$ R% y6 B* Y. Q6 \is
4 [) N; I- L0 v1 I; t( K% { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ h6 L0 l c- P# V; `) Qdo" r( s- B3 M! E& ?0 m& b7 I: s/ b
Lan := rootfolder.Internal.Tools.AOLlanguage;. [1 k' ]) |: o: F5 V9 I( F! B% G
if current = @.Destination -- else return& m9 K) ]6 g# T7 p% M( q7 x
then! _/ V- m- A0 ^: R
@.Destination := void;9 _" K+ C. H0 H3 b# \( }! b1 I
if @.occupied then H+ { h( D- w, y7 y" W1 o
part := @.cont;6 j* ~4 b2 i% ^ z
@.transpOrder := void;6 ]5 }$ K- |% i1 {5 W
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 A% r- F0 h- X/ `3 A1 V1 N+ i8 | @,root.eventcontroller.simTime);8 a, i# I1 T# M4 A m- \- j2 D
@.HasOrder := false;
4 o+ q# z0 I4 q: @; d) h @.DrivingHome := true;
$ _; Q+ [- [+ J- z rgManager.tryToStartTransOrder;) g# j9 |* A2 m5 W/ m/ n
if @.Destination = void
& S- y/ S! Z' R& D9 F: X, b then -- no transport order for vehicle @
. m( v0 @8 e2 d. \ P7 q4 Y @.Destination :=
" q! c9 I, T1 N) D" | rgManager.nearestFreeStation(@,track.~);- O! E8 W- l5 [# e. }
newDirection(@);
! M' E( _4 {' } if @.Destination /= void then
- `9 Z8 ^" U3 Q# Z' P3 L( T" ] @.Destination.NumReservation :=
3 v: D. i6 }' w2 Q' F: G1 s @.Destination.NumReservation + 1;
0 x4 q, q6 L, ^) d3 g) a end;: e5 E6 U' {5 i* W4 d
@.CurrIcon := "drivingHome";
, O) N+ l! j* d @.DrivingHome := true;
! n) E u! ^* K) C4 ^8 q) W end;# d9 Q9 m2 G& C& v& \9 K( w
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ k- x9 X, y" Q$ ^7 _- w! a part := @.transpOrder;
, q9 B1 Q, v" c) h# m. } part.move(@);-- load part: H$ }$ ~3 W7 g. p
@.CurrIcon := "load";
7 p7 ]2 F4 g: \/ { GlobalDistObj := part.globDestination;7 q& j3 ^) \8 p; ^! x4 ]2 ~
assignLObj := rgmanager.rgAssignL;+ `: l$ s4 C) H8 t- H6 s
row := assignLObj.getRowNo(GlobalDistObj);
7 y- ~, F3 J8 h8 k9 v% t if Row = -1 then -- since 70' v0 n3 \# l# J: ~
if lan=1 then+ z- I! u! J# L; X3 J6 W
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% H# [6 K/ F# e y1 n% Y" n5 Q2 h+ t to_str("in der Andockstation: \"",?.~.name,"\""));
) e8 D0 T3 K1 \) S* z2 l l8 r else3 |$ `& t( S! [( E" b t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 K/ v' |( _+ T' {
to_str("in docking station: \"",?.~.name,"\"")); 5 H) B6 ^- G) p- G6 g6 F, I
end;
( z5 r9 e) p6 D* v. L9 T0 x else3 b5 I3 w& ]1 q6 s' c. q* q9 q
@.Destination := assignLObj[1,row];2 N- L* K; M4 M7 P v( X. U
end;
. C% W! G5 [6 N+ V5 d newDirection(@);! D/ h- I+ j+ T" I7 g1 T
@.HasOrder := true;
" ?2 n9 T+ ]; D end;
g3 |) y" M' l. n end;
- a; I% n f& i3 f5 rend; -- of the method8 |0 O) w6 j8 H% G4 Y( G1 [. b. Q
|