/* called by: entrance ctrl of the object 'track'
* D: Y- x- [ s! W- B*/% W" I1 ^+ b: w z9 [
is$ N4 U( \' a) P s, C/ |# m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; I/ s7 ]) C r% d$ A. b; r5 x! W' ido
8 u; c) Q# A" O( ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
: I& t+ x4 Q- l( M$ ] if current = @.Destination -- else return3 k. v6 A$ I& V9 m( H8 G9 i3 p
then
8 v" w5 D4 N7 c& m @.Destination := void;, o: V+ d/ c2 Q
if @.occupied then
; H& a& z+ X) r3 U! K8 ^1 X9 f part := @.cont;
! v1 `" X- R$ ^; m, h+ E1 Z7 @! v @.transpOrder := void;& h* g. X( N2 y8 J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# x; P3 I$ C! v+ }# d4 ]
@,root.eventcontroller.simTime);( b2 [% _( L9 ?. }
@.HasOrder := false;
4 p$ Y) V) A" T% { @.DrivingHome := true;& n7 t" J6 W1 r
rgManager.tryToStartTransOrder;
, R1 F( v) @5 w# T) m* q if @.Destination = void1 p" B. r7 N2 j# [- O
then -- no transport order for vehicle @
6 Y% q' o$ p7 }( Z' k. i @.Destination :=! n& ?* I# `' i3 U) Q: L6 ^3 d2 d
rgManager.nearestFreeStation(@,track.~);) \; l3 E$ H" T' z
newDirection(@);
' c, {2 z5 c, y- K7 w% F if @.Destination /= void then
& ~3 _' z) b: [3 Q @.Destination.NumReservation :=
3 S# X" T$ t3 B @.Destination.NumReservation + 1;
3 j( e# [! O, p2 _2 c8 _5 t end;
! N) M; f& T# k5 n4 J @.CurrIcon := "drivingHome";8 U! C( ~$ G6 h8 l" l3 `, J8 {
@.DrivingHome := true;# J* X i2 d6 [' |
end;
% q. w" z1 k) @/ h9 U o* d1 n' t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" Q- x* k/ N2 f& P part := @.transpOrder;7 v7 \2 e* n; Y8 ?' G' Y
part.move(@);-- load part C7 p: z( v# e, L7 K% p
@.CurrIcon := "load";9 A- X& d7 M( Q& j8 H$ ]0 G9 K
GlobalDistObj := part.globDestination;
) \/ J2 x: L) [: r& \ assignLObj := rgmanager.rgAssignL;
$ W) _5 b! z, @ row := assignLObj.getRowNo(GlobalDistObj);% \4 h% D1 G5 `0 b9 X0 ^
if Row = -1 then -- since 70& g9 Q3 `( Q$ }9 } v+ J
if lan=1 then
' m8 W1 B2 E6 h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
, o) U: S( j' Q3 a& Z9 z to_str("in der Andockstation: \"",?.~.name,"\""));
1 R' I" J8 v8 K else6 r' x, r0 R) e9 c
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( `/ C8 _# l e* B5 [+ r; h to_str("in docking station: \"",?.~.name,"\"")); 0 Z a% X3 u0 ~" o0 Y
end; w: C( W+ t! Y( C
else, x7 ^; E; ?$ Q2 g4 U! w
@.Destination := assignLObj[1,row];
( H# B( u4 n1 t7 f: q9 x end; 5 z7 ^# C E. O% n/ c5 @/ ~
newDirection(@);
" \. W2 S8 B4 I0 a! L3 o' I @.HasOrder := true;* e m) [; V5 {4 L/ d* ~* I8 d
end;7 D4 W* X. a5 n. m" l, d
end;: P" ^9 |( q, z2 `( |
end; -- of the method
6 ?4 k; C$ v( Z" L. ]4 O) r+ c |