/* called by: entrance ctrl of the object 'track'
" L9 z. _- k& u- I0 q2 P. }*/
; L+ j' x: N/ o. I% h O. x( A* M: \& Kis
! M. F7 K5 a0 y& _ ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ F5 P( u; \' w, Y* I# |do1 y+ {2 N9 j# r+ o/ H @, W# w8 c
Lan := rootfolder.Internal.Tools.AOLlanguage;
" \: r. U0 q7 B! k: {) N% {" k if current = @.Destination -- else return
' J6 K& b! j( a* J6 r0 N3 ^ then5 L2 r5 }5 l- ~: q: a% c
@.Destination := void;
1 u/ Z2 m! @: j3 O" j: y if @.occupied then+ m4 j( S* N( d1 f( Y- i0 ^( ~
part := @.cont;! t* g! c( V( D/ `' C
@.transpOrder := void;7 z+ ?# p+ T+ }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! e" g0 }- i$ }5 m% H# c* [, C% \ @,root.eventcontroller.simTime);
4 O2 x% _$ z& o. [ @.HasOrder := false;
% @0 M. B6 K3 u- n, O @.DrivingHome := true;, ?: [3 [6 Z5 V( S$ i& J, }6 t
rgManager.tryToStartTransOrder;
" r A+ }0 f% W8 i if @.Destination = void. B: X+ M# A/ g0 Y9 r
then -- no transport order for vehicle @
/ z) J5 l% X" {; c: A" x @.Destination :=6 @5 T1 ?# c5 o$ {+ T! a
rgManager.nearestFreeStation(@,track.~);' x% _% a( g( n; }$ j/ q
newDirection(@);
' n, X% @4 S$ G7 G( b% V if @.Destination /= void then
5 u" P. |; J8 a3 b/ T9 V3 p' E6 Z9 X @.Destination.NumReservation :=
7 ^/ B$ j" b6 R. z/ n Z% ]4 }) g- ^ @.Destination.NumReservation + 1;+ O8 r% a3 |& p0 |: C6 Y8 C
end;% [$ P: C' P0 z% n7 R( b
@.CurrIcon := "drivingHome";
+ T( r" t) F/ C0 r @.DrivingHome := true;
: M5 S( K9 J2 U4 Z; ~% `. ? end;, \3 C3 B( F; ?3 H4 d8 `: y5 h7 W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( m8 ]: a$ Z+ k part := @.transpOrder;' g. L1 j# Q1 h, B% J% ~. l1 b% y. t
part.move(@);-- load part
2 s8 }, A; S# A3 K% [1 l; T9 I% @; m9 H @.CurrIcon := "load";, r6 S; G$ C# g7 K3 ]
GlobalDistObj := part.globDestination;/ _; E1 m2 w( J7 F0 G; A8 m
assignLObj := rgmanager.rgAssignL;
3 E$ ]+ F2 d. e5 G2 E/ X row := assignLObj.getRowNo(GlobalDistObj);
) P) A4 J6 M) g3 j0 k) c$ N8 [ if Row = -1 then -- since 70
. Q. R1 I+ f; r, ~1 i5 r if lan=1 then
y. s$ H+ m* b5 l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ \- D( {) C& z& [& p to_str("in der Andockstation: \"",?.~.name,"\""));+ K7 c# p8 o! f% A
else+ R$ H1 \8 h/ ~7 X( E" g( l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
1 V* b! S& E; _- a2 e; p: J to_str("in docking station: \"",?.~.name,"\""));
3 c+ {* @+ `1 F+ e end;
$ [! e& M; N) ]! v7 S. [ else: j; p( n* q/ g& k$ b- `& X
@.Destination := assignLObj[1,row];3 z( O& N7 H5 \) O
end;
/ D& h8 R# i) y$ M* V9 Q: m3 r newDirection(@);6 h7 V9 S' l$ O- v* v8 Y
@.HasOrder := true;: [2 `7 u8 r# |# _! F8 p
end;8 i! A8 g$ w4 e' V- ]
end;
1 q9 _3 h' I, V2 ^3 m& e/ Z% ?end; -- of the method' W9 j8 O" \+ m: G" g/ X9 F6 e
|