/* called by: entrance ctrl of the object 'track'; R) [1 W/ S8 o7 c3 a
*/3 z2 p) ], H- c% w' B7 Q2 @$ n
is
+ ^; k! K5 {2 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
m1 N$ o, N Gdo
" W7 e; Z# E& @' U: P# _' ] Lan := rootfolder.Internal.Tools.AOLlanguage;
$ H) |7 z3 D7 g' D if current = @.Destination -- else return% e9 x& A0 F% }( F
then
" `6 w! K! n* k) z- { @.Destination := void;/ C6 a" h* I$ V
if @.occupied then
" R8 D. \+ W2 ^& {. h part := @.cont;
% W8 p$ C/ ~% D. R1 z5 F @.transpOrder := void;" ?2 I" a$ k' b) N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! `2 U, k) ?& Y' x0 g8 P6 l2 w
@,root.eventcontroller.simTime);3 }' Y& o1 e$ Q* l
@.HasOrder := false;
6 T4 {. U2 z/ Y @.DrivingHome := true;; G( R* O" i6 @8 L }. H
rgManager.tryToStartTransOrder;
0 Z# o- I/ S5 ]/ D: L if @.Destination = void# a2 I/ c( N9 R! _
then -- no transport order for vehicle @
" Z3 U# |) R$ K1 x1 q' a @.Destination := P) |+ M+ B: n* x3 R/ L z
rgManager.nearestFreeStation(@,track.~);
, E K* Y4 n6 {/ z newDirection(@); ( Q ^* L: D, o" c3 N$ [; z1 }4 ]/ a
if @.Destination /= void then% \/ j' J. G* ?
@.Destination.NumReservation :=
; n" X8 g' b% X @.Destination.NumReservation + 1;
( l4 y, D+ X, [6 {" \ end;8 j; {3 b; J0 m+ j9 ^; H L/ v
@.CurrIcon := "drivingHome";
; U# g% J. [% s& b; j1 u7 ` @.DrivingHome := true;& p! d! ~( O8 H7 z
end;: {* T, L8 @- E& J1 B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ v) S2 k, w! n' ^ part := @.transpOrder;- k5 _3 X2 r) W$ j! { X1 m
part.move(@);-- load part
+ f; a B8 o! x% G L* h @.CurrIcon := "load";" J. H& v4 h- S9 I$ d
GlobalDistObj := part.globDestination;/ a# c* |/ P* m- W2 I' J D
assignLObj := rgmanager.rgAssignL;
0 r- m9 [& j- T9 Q. y row := assignLObj.getRowNo(GlobalDistObj);( v7 r! l8 w+ a+ ~/ X
if Row = -1 then -- since 70
* t8 m. o2 S$ ]6 T1 B0 K) }, s& z if lan=1 then' l6 ?( @% d6 H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 X/ t+ y. b3 N9 z
to_str("in der Andockstation: \"",?.~.name,"\""));% S5 A7 |3 A, h8 d! O; s0 `/ P
else
5 I; r$ x# e: h+ U( o- F" D+ o4 F- u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: L9 A9 ^( d* I% n l to_str("in docking station: \"",?.~.name,"\""));
# w i8 U9 e9 ]: W end;# S7 ]0 S8 k' `& A" q# ]1 W1 Y
else" p) T/ A2 X& U( T- { _/ m; J8 @. [
@.Destination := assignLObj[1,row];
% ? K6 j! _& r Y end;
e- }2 X$ Z' C' _ newDirection(@);
$ f' G& c' K0 S. j' t+ U" r# } @.HasOrder := true;, B* i p( ?; t+ Z0 j0 X
end;/ E, J6 S3 a8 F) n, Q2 _9 r
end;5 n7 l9 g# B5 H9 t5 g5 w
end; -- of the method
8 ~2 E9 i- y4 a, {0 w3 a |