/* called by: entrance ctrl of the object 'track'
/ u- Y# z/ ?7 D0 c*/3 t. r. z5 h3 r8 r& ]8 p% a- G
is
" J$ X; ~2 |4 q" u4 G) V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
R% @( Z9 E( M; @. I" Cdo
! l1 a/ k8 L3 m& ~7 D0 | Lan := rootfolder.Internal.Tools.AOLlanguage;
, u6 ^$ S8 G* l/ t' J; P! a if current = @.Destination -- else return
3 `- @8 c2 N9 U& p then
. M9 G; d- m, E/ ]3 P1 F' O @.Destination := void;
4 J" e: d s5 @- P if @.occupied then7 z7 p4 \ r' I7 i
part := @.cont;
7 E) v+ `8 N7 M) M @.transpOrder := void;) \! M8 O _1 Y( a- _. ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( J5 H# }( K1 w- c9 z
@,root.eventcontroller.simTime);
6 _! s! G9 I( S9 }* V @.HasOrder := false;
" ]* {% i0 O: ~( s6 @$ g @.DrivingHome := true;- j) \) N4 _3 n; H% J# w+ ?
rgManager.tryToStartTransOrder;+ h/ K$ Q# W% Z1 ?+ W% |* s
if @.Destination = void
# V( l4 c( w# T# Q6 Q then -- no transport order for vehicle @
) M. Q! H J: o. K: |! u0 a8 m. H @.Destination :=7 e- `) G4 N* E
rgManager.nearestFreeStation(@,track.~);
% V( a1 a4 [2 e newDirection(@); : _3 U* A" S1 G7 @
if @.Destination /= void then3 P; j: F( D, h* O" O
@.Destination.NumReservation :=+ B# z' U- Y _2 V" U+ Z4 [ A8 J
@.Destination.NumReservation + 1;
6 \: p$ N4 ^: j end;
: ^ g4 B8 a( B$ \ @.CurrIcon := "drivingHome";
' C% D, q; f& N @.DrivingHome := true;
$ q0 p+ T% Y" d: |6 p' @$ z end;
( r6 \: C* v: ^8 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& A! f; e5 Z2 g" X* _ part := @.transpOrder;( c$ G' ?% A# v5 u# }/ ~. ^) N; J# b
part.move(@);-- load part
8 U; `. k8 U( u @.CurrIcon := "load";
: j" b4 T7 g, V2 a$ W GlobalDistObj := part.globDestination;
3 E6 d1 _ K+ D& i* V: ` assignLObj := rgmanager.rgAssignL;
$ F8 y6 [7 l0 g. v7 M* a7 ` row := assignLObj.getRowNo(GlobalDistObj);$ o( X& v" r) X( r) P" n) B
if Row = -1 then -- since 70
: _- m* r( L8 E2 K7 h* _" O if lan=1 then
7 r3 W+ V! ~$ ^4 H3 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* v/ f H) w4 @2 X' L1 E) M to_str("in der Andockstation: \"",?.~.name,"\""));$ Z! l1 q0 l5 B7 J1 S$ g* S( L
else
% e% N% Z& i1 K# \1 }! Z3 F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ p4 }$ E7 q* X3 ^# C to_str("in docking station: \"",?.~.name,"\""));
" @$ t8 n& Z( X, k0 D8 x' i: u end;' I7 o% S3 ^4 @
else. R2 u, s9 {7 A5 K
@.Destination := assignLObj[1,row];: M5 A: M3 @8 J4 B2 Z
end;
+ N } l! b2 u/ z newDirection(@);
0 K- F/ a1 x* g) _! f/ ~; [ @.HasOrder := true;
6 x( m( u; Z' ~1 g" N% A end;
+ W* w; G- O4 f9 q6 y end;5 q' I5 {( T( b4 n
end; -- of the method9 R8 [+ U2 d) f/ ~2 z& y
|