/* called by: entrance ctrl of the object 'track'
) J( f2 @% D& R*// F2 N+ i: H# p
is( F( ~: G! J3 c5 [/ O' K e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 _+ q5 y* b+ H; V4 G& j
do
6 C2 d2 P) a. @7 ~ Lan := rootfolder.Internal.Tools.AOLlanguage;6 N8 d7 v" `: `3 r4 w3 W% h
if current = @.Destination -- else return
$ ~" y( r8 k) O/ b& V/ @ then; r% \$ g" R/ v7 N. _/ ?
@.Destination := void;
, y& Z, Z8 |% Y, r8 X3 ?7 _ if @.occupied then2 S7 Y: d. y1 w$ j$ S2 q6 k; z9 s7 H* U
part := @.cont;9 L: T" c8 b1 A$ ]( t3 n+ v& ]
@.transpOrder := void;+ x9 n. G( {! L' h4 }/ X4 H
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ O2 d) a k7 I/ V! H. W
@,root.eventcontroller.simTime);0 S* G6 B- p3 z0 L/ F y7 r. d
@.HasOrder := false;3 G% o! p/ \1 S0 ]: O
@.DrivingHome := true;0 X9 }) o q8 a! f% ^! x* ]
rgManager.tryToStartTransOrder;6 k7 ]! Q$ E9 C# O( [+ M
if @.Destination = void
& d i1 x8 n$ Z# U2 a then -- no transport order for vehicle @
, u9 t* Q2 o5 A3 F; o! d) q: V @.Destination :=
& r" V n( p! F: N rgManager.nearestFreeStation(@,track.~);: U8 B6 x' u h* g/ b9 K
newDirection(@);
$ N" s+ T% L$ [1 a/ g4 W0 l( ~ if @.Destination /= void then4 n! M# Z/ Q6 ^8 E+ f
@.Destination.NumReservation :=
9 j' r; K3 h# w. y @.Destination.NumReservation + 1;" P% J) S/ s7 l% k
end;
$ h# L; l4 X! L" m) B" p9 } @.CurrIcon := "drivingHome";
% y5 y( U3 E1 z @.DrivingHome := true;- n! ? d1 G6 K
end;% @6 ?' [9 D5 ~( j4 K. S
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. K0 p" T6 l/ w: i8 Q2 D" r part := @.transpOrder;/ o9 q$ w9 V: x' D4 E! c
part.move(@);-- load part
4 O, b1 c. }% \ @.CurrIcon := "load";
' Z% \) B/ E8 O. j- N GlobalDistObj := part.globDestination;
. T" ]4 N; g$ @. [+ F4 D/ M4 _/ [ assignLObj := rgmanager.rgAssignL;* N( j( s8 B6 \& u: \' U" q! _
row := assignLObj.getRowNo(GlobalDistObj);
- E, s/ v. ?$ x: v3 d( y3 A! o: I if Row = -1 then -- since 70% p% Z" t# Q6 `+ `
if lan=1 then# C5 b6 ]4 e) n& s" {/ |- ~1 B. A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 Z9 m D1 S* V4 D4 s" |. x; @
to_str("in der Andockstation: \"",?.~.name,"\""));
2 w6 B0 ~# j" @/ i6 l else: s+ ]" G, ~! a* g7 ?. r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* n0 d2 J" Y8 ~5 |6 C1 m$ y5 l! ?, { to_str("in docking station: \"",?.~.name,"\""));
3 C, ?# c# R- r; |5 d0 K( n end;
9 [: j# ]% l1 |) C else4 O3 X# G* {. U9 g/ x
@.Destination := assignLObj[1,row];* W1 f9 o2 L( D
end; - G* H9 \$ t+ S
newDirection(@);
5 q7 b" r" ~0 K8 Q& a4 `8 T9 P @.HasOrder := true;
# l" o& D; B! {" i6 ^ end;- u6 ]9 Y$ k# M8 x5 L! f
end;( C$ V+ z1 C+ V }
end; -- of the method$ K2 T3 V1 c0 u
|