/* called by: entrance ctrl of the object 'track') h: s: d4 v: V* h
*/
# Q4 `9 m6 I$ H3 q0 R: a" \( K' [is
/ B' E& o$ [6 v4 }* Z8 D7 Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 ]) D% n% V5 F6 Vdo
1 P' |/ V4 T0 l. g Lan := rootfolder.Internal.Tools.AOLlanguage;' `7 }: B; C' D* ?. B$ a
if current = @.Destination -- else return( b0 @* z' Z% I' y9 j
then
% | I: l8 a0 \* ]# R: F: O* L @.Destination := void;
, s0 L$ e5 K. X+ I/ ` k6 z, H if @.occupied then
! X5 I# h1 P& ]7 `9 o, @ part := @.cont;
! B% e" ?$ g0 A& r @.transpOrder := void;
5 G! q* T% K. V( \3 @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, z' N3 V: |- O+ m7 L( _2 ^ @,root.eventcontroller.simTime);
8 Y. k8 C7 u' j% \ j3 K @.HasOrder := false;5 w+ i5 s; L9 w, g
@.DrivingHome := true;$ t t7 ]0 J4 K @0 {' i$ {% P! \. ?
rgManager.tryToStartTransOrder;
, }6 p s' K. j6 ]) A if @.Destination = void2 X! H( ?% }- o0 G' i2 f0 p
then -- no transport order for vehicle @: M1 ^. h- h0 @% x \7 ^
@.Destination :=
( a: `' S0 K( z# @6 K; ^0 C rgManager.nearestFreeStation(@,track.~);
! Z6 N( x- ~ c! f newDirection(@);
7 {4 u" d4 \/ W, y1 `3 y7 n if @.Destination /= void then$ H7 _ H3 ]+ X x$ x' @+ e
@.Destination.NumReservation :=
" H( B, P! C4 o. ~3 p @.Destination.NumReservation + 1;2 m. r+ T; Z+ U& Y9 k
end;
+ E% o' a3 I0 D; q9 u+ X @.CurrIcon := "drivingHome";# {9 H$ W( y6 j4 Q) @: Y
@.DrivingHome := true;9 D6 d5 M4 o$ z' }" L! @, C
end;
3 h( p$ b! z/ t7 M9 J7 Z+ E else -- the vehicle @ is empty, both vehicle and part are in the same dock station, D" L4 G3 T$ I m' p2 E m- \
part := @.transpOrder;
7 D h: G' p9 x0 b F" ~4 b! D part.move(@);-- load part( i+ k, e8 ~+ a
@.CurrIcon := "load";
$ x& f. F$ U+ E0 P# y GlobalDistObj := part.globDestination;
8 P. x9 \- b" Q6 _0 `) o( F assignLObj := rgmanager.rgAssignL;! n6 g/ {# o: Q2 [( N4 W W6 ]
row := assignLObj.getRowNo(GlobalDistObj);
) ^- x9 \$ t1 D) k' d if Row = -1 then -- since 70
4 J4 V% `, L% Y% y! V8 z6 b if lan=1 then
4 `+ y; Z: S* ~- ]# D3 b promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. @. }! R& x6 q! I+ j
to_str("in der Andockstation: \"",?.~.name,"\""));
' T/ n% _2 X' N* Y$ F- r else& o+ `- K! I4 J5 i/ I
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- S1 F) }2 ~& | to_str("in docking station: \"",?.~.name,"\""));
' [, d+ W" W$ _, c end;
3 `* p7 h/ m0 q$ X: L( c2 k/ x else
- Z1 t% @& j2 D: f8 H9 G1 @# v @.Destination := assignLObj[1,row];
$ t# U# w W* T @ end; 5 g6 P+ o3 E$ {$ _' s( v: W
newDirection(@);5 F2 L9 k/ \5 W
@.HasOrder := true;( k6 K# U& c6 G" J b; W
end;
, A$ h. U6 D5 j% K: t/ \6 y$ O& ] end;) \1 u4 S5 K& o5 C! T+ \! j2 h( @8 ^
end; -- of the method
: Y1 `; O" I' x/ r/ U2 J |