/* called by: entrance ctrl of the object 'track'
" m0 ]' `+ a) M* z*/: B2 R, {9 b$ y- U% W
is
4 X- H0 T& ^1 j+ }* S part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 G1 N5 V9 U0 X9 o; @3 k Xdo0 X& U2 X* t: ?5 b7 q/ B6 F3 y
Lan := rootfolder.Internal.Tools.AOLlanguage;; R; z' x6 N5 o, d, O
if current = @.Destination -- else return( N. N6 e1 U' x. |" V2 A
then
8 F0 ^, q# ^ Y, d G' Z @.Destination := void;
1 L6 W6 s5 `9 d if @.occupied then
) w' ^4 g, k6 ?) J part := @.cont;
& i3 t: @0 t2 W6 D @.transpOrder := void;$ y1 w- _( u. \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 d$ G8 Y1 `: w4 p0 n- m; B: p
@,root.eventcontroller.simTime);$ f& L0 ]/ ?( ?
@.HasOrder := false;
. l9 P* D6 U3 b7 c @.DrivingHome := true;
9 t% e" e3 g5 B' Y- P" i rgManager.tryToStartTransOrder;) F& Z' l$ O$ a
if @.Destination = void
8 x! B- c% d; B5 ^2 B9 J6 t then -- no transport order for vehicle @
4 E' ?$ J, {* f4 c! q4 K& k; E! ^ @.Destination :=
- @5 J5 u' ]% } |, K7 i7 c- K rgManager.nearestFreeStation(@,track.~);* P# f5 m! ~2 k: r8 m
newDirection(@);
5 A: y0 E; E( O! s if @.Destination /= void then2 j8 j) r: B: `5 Q
@.Destination.NumReservation :=
4 ~7 P) q( e- U" w+ B1 t3 e6 o( ~' G @.Destination.NumReservation + 1;0 A G( y* e9 X- d3 A6 N' o6 J# r' t8 J
end;8 _7 d& E+ D8 h3 K) Y$ x7 J
@.CurrIcon := "drivingHome";9 B* q' K! T9 n4 }- U$ h
@.DrivingHome := true;
; G W) l: c! b4 c4 p end;) e7 {, U, j* F9 S$ ^* E2 d2 ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 C( e7 g9 { {1 p0 Q& \
part := @.transpOrder;
8 @* y" e" b& l: [; U part.move(@);-- load part
1 W: k! K: J0 u" I5 b @.CurrIcon := "load";. t/ g; A* L8 |9 B
GlobalDistObj := part.globDestination;
/ C4 T$ H+ `; m% a* t$ P6 U- i assignLObj := rgmanager.rgAssignL;1 X2 n4 L7 B& Y" I2 ~6 r2 w$ P1 p; e0 W
row := assignLObj.getRowNo(GlobalDistObj);6 Z" R6 P& Q4 n' x
if Row = -1 then -- since 70
. K: k @. b& ], d4 A% y if lan=1 then
7 _1 S/ z& @ P, o0 B$ d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
g- p. M6 l, s, ~ to_str("in der Andockstation: \"",?.~.name,"\""));
; J7 E+ ~8 P8 n& d' s* H+ \ else% Z h# h: a! ?, Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; N9 a+ g/ R6 F2 q
to_str("in docking station: \"",?.~.name,"\""));
& m$ N7 w. {+ i6 m* n+ s5 y! D end;( L# {9 G' B, ^; {/ S. n9 X2 Q
else, l) d2 _% ~2 j# h
@.Destination := assignLObj[1,row];: l7 U7 D' F9 ?) {! f+ K5 S3 J# ^
end; * d. }( c1 W/ ~5 I
newDirection(@);
( }' S& A2 R, K* a% s3 o c8 G @.HasOrder := true;' P# |8 D: S, m5 \
end; ~/ W: w! ?! x& ]( r( \
end;
H6 y- T9 c% U8 g* U* Bend; -- of the method. w# E0 n1 i8 a$ |( x
|