/* called by: entrance ctrl of the object 'track'
3 H6 P- y" J, ]3 T5 O# y*/3 c; }, P c! X8 @
is# ~, D! n8 w( u7 B2 m/ s2 f0 C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 o- ]/ y: B. P3 K! l7 ?
do6 C7 J6 @& @* W) Z
Lan := rootfolder.Internal.Tools.AOLlanguage;
) }" j& ]0 b- J/ ]( j; J5 @/ W Q: O0 C if current = @.Destination -- else return3 z# t$ \7 ]- A/ g/ R& a1 Z
then
0 ?9 p0 }) {* L) D( t @.Destination := void;3 t2 E/ }; O2 D; L" T- i6 L3 X- r& {1 }
if @.occupied then& u# c. A5 \6 E
part := @.cont;
# r) u! x/ h5 l' B, W @.transpOrder := void;
; r' o% ]" O: O6 A* o+ N! H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- ?9 F4 M. S$ ?2 @* a6 Z E/ Y4 ? @,root.eventcontroller.simTime);
% o% T8 g4 _3 L0 P& m; Q# t# \* L @.HasOrder := false;
6 v; K+ |- c) R- n# {8 J4 d/ @( e @.DrivingHome := true;+ U( q! P( L$ p* x4 r
rgManager.tryToStartTransOrder;
+ n! N2 x( u) x' ] if @.Destination = void
9 W4 \7 I" a2 C0 U: k( | then -- no transport order for vehicle @
8 o! g U( E2 ` @.Destination :=* e3 t \& B+ A1 [4 m- b
rgManager.nearestFreeStation(@,track.~);
* h/ j3 F: s( n& s newDirection(@);
" x8 k2 K8 ^3 J4 h: [ if @.Destination /= void then
+ \% u: K: t& R# s @.Destination.NumReservation :=
1 E8 j4 B0 ]0 ]& Q. o8 ^ @.Destination.NumReservation + 1;
& Z1 a! P3 }' T% p4 p end;, B9 o! l" y' {* p
@.CurrIcon := "drivingHome";
% Z6 G) i: X' Y" G) d2 M( N/ ]" m' \ C @.DrivingHome := true;
h" h+ R* A+ t! l/ Y end;
$ u9 N0 i1 y" c A7 B v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* ]) L0 C% s: U part := @.transpOrder;
( v N, ~- u# m1 F6 \ part.move(@);-- load part) Q' F; R( n$ s! Y0 S
@.CurrIcon := "load";
: y# S0 H) E0 @4 a3 ` l' Y GlobalDistObj := part.globDestination;
! c2 q4 `4 H9 A' }2 ~ assignLObj := rgmanager.rgAssignL;
3 q! O6 R5 E" T row := assignLObj.getRowNo(GlobalDistObj);$ E3 r0 t) X y6 j3 j: p# m
if Row = -1 then -- since 70
9 t$ x+ [) T) r if lan=1 then7 u; ?2 B5 w. n/ [" V, T9 v
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. e/ I' A+ D! \2 X, a4 v, z, Y* v
to_str("in der Andockstation: \"",?.~.name,"\""));
2 y7 {2 b7 o7 _: B. m9 _$ O else
, v! W4 i- T2 T# [' @0 o( r promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- a/ Z& `* l8 Z5 x' @7 C
to_str("in docking station: \"",?.~.name,"\"")); 1 w# W9 q- p' z, D7 i6 k q: e! d
end;4 T9 O# I& r6 A6 L# X% J% Z
else
7 ~4 N" ^7 h# f0 Y x @.Destination := assignLObj[1,row];) a* c% l+ q' Q* Y8 ~
end; : n" Z1 I2 ]: C7 ~
newDirection(@);
0 T$ T) J3 l1 g2 u& s% l1 p @.HasOrder := true;
9 a. D, w# h4 h! s6 n: W7 Z end;' {: Z, Q4 ~; i5 o& f. M9 I
end;
5 Y @4 a8 F0 ?* R2 o6 P8 Lend; -- of the method
6 ?; t6 B' c7 E, C |