/* called by: entrance ctrl of the object 'track'! p" {) F1 {- m- Z+ F" R* v
*/) L, F, A- n- z/ f7 b
is- }& q$ Z/ E. k8 A, C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 I! i. V0 k" ~- Ydo
( N. T( M, v8 C% N/ m4 q" Z Lan := rootfolder.Internal.Tools.AOLlanguage;9 K3 @ d! g* w. {0 s
if current = @.Destination -- else return2 b" Q5 O5 C: l) @; r3 b
then6 o+ d* P+ m; P+ ]1 n
@.Destination := void;
) l' f) W+ W/ K5 l if @.occupied then5 e* [: [- ~1 j# ?
part := @.cont;
) z9 }4 o+ B/ P( s, s7 ^% [5 S @.transpOrder := void;# | w, r2 y3 M N8 S* l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, N' e8 K( Z# K8 t8 f4 G2 A. J @,root.eventcontroller.simTime);! Y, i- t( Q9 E) |, c9 y
@.HasOrder := false;
# ^( r$ x% }5 b% u- ~" I/ y8 y. |) | @.DrivingHome := true;+ T+ i" a+ k$ @% y. Z- F- \
rgManager.tryToStartTransOrder;1 O; M" i# f5 o5 L4 \2 I) u9 M' h
if @.Destination = void
2 _5 r' z9 m: m6 ?2 u& l% D2 c then -- no transport order for vehicle @ Q8 m F( ^3 C3 Q) B) E
@.Destination :=2 m' O2 ?! ~1 L! | Q2 d6 s
rgManager.nearestFreeStation(@,track.~);
* a" F) a) Z. R! @0 R& i5 A7 U newDirection(@);
5 Y4 y/ E4 `, Z& n% f5 D if @.Destination /= void then
R( I, E+ M7 c& Q; C- S+ [ @.Destination.NumReservation :=
$ k; }9 O! S, E) d0 m. ] @.Destination.NumReservation + 1;: b" i5 e/ Q1 w% F3 F8 y
end;
2 T R I' A8 J1 X5 T @.CurrIcon := "drivingHome";* f1 y9 o7 N% h- }& a
@.DrivingHome := true;
8 J- {. Q/ M; X2 i, x: X) G1 k end;
; d; m6 }2 Z$ f; ^ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
, e& i% x& E+ [6 L8 F; D part := @.transpOrder;
$ p4 t, t8 w0 U2 Q: a; }! j1 w part.move(@);-- load part
. Y$ t& |2 s. n, N- ` @.CurrIcon := "load";& f L B! E3 _, d) c2 V
GlobalDistObj := part.globDestination;9 a* `# V9 V; {! H9 s
assignLObj := rgmanager.rgAssignL;/ |" h2 h6 ?1 J4 |7 ?* q% Q
row := assignLObj.getRowNo(GlobalDistObj);
1 K: K& [# U/ r. b1 b4 J- g if Row = -1 then -- since 70
* H5 x& [) |$ E9 N3 G if lan=1 then
" D; Q& ], ~4 x% v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 R. [& H* [% c4 H to_str("in der Andockstation: \"",?.~.name,"\""));$ `1 _0 [6 M. h' ?
else0 g7 D$ _7 T) y, Y+ J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 o. l; F2 T4 \5 V
to_str("in docking station: \"",?.~.name,"\"")); ( g% m) L! _/ y1 o3 R/ C# U! q
end;: V' F- H* j& I- |
else
& m0 i& [0 j0 g, r; s2 c, {' a9 ^ @.Destination := assignLObj[1,row];
+ ~) i5 j# p+ p5 m* m end; Q; U' [+ o3 ~3 B B: x$ Q; x
newDirection(@);; |9 q4 X8 h2 R" Q$ y+ x& n
@.HasOrder := true;- ~, s3 F }$ c) Q1 \& E
end;3 @( u5 w! ~* P+ L/ g2 R
end;2 }) z$ I( F/ }: J
end; -- of the method
/ E" y: r8 o9 ]% ~6 i2 G |