/* called by: entrance ctrl of the object 'track'
( \6 j& p% C2 b7 r: a- A*/& g( U7 j' \/ X4 L' A' ^9 ^
is1 n, w$ u- @% X8 X& N( s, q# P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" B: u5 M, @& H( j9 ~% _) A4 A0 Fdo
( e, K$ a7 A/ O7 x |& @ Lan := rootfolder.Internal.Tools.AOLlanguage;
, P2 @, @ E/ T) | if current = @.Destination -- else return
* d* y6 a& ?+ l" E* F then
% l9 ^! D! t& C4 O. J. q/ u5 r/ h5 V @.Destination := void;
0 v& l# ~3 `7 T7 G, m, l# S if @.occupied then; ]/ V+ c h S
part := @.cont;2 N4 ^. h, s7 q1 g- n+ I! o5 h
@.transpOrder := void;
7 f* |, J% v4 m" j/ ?& Y x; R$ M6 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) [. L3 u" h Z {4 u @,root.eventcontroller.simTime);
9 W; ?/ Z3 N& B9 S0 _3 @, F @.HasOrder := false;
" T+ x( c, V- g, l0 R! W% ]7 L6 D8 M$ v @.DrivingHome := true;; V& n. ?, F+ d/ |5 R2 _
rgManager.tryToStartTransOrder;9 u {0 A. R' ^- |3 O& j8 W
if @.Destination = void7 ~0 w. b) V/ g6 e5 i% `
then -- no transport order for vehicle @
, v U+ T( t/ @ @.Destination := y. v8 S* R. U0 p0 N: {$ E
rgManager.nearestFreeStation(@,track.~);
( h; l) ~4 z) ], X4 y' j; N newDirection(@); , R; l; C" B7 Z" X
if @.Destination /= void then8 a: I+ \4 P, [( u7 x
@.Destination.NumReservation :=: c+ _, P6 Z, v/ c
@.Destination.NumReservation + 1;3 U1 s( |: e) w* }5 d
end;
' T; `/ H/ E2 Q/ n4 Z& Z @.CurrIcon := "drivingHome";/ k0 w( o( d0 F' n' p
@.DrivingHome := true;
" l8 `% }' `8 j! Q' }* `2 n end;
- R( B# c! d) R else -- the vehicle @ is empty, both vehicle and part are in the same dock station" I3 k, D; D4 j* c% Y! z. V
part := @.transpOrder;% w" i+ N+ k. K {+ `/ J2 e
part.move(@);-- load part
/ X1 K! B* [3 @/ \, L- i3 s @.CurrIcon := "load";- [* |4 b+ \* S+ q% P# V4 R2 \
GlobalDistObj := part.globDestination;
2 k$ }- ?! q* E. P$ x0 D assignLObj := rgmanager.rgAssignL;3 {: l/ Z( e ~" G& \ m" a
row := assignLObj.getRowNo(GlobalDistObj);
8 Z0 s# l2 f# {0 d5 u$ ^ if Row = -1 then -- since 70
0 [( k" ~7 R2 k* \* n8 h if lan=1 then
9 }4 _2 V0 v! e* ~9 i, [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 _$ a4 c6 {! o; F$ T/ B
to_str("in der Andockstation: \"",?.~.name,"\""));
! B9 @% A2 | `3 C' i else
2 p- H* p: A3 _2 y' |) _) ~( b) r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 x/ C1 `2 y' a; q to_str("in docking station: \"",?.~.name,"\"")); ) R# A2 v% T3 n( X
end;! ^7 N# ?1 [6 {1 t. V
else- t8 y; J: h% n$ _; x
@.Destination := assignLObj[1,row];
6 t6 e1 g. T% Q/ ~ end; 7 s- E/ z5 U$ a2 t' k0 T7 o
newDirection(@);5 b U) ]# h2 J( E& E
@.HasOrder := true;
$ T9 O; Q- H- J# B end;
( D- T% s! s8 I: h7 w' ]8 N end;, y. }/ Q1 n, D6 g8 J6 K3 \
end; -- of the method3 r8 D, j8 f; c, v8 L% A; [
|