/* called by: entrance ctrl of the object 'track'
+ I$ A, q9 K# g" K- N*/* P/ a+ \9 Y- ^- B) i2 f6 N
is2 l* T5 k+ R$ Z/ e- w) v
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* y, s6 ?' \7 [. R: j% W8 n
do
. W! j4 R8 v) T% `* ?2 i Lan := rootfolder.Internal.Tools.AOLlanguage;9 |- v1 u7 X; b/ T: d3 H1 X
if current = @.Destination -- else return" Y c3 v4 \* ~7 s
then, H1 d/ }; g* e0 R _- P# Q
@.Destination := void;
! E( M, F( S8 _# ~; f& } if @.occupied then, e5 Q# r N5 [' m* y9 Y1 W
part := @.cont;
% Z# O0 c% O/ y Q- |2 ] @.transpOrder := void;/ j0 ^. H" S9 ]: Q( q$ h
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ |$ I" d( Y& J8 B8 |
@,root.eventcontroller.simTime);
0 H7 R/ G8 l/ B" F" D8 Q0 V @.HasOrder := false;3 g$ e$ x& |# ~- E7 ~4 G) O* a* q
@.DrivingHome := true;2 H( j0 t) a$ U* j
rgManager.tryToStartTransOrder;2 f( c7 X4 P! \
if @.Destination = void# A5 |/ d: A& C. T# a5 ?% ?, {
then -- no transport order for vehicle @
( W$ b2 h( s8 L( l, D2 o# f @.Destination :=1 g5 l/ { y+ E( v9 l( S
rgManager.nearestFreeStation(@,track.~);; A# q* A* Z+ _! j T u% Z
newDirection(@); " L9 ]) E' ^; Z7 f9 X! c
if @.Destination /= void then5 Q' P4 V/ J+ a
@.Destination.NumReservation :=
: L+ E X+ U9 @4 L' [7 v | @.Destination.NumReservation + 1;
1 X8 V" R' }( q' \ end;
; S% _6 P# e$ D; h% ? @.CurrIcon := "drivingHome";# i; h' W- w/ _$ L4 O
@.DrivingHome := true;
% ? ~+ |) |4 ~( U; ?4 O end;
3 ]- k5 [! U( N& N5 B2 [, p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 W- P0 N2 y2 q J2 ~, y* _0 y part := @.transpOrder;
1 u) F' B: _/ m' i part.move(@);-- load part
3 \- S3 U4 y; E: q' R$ e7 g% k @.CurrIcon := "load";
9 B- |% W: ?# n GlobalDistObj := part.globDestination;3 A! |4 j$ [) i6 U) b. v
assignLObj := rgmanager.rgAssignL;
7 Y9 h: A& j) s5 ? row := assignLObj.getRowNo(GlobalDistObj);
/ W& `3 ~2 x: `/ [- ^& P. ?5 s5 t if Row = -1 then -- since 70
2 m' _3 Y9 L0 E) q, O/ ]) J* N4 N if lan=1 then
5 K J) U. f! |7 d/ r" H- ]$ [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% Y+ e- N; x, H) f* p+ w; X+ J
to_str("in der Andockstation: \"",?.~.name,"\""));
$ M' X3 G- } w* c else
, i( t: l! i, ^" x E8 c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- A+ y0 S: g. H7 m; `4 V to_str("in docking station: \"",?.~.name,"\""));
* x3 Q5 I& }& s E0 x end;0 ~7 L! P" T- E$ P# z$ b
else& |. T8 L: ^! w" T4 }, @
@.Destination := assignLObj[1,row];8 O$ ~* N7 U1 ?+ [* T' e
end;
& p$ e, v) B4 u3 M7 r0 N newDirection(@);
* J S8 W. P G% `. F5 ^4 L @.HasOrder := true;+ ]0 l& @) y. x
end;
! e) N. x$ W0 X5 r T; [3 `5 h end;, p' Z# v% v& t% a1 D
end; -- of the method
5 R+ g& X$ r7 `7 L4 ~# r |