/* called by: entrance ctrl of the object 'track'
; n& B) D/ J5 T8 A5 [! u! h*/# I ?7 h Q: a5 K( S" H2 C. O/ s
is
& @2 m. |5 A! L2 v part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 I1 {) @. S5 U& D. Q$ cdo
! `! [. H/ e; d8 v7 m Lan := rootfolder.Internal.Tools.AOLlanguage;; l2 u' _* k: g( m
if current = @.Destination -- else return
1 j3 p( u1 ?; O% m1 y& e then" A2 M' u1 R9 z: b
@.Destination := void;
# A! Q$ I; d6 N% Q3 n4 S if @.occupied then- y+ E( U8 [0 W
part := @.cont;6 {2 [4 Y! m! t% P; z/ O
@.transpOrder := void;
' b: O+ `3 A' B$ y' z1 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! `9 R$ U6 {3 Z- u3 ^2 D5 j @,root.eventcontroller.simTime);% `! S5 v$ _7 n( }9 B& x' o" e+ D
@.HasOrder := false;$ ^! f! D' l) X
@.DrivingHome := true;' z% s# m ~7 X+ i. x
rgManager.tryToStartTransOrder;2 P7 x& P2 E2 o8 o; Q2 z4 Z( r3 h
if @.Destination = void6 q- A- o$ D) U- x9 q O
then -- no transport order for vehicle @
8 X3 r/ E( F' U8 n% _* F @.Destination :=" k8 v' g) I- w# L4 J
rgManager.nearestFreeStation(@,track.~);
5 C' z6 u) z3 H+ U ]1 K% t. W newDirection(@); / a4 {. S# M# U5 `1 D% ^1 h
if @.Destination /= void then
8 u2 Q' X H" r& `; U" Q @.Destination.NumReservation :=' {) b' }8 C/ R( ?) D y# t
@.Destination.NumReservation + 1;
3 Q: s/ d' @) z end;
" Y- Z( Q4 u/ {( ]% t& G9 |, U @.CurrIcon := "drivingHome";
9 ]3 o: `/ ^5 K! d4 q$ m @.DrivingHome := true;) r0 p6 `8 e9 _
end;6 ~) L! L+ Z& e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 \* _: |, W5 [* u r+ Z( n part := @.transpOrder;
# Z2 @; S; G. m ~3 h part.move(@);-- load part8 J& b! D3 z, [) V
@.CurrIcon := "load";
, X/ j( _% w$ R8 A/ g4 n& m GlobalDistObj := part.globDestination;
0 a5 ~) C. c1 c8 ?" w$ V assignLObj := rgmanager.rgAssignL;
+ O4 n4 D9 w1 T row := assignLObj.getRowNo(GlobalDistObj);+ A/ q( v, Z4 |5 d
if Row = -1 then -- since 70; Q$ W0 W" c! s8 D# [+ N
if lan=1 then, u+ q: L: w+ f% k! m6 D$ C6 s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ K2 K. g+ s6 m$ g/ S6 I to_str("in der Andockstation: \"",?.~.name,"\""));# ?6 ^+ ^+ D8 q! a: `
else. |* C* T5 P6 I( _- B0 l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# p* j0 A0 J! D. v
to_str("in docking station: \"",?.~.name,"\"")); : `6 W0 H. L9 g5 P
end;
% z2 b; S @7 X$ y/ \# @3 }4 X else
$ i) n* \/ n& `$ w% N/ p8 g( P, k9 N @.Destination := assignLObj[1,row];# _* K2 }2 u7 b0 U; F/ L' { v
end; : _% A" M- y: e0 r7 [" g2 T
newDirection(@);
+ E8 D, o- A" m0 ?0 D& ] @.HasOrder := true;
- E5 s1 x4 X g; J/ Q7 ` end;
3 I k9 }, H: a0 f* k end;6 W: M3 W6 \- g
end; -- of the method) Y+ F" n# W, w' \- H
|