/* called by: entrance ctrl of the object 'track'" Y6 C5 C5 P# q
*/6 Y/ o3 h/ b+ a
is
9 ?8 r9 ]( H, g4 s( f' b( x& r part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 h; j! M- A* |/ s
do
: `9 |- |; K) Q3 ^! g Lan := rootfolder.Internal.Tools.AOLlanguage;# J- E, w/ d4 {. Q# f7 K
if current = @.Destination -- else return
1 j! c* e( |6 k' |7 U* b1 B7 } then
1 d9 Q1 e0 P1 b! S1 {. O @.Destination := void;5 y* F$ _4 Y- Z( r
if @.occupied then' y5 T/ {- b# X5 {% I
part := @.cont;( p- R$ B6 @% A- P: }, h8 B
@.transpOrder := void;6 `( s J; F2 W5 {1 e# U G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, T1 K6 H+ R' f. q. w @,root.eventcontroller.simTime);
* |2 s2 h' r a5 F9 l! ^# f2 D. a @.HasOrder := false;
5 m5 U; U i( S @.DrivingHome := true;
: i1 V5 P- ^! U8 z- I rgManager.tryToStartTransOrder;- F. \' d" H3 L; |& t% U
if @.Destination = void
9 N% T( g# _. S then -- no transport order for vehicle @
: `* N( ~/ P$ [: ^+ s @.Destination :=6 [1 s7 X5 d: h1 u$ V
rgManager.nearestFreeStation(@,track.~);
5 ?$ w" G: t/ y9 W newDirection(@);
; Y5 O0 s1 J' ?5 i j if @.Destination /= void then
5 M' W: `, ]. l7 h1 m# B/ b @.Destination.NumReservation :=8 W( i3 G5 [5 ?
@.Destination.NumReservation + 1; m/ _& V2 W' J: [) t
end;1 K6 @, W# x; e( T4 `1 p" I
@.CurrIcon := "drivingHome";
2 K# p) o3 N1 m6 A' \- k( U& ~ @.DrivingHome := true;
! M: E5 U5 I l0 s3 j. Y end;" f5 y/ p8 z. d# n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 ?& z8 ^; k1 v- V( K Q0 i1 ^/ R
part := @.transpOrder;
# y6 Y# G2 g1 p4 a. [% H part.move(@);-- load part
4 O1 V, u# d& v! ^! t" M( k @.CurrIcon := "load";4 J3 }6 x; g3 T8 x: {: o: Y/ e
GlobalDistObj := part.globDestination;$ N1 t7 q2 _ A0 c+ ^0 r. L
assignLObj := rgmanager.rgAssignL;
; X6 t$ [! ? u3 D* u row := assignLObj.getRowNo(GlobalDistObj);2 t k9 T* ?( u3 l( G
if Row = -1 then -- since 70
; e: U' [1 u4 S- K { if lan=1 then8 {# J& q4 I4 t; {$ Q" T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- O, z* O1 H: i5 k$ [: G$ p
to_str("in der Andockstation: \"",?.~.name,"\""));4 c2 P' i2 P1 M+ V. L
else
6 d7 ^) Z$ [* C3 Y) }4 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ d6 Z5 R! L; w8 K3 x
to_str("in docking station: \"",?.~.name,"\"")); 5 d3 B! G( ?! D8 ?# n
end;$ b4 v ^; C, y$ m
else2 \6 `3 {9 G8 Y4 x( Z9 m* |! V) ]6 G
@.Destination := assignLObj[1,row];7 I6 T+ h% a$ l$ W8 [7 n
end; r: {; f$ ^4 q! S1 H, M: @
newDirection(@);
i. |/ z, U7 h6 \: M: f @.HasOrder := true;
( K X4 O" T5 K4 d end;. V3 ~% ~; w! Q9 M, d, f
end;
/ o5 `+ G( v+ u& t/ ~% Aend; -- of the method
( }* T3 O4 J' A: i$ v6 N |