/* called by: entrance ctrl of the object 'track'3 W# |3 Q0 R( N- _& j6 B
*/, F1 Q7 h2 ~7 M! [
is2 H/ T! N% J$ K* b3 S y+ a! s* t' s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 l$ r% v% \8 ?5 _- Ndo
4 o8 M. T; B" P9 J Lan := rootfolder.Internal.Tools.AOLlanguage;5 K8 A5 f- q9 E" B5 p5 b6 F( Y
if current = @.Destination -- else return
9 E, }0 s# a" T! u' E& ] then
2 q7 G5 `+ X2 a @.Destination := void;9 {* P$ p7 M$ ^+ b# `7 ]/ [7 {+ h
if @.occupied then4 ^' w( r! |) u7 f0 L+ O
part := @.cont;+ E' R/ t. [' M r
@.transpOrder := void;
4 @- H7 T( n5 y: s& O+ y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& H6 U1 X) E6 Z! O( P1 T @,root.eventcontroller.simTime);
: n6 y( E: X0 |& I1 h @.HasOrder := false;
8 s. ? ]; R5 O& j& M2 i8 N/ G# ] @.DrivingHome := true;
, E p. k3 w5 d0 Q- h2 f) S rgManager.tryToStartTransOrder;$ \2 V; q! M! Z/ r% c
if @.Destination = void
; {* Q* q. e3 n1 V3 e! D- b0 M then -- no transport order for vehicle @! J" ]5 l5 Y% i; _
@.Destination :=
! N6 S) ]+ E( J m rgManager.nearestFreeStation(@,track.~);
& i, m, f* v" ]/ F+ P/ t newDirection(@);
" N; X5 f6 t" o( R$ K7 G if @.Destination /= void then" P4 l# p' Q+ Q( Q; I; @; _* x) A
@.Destination.NumReservation :=6 r0 h" U& w) k% T
@.Destination.NumReservation + 1;
, @8 T$ Z+ G4 X3 ]8 v end;
) l) j2 N; U+ M @.CurrIcon := "drivingHome";, {& u( d/ i. v# ?0 z( L9 U h3 [
@.DrivingHome := true;
0 E: p* z* Y9 E2 N( S' w end;- Z) u8 g/ |0 A- J( T
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 F# C% O; R4 a6 ^5 L0 @/ Q' ? part := @.transpOrder;# r: ~( B9 e' [" _2 F/ T: L
part.move(@);-- load part: V; t3 A; ^) S3 k! b1 u
@.CurrIcon := "load";
2 A+ L5 a+ C2 ^( a GlobalDistObj := part.globDestination;
- C7 r+ J7 h6 k H- e; V- X assignLObj := rgmanager.rgAssignL;
5 @% A8 a+ Q7 ~* y+ R row := assignLObj.getRowNo(GlobalDistObj);1 {' v3 `: H; c5 l* W; q# N
if Row = -1 then -- since 703 l& Y1 F/ F! X/ y% _
if lan=1 then! }8 ], T8 R/ E t% }. Y( G: j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' x) d- P' {2 ^% n" j& K. C; k
to_str("in der Andockstation: \"",?.~.name,"\""));: j: C2 Y9 D4 L/ o+ T+ T* l0 C
else
% s( N1 n3 g' ]. I% N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) A5 N. Q( J9 I0 K A to_str("in docking station: \"",?.~.name,"\""));
/ `5 l% y8 W9 ^. A+ v, i end;
5 o/ r8 n9 j! m; Z4 H else
* b% Q9 C6 E4 Y @.Destination := assignLObj[1,row];5 G+ p: w7 I& ~, R' w8 ?
end;
/ _0 s8 w# n/ y# Y( @% U newDirection(@);
# {' x6 C9 @$ g3 n+ R @.HasOrder := true;) l5 b$ x7 Q& n( D. F6 {; _# Z
end;
" h0 ]- [0 B2 ` end;
' v7 O P: r" o6 p+ A+ m$ V3 Wend; -- of the method% K- D( L) h/ L
|