/* called by: entrance ctrl of the object 'track'
* n6 s4 \, N. h*/$ ]/ D7 Q4 x1 x( V0 F. ?
is
2 A# d3 Y% L4 k2 \: I1 O; d part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 [; B$ D5 P2 N# y9 ^
do8 \' S. [# L% c h2 ~
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 L; Z2 c* f: V) ] if current = @.Destination -- else return. Z+ _: f" E5 `* f$ u# g7 c
then3 A# c8 r+ t8 A( ]$ J1 D
@.Destination := void;# ]/ l; {2 o; A5 f
if @.occupied then
9 ?) j/ X7 ]. B) d' H' x8 | part := @.cont;
1 H4 I6 q2 H I' [' c @.transpOrder := void;: d" R1 b( y% P( q# l0 `2 x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: Q* Z( X9 E& F, T @,root.eventcontroller.simTime);. N; G5 N, F R% h
@.HasOrder := false;
4 [! ^% S+ }1 p, I @.DrivingHome := true;
/ l" G6 @/ o3 Q* o rgManager.tryToStartTransOrder;9 n% d3 y; X6 m4 q) c, k
if @.Destination = void3 q% b1 |: T2 t4 D
then -- no transport order for vehicle @+ x1 ^! S$ x$ H0 T
@.Destination :=/ d% O$ g; ]% |0 M. S$ [% J0 J. e# e
rgManager.nearestFreeStation(@,track.~);5 \3 D' d- X2 O& V
newDirection(@);
* r; V0 T) o; c& I# |+ _ if @.Destination /= void then
! S" x8 ~4 X# G1 Z @.Destination.NumReservation :=, Z4 }- ]' T0 }' s
@.Destination.NumReservation + 1;
) {5 O) r: r) S8 g! T1 I8 @0 m _ end;
% U4 b* \$ [1 B! m @.CurrIcon := "drivingHome";; b9 h- x$ b6 `( P
@.DrivingHome := true;5 l% c4 h- t6 x5 H7 c
end;0 L- Q" E0 u! a" x
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 \5 k0 b* \+ @4 M& I( a4 _! X% L) z part := @.transpOrder;8 Q) G( }; b! E# o; D' _
part.move(@);-- load part+ F/ |3 U" x6 {% W5 p+ S
@.CurrIcon := "load";( C! C% ^; X- G" g
GlobalDistObj := part.globDestination;
$ I$ ]6 E4 O2 a* W4 S assignLObj := rgmanager.rgAssignL;8 k' {: g4 G4 q6 G5 S# {
row := assignLObj.getRowNo(GlobalDistObj);
* m9 f8 X4 N$ p# V, b$ m if Row = -1 then -- since 70; N* V, M3 v6 Z$ c4 B. m
if lan=1 then
- c+ R, k# `3 ^9 U* H7 b' K3 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# u" d2 { l4 o7 @' I
to_str("in der Andockstation: \"",?.~.name,"\""));
& U( [! c8 K0 J" b+ L4 Y else
+ w0 ~( Z& ~2 i: b# ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; N: [: I6 G8 }/ n* n2 [/ g5 Q to_str("in docking station: \"",?.~.name,"\""));
/ {, m) w! d5 P. r( X. j4 d end;6 O; {9 G$ D6 T5 y6 n ?1 X
else
' a9 l0 C) T3 b& D3 Y9 G& D% ~( | @.Destination := assignLObj[1,row];
]1 ?! i0 J: C end;
0 Z& \0 q, W1 B9 a newDirection(@);! U& H8 G0 B" X' [2 S$ P
@.HasOrder := true;" q! ^; V% i# g
end;
2 p% l, ~: C' k3 P3 L! O end;' l+ W' N* [" A* I; |3 w
end; -- of the method$ D2 [. ]( z% ~6 i
|