/* called by: entrance ctrl of the object 'track'
& y% L; M2 Q# s1 D6 H*/9 G: t7 Z3 ?! F- z* \, k$ U
is
: F B% y/ v! t( M2 n$ y part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 M9 f% ~0 Y m+ }
do
& ^! \, a* l2 c0 l! U5 } Lan := rootfolder.Internal.Tools.AOLlanguage;2 h2 z2 m$ Z6 e5 p" {
if current = @.Destination -- else return# X7 o$ {$ W+ _4 Y i
then
2 @& D$ b& Q$ m4 g @.Destination := void;
& \* [( m; I4 Z2 i- T& z if @.occupied then
7 ?" p: G3 l, Z* T c; b+ o part := @.cont;. s- _3 n! s# m, Q+ ]- k
@.transpOrder := void;
0 S8 N$ G8 H. ]! x) f, n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' W+ x: ^3 }& R1 Y! j( E5 C& f @,root.eventcontroller.simTime);
& z: v# F4 N& r- Q9 F# K @.HasOrder := false;% ?* S4 B& a1 k/ J% h R
@.DrivingHome := true;" K2 Y5 P8 }( c+ n/ }$ b8 z/ L; ^
rgManager.tryToStartTransOrder;/ {/ I2 y) `4 V$ ]# K1 Q3 x
if @.Destination = void
- H3 _4 S& Z7 D6 V then -- no transport order for vehicle @0 h0 G q' D# _; u n: V' |
@.Destination := K+ A* w- v$ | p8 A* f
rgManager.nearestFreeStation(@,track.~);
7 v& N9 j5 c% }" W8 j- ?" b* J newDirection(@);
1 K, |4 J7 s$ A if @.Destination /= void then E7 Y) ^. v! u1 j; {2 j4 N2 T# n
@.Destination.NumReservation :=& d: t# o# K* \+ t
@.Destination.NumReservation + 1;5 h. w) Y I$ D
end;
; ^; g3 [, W H0 i( R8 l( K @.CurrIcon := "drivingHome";/ j0 I; @: P6 I& _* U
@.DrivingHome := true;1 C9 T0 H( F: Y2 S* V+ l
end;" a% H' R3 @ R: L( ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
b7 G4 D R' t4 H: r: X part := @.transpOrder;6 d. W* x0 h) w- e5 X1 [
part.move(@);-- load part
" W. E# y/ g) @! O @.CurrIcon := "load";- u9 G* r* y& d# O
GlobalDistObj := part.globDestination;
7 J1 d+ `% E, O( ~& _# F: V+ Q1 u assignLObj := rgmanager.rgAssignL;- X; {0 k0 v2 g! y: s
row := assignLObj.getRowNo(GlobalDistObj);
% e' I w2 P2 W1 j, X" r if Row = -1 then -- since 70
6 l+ ~) N: q1 I" K1 h if lan=1 then1 f* K6 \) {) V; F7 ]6 U% d
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) `" t, h. o* a to_str("in der Andockstation: \"",?.~.name,"\""));
2 n4 s) I! Z5 [8 O- k' s: [ else
{6 n5 U: d9 t! G; a2 j promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) k$ f! n: O* d# \; o to_str("in docking station: \"",?.~.name,"\"")); ; e6 j4 ^" f; T: ?: z
end;
4 D. T# B9 y5 A5 | else
8 P. ~* a" d9 C7 v @.Destination := assignLObj[1,row];
+ A# J) ~( b+ l+ z end; ) t9 Z/ N! b0 A
newDirection(@);) O0 J3 b; |7 o$ `( m9 g7 C; ?
@.HasOrder := true;
, g- [2 M% _% o$ y end;
3 X$ e7 [# W- n# a1 i4 _ end;
9 d: d. Z3 D9 e8 F5 Wend; -- of the method: T/ ?+ O! Q2 x `# n
|