/* called by: entrance ctrl of the object 'track'. Y5 V7 {1 x6 G! W8 b4 H
*/
8 [) E# T! _# o5 o9 N( Y1 ]# z& P7 pis; N8 M6 S/ O% m, o' U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" Z' N( g# E( J5 v. C
do0 f- U; S1 p3 V' g1 B/ _
Lan := rootfolder.Internal.Tools.AOLlanguage;+ q/ A5 R2 W: H" t0 l$ o
if current = @.Destination -- else return
# J R) } A! |+ u8 X: b7 O then
! b# X) u, C8 |( Z @.Destination := void;
+ l$ \" g, g& L/ j$ X: r if @.occupied then8 i3 R% x! }/ {0 }
part := @.cont;
- k# } p: K" m k7 R, y @.transpOrder := void;
4 B, R1 o1 K; }7 @5 l/ s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* ?1 L7 B0 V* a# S
@,root.eventcontroller.simTime);6 M$ O3 o% U/ b" ?; I+ i: Q
@.HasOrder := false;/ V7 \9 }2 O% t
@.DrivingHome := true;. O( U+ k: M8 i4 ^( A5 A2 w4 d7 S
rgManager.tryToStartTransOrder;
/ ~' x& t" g+ k ?0 P- ~* U& Z if @.Destination = void
0 P7 p8 u4 X+ d: i9 H# H( c then -- no transport order for vehicle @
# a q. l0 _8 i1 T; F/ B$ R$ i$ ~ p @.Destination :=
. `; q1 c; G# c3 i/ H rgManager.nearestFreeStation(@,track.~);( g6 M& }: P" r/ [
newDirection(@); ! t3 H( p" _& e& a' n* t$ b6 p
if @.Destination /= void then5 c4 M/ b( C% u
@.Destination.NumReservation :=
8 V, I+ j) M3 z& k6 H: d- e; h/ _* ] @.Destination.NumReservation + 1;
' P5 P1 o+ Q' t) [% z8 H9 F- J$ }1 k) C1 w end;0 F5 \3 ~! ^& ^" j
@.CurrIcon := "drivingHome";7 `% @* V# E8 E! Z' r! m
@.DrivingHome := true;% ]9 w4 c; q, q% Z. X2 O9 f0 x3 r
end;
% t( S- c& n# }& k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 G9 O& N6 g8 n: {& q* j* [7 `# w part := @.transpOrder;
; L w$ s. J4 P% K: U N. R part.move(@);-- load part
) {$ U/ c( ?( b* m5 H6 @ @.CurrIcon := "load";
. z" R; h6 K: C1 t+ |- _/ Y GlobalDistObj := part.globDestination;, @6 E" N1 m C3 c
assignLObj := rgmanager.rgAssignL;" H, k# P! y1 V% Q5 r( x' g
row := assignLObj.getRowNo(GlobalDistObj);
c/ o1 }) s6 g0 x+ i# [. e if Row = -1 then -- since 705 s9 @) V& q! w6 X& H5 w
if lan=1 then
# s+ a% {1 l$ V; x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% _' ^3 @4 H9 n9 i
to_str("in der Andockstation: \"",?.~.name,"\""));, y0 x( r- q* J( g7 P* K h
else5 l' g) U" v1 y p. \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 ?6 o% N3 _% Z
to_str("in docking station: \"",?.~.name,"\""));
1 o- b h# H1 o8 x+ ^. P end;
% {8 N8 g* E% c2 q- h else$ g2 _1 c( L4 m' R
@.Destination := assignLObj[1,row];
6 I6 v3 \ j5 R: p) W+ G2 p end;
$ G! V- |" w1 V- J newDirection(@);
2 s) x$ D5 L+ ?7 z @.HasOrder := true;; ?' {6 @' j# _5 a% M- ^
end;- ^$ N$ Y5 h/ {
end;6 w2 S8 \' l r. f& G- w8 e
end; -- of the method% Y* V `( y: n# t& F
|