/* called by: entrance ctrl of the object 'track': R: W) L2 V* j4 h
*/
$ ]6 c2 p) r' g% ^4 Ais& d% @$ Z2 t. \4 U3 K3 ?3 l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- Y" a) b. g' ?; c6 K5 A1 I3 l
do
" y3 E8 g* z7 }3 a& X- z Lan := rootfolder.Internal.Tools.AOLlanguage;8 P$ @" U. @/ ^# v
if current = @.Destination -- else return4 Q: l, K5 _7 }! C9 N" H
then! b/ R" t% b9 [4 `& V+ R
@.Destination := void;5 t* y$ L7 ~( D% R# Q# r6 x7 H6 W m
if @.occupied then/ r# E J5 }( P
part := @.cont;
% W7 C6 o8 Z. e( o @.transpOrder := void;
; r; w1 ~! \& A0 p. c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: l/ r% u1 K5 e
@,root.eventcontroller.simTime);+ h7 r; C+ u. J+ o
@.HasOrder := false;. G6 h* H) C/ i+ N" j! d
@.DrivingHome := true;
' [) r8 P l/ x8 u5 Q F rgManager.tryToStartTransOrder;
* y; b* n+ ^2 j4 `) s4 ~: z! N if @.Destination = void3 T9 L$ x5 Y$ q
then -- no transport order for vehicle @
% I8 b& _! s5 `) a5 R+ o @.Destination :=
0 H, }0 B9 b* g- Q; o% _- P rgManager.nearestFreeStation(@,track.~);5 b% a% K5 W/ X: n* U! f- O
newDirection(@); * V* k& ?' W# d* S4 C8 Y1 K
if @.Destination /= void then
" q I# z; A& ~1 P, h$ A @.Destination.NumReservation :=2 {" ^+ ?9 P V2 z, Z" ]4 s( B
@.Destination.NumReservation + 1;3 d/ l& T5 l8 S( L7 n
end;( j9 a$ C# L; W6 D8 r/ l
@.CurrIcon := "drivingHome";/ T/ z4 O4 l! M a! L7 P, p
@.DrivingHome := true;
( R2 w# C; n" B& | end;: M9 J8 Y4 }3 }% T& f5 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' ^- B7 \/ N# L4 Q0 y
part := @.transpOrder;+ ]; s' }' c4 N6 W O% v% I9 C: E
part.move(@);-- load part
) r( I$ D$ h( m. V8 n5 O @.CurrIcon := "load";
% Q- w7 u" v6 D/ [+ F; j GlobalDistObj := part.globDestination;5 a" y3 i6 e+ x4 O, B3 v9 ^
assignLObj := rgmanager.rgAssignL;
" n& g: |, L$ e row := assignLObj.getRowNo(GlobalDistObj);2 K- @" R; Q' B; Q
if Row = -1 then -- since 70& r" I; y- R- ^# P
if lan=1 then
& Y! d8 L1 Z1 z5 y4 X7 r promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ }3 A+ N% C( c+ `9 B2 j+ d e) F to_str("in der Andockstation: \"",?.~.name,"\""));5 |% h: ]9 j+ Q$ r* d
else5 l7 Q0 w' g- N8 x' l) M, e! |
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- }: |$ P( U: { to_str("in docking station: \"",?.~.name,"\""));
7 z8 p: s/ A# W' f end;
7 v% [, ^0 i* I* n else
, B7 ]2 l5 v3 V5 D" W" V" L @.Destination := assignLObj[1,row];
K" j9 e- U; g/ f; q$ t end; 3 q) @3 c6 G) A! J
newDirection(@);
( C; j" P3 p1 g @.HasOrder := true;3 G( B x* J! _; m+ H% E
end;
6 \- g' v3 i8 v, T end;
2 Y, t B! p, u' Z4 \4 I. p+ g0 Dend; -- of the method1 r. }2 O7 f8 w
|