/* called by: entrance ctrl of the object 'track'+ a5 [5 L2 D& k/ N, G
*/
* B& O+ |. @/ q0 Ois; @+ Z$ `6 m' }8 A0 W) w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# B9 s! I6 n* g" I5 `; ido
, [3 h# C* S8 E. n5 p9 U: I# ? Lan := rootfolder.Internal.Tools.AOLlanguage;& w u- y0 @) N. x
if current = @.Destination -- else return9 i6 D. r: e! x0 |/ ?% a! }
then
6 r+ {. h* A# a0 J o% ?& z @.Destination := void;
7 S/ O- E; r+ d+ _. S if @.occupied then7 \9 G* K. S+ [$ Y3 x7 O0 u
part := @.cont;
% M0 X' L! F- V @.transpOrder := void;1 Q$ q% p& V& Y: j0 M" s# x% d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: [/ ]7 H! a# x5 ?; ~6 U
@,root.eventcontroller.simTime);
; v8 Y0 x, ^2 J: q9 ^. v4 Y @.HasOrder := false;8 _6 s; ~9 t9 j+ ~5 \
@.DrivingHome := true;
( c j9 J. H7 ]4 O rgManager.tryToStartTransOrder;
0 V% }7 o, G8 @2 u7 c8 A% t% g8 { if @.Destination = void( n( U. }9 K, q# R; `6 R. E* @
then -- no transport order for vehicle @, {$ c9 V) E& O& K
@.Destination :=& p& L6 V3 [# S/ V" h" j
rgManager.nearestFreeStation(@,track.~);0 g1 g3 M0 g! t$ O: @# d) o2 s
newDirection(@);
! D' t2 i2 A7 `" h8 B; M if @.Destination /= void then
) F3 t" k D1 x+ D% Q9 i2 l @.Destination.NumReservation :=# i _2 l1 d4 x: Y* s
@.Destination.NumReservation + 1;
& V9 X6 x8 D, | end;
8 n7 J5 ?% p, [! W- v9 V @.CurrIcon := "drivingHome";
+ @3 d8 R: E( ^, z6 u& J [ @.DrivingHome := true;
9 M; k4 Q- e8 I, w end;
2 }0 m+ E' K) G4 N% m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, r( t& i" c/ p @2 ?4 n part := @.transpOrder;, p% \8 d4 E4 G% }# c2 C
part.move(@);-- load part
- z6 w& s0 A! ~. j @.CurrIcon := "load";
& \- [9 T( G( b- j9 \, B GlobalDistObj := part.globDestination;
+ a) s, n9 r s- S assignLObj := rgmanager.rgAssignL;( |7 ?( J- D& a9 ^$ i5 {
row := assignLObj.getRowNo(GlobalDistObj);& G, T# {' b) [ X: e, V
if Row = -1 then -- since 70
- H9 v3 P( K2 | if lan=1 then
g# M) Y3 W( A1 J& {( n" o promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 H5 _) W( Q _1 M, p3 J to_str("in der Andockstation: \"",?.~.name,"\""));
( Y; p$ C! I. M& p else. j, P+ D9 g W3 F; ~6 {" C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ t0 G( }( H& K* v( H to_str("in docking station: \"",?.~.name,"\""));
( ~6 `- o! s7 I* a! i end;
! C) x( j( |1 N% _ else& y. ]( t9 D9 _
@.Destination := assignLObj[1,row];
4 f# f* q" [5 r& Z end; 3 W( j* n$ m& {1 q1 _# W, b
newDirection(@);; _( t2 p! h+ h: ?
@.HasOrder := true;& `( l2 ]1 K! u( l* t
end;
7 A" N/ K: Q2 F end;
% Q' i6 `8 R/ }end; -- of the method
% y& D; g2 R3 U |