/* called by: entrance ctrl of the object 'track'
6 Y2 h6 v1 e& E' `: F*/( B" P6 b* N, f. m0 T I6 o
is% z A2 {% h) ]% E. G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 w4 W( R0 l6 \7 ]
do# R6 O# v$ N1 | S4 q4 b% {0 H, g
Lan := rootfolder.Internal.Tools.AOLlanguage;3 Y4 d) H( h7 { V
if current = @.Destination -- else return
0 `- `( w( p6 u5 h( u! \" Z4 l then
! @3 e* J" W/ ]( l2 O @.Destination := void;9 p8 m" T% N2 _. \
if @.occupied then4 \: [ q% v: n. l
part := @.cont;
) \0 l& A' g. w) G' V @.transpOrder := void;
8 L/ g4 n/ a9 ~& W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 l' D! a, S/ a+ k( z6 W @,root.eventcontroller.simTime);
( }$ E6 a: T7 }8 w @.HasOrder := false;/ v& R2 I% I6 j2 N: r c& @
@.DrivingHome := true;
& ^# U% U$ F+ m, D P Q rgManager.tryToStartTransOrder;, l. U$ X! }9 I4 F
if @.Destination = void
! u# K9 t% }4 z then -- no transport order for vehicle @1 K$ I( ^; d. S5 z" z
@.Destination :=' x1 V0 T+ L% T5 J& L; k
rgManager.nearestFreeStation(@,track.~);
5 S+ F& R: j6 L newDirection(@);
# M; Y2 i/ ^. v% \& I if @.Destination /= void then
4 p& ^6 q9 }2 J& c, N @.Destination.NumReservation :=
+ u2 e* { u2 { @.Destination.NumReservation + 1;3 x Q% d$ {9 g' ~: u: _$ ~7 L( n1 a
end;
" |/ T8 B- c! b3 @ @.CurrIcon := "drivingHome";
s1 O4 `: l* T2 W9 a @.DrivingHome := true;! Z4 `' m. _1 Y" |/ ?. Y
end;
4 }4 Z/ {) ?- _ J else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 ]% b C4 e" ~
part := @.transpOrder;2 H3 y" X& ^0 x3 T$ k ~/ q1 b7 i8 _
part.move(@);-- load part& l% @6 |! E+ C% q
@.CurrIcon := "load";
2 a. |6 c% H6 y. r GlobalDistObj := part.globDestination;$ h3 q P, ~- k9 ?6 c) v. D
assignLObj := rgmanager.rgAssignL;" j2 A( [( p9 e$ H3 ?
row := assignLObj.getRowNo(GlobalDistObj);
# X& r* w5 w" _& X; a if Row = -1 then -- since 70; o J/ J& f! h# c. i6 R6 _1 g- p
if lan=1 then
6 |* ?- @' ]6 b+ v, ]; _ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% f+ U% b* x0 v( {: n to_str("in der Andockstation: \"",?.~.name,"\""));
1 M' L/ l1 E7 U* s% t else* W# ^& m- M4 V1 }1 [: T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 P; f" M( T, _, E; Z9 l- H+ x to_str("in docking station: \"",?.~.name,"\""));
# D* R; q: [5 D6 g; \ e end;
5 H" M9 X, T# J5 ]% v else
( G r) J% T1 B4 }$ V3 p' V @.Destination := assignLObj[1,row];
1 I% F) M4 \5 F& D. h/ F6 \ end; ; i0 R6 D& s& a
newDirection(@);
1 D3 E: e9 s- E @.HasOrder := true;
7 L. a- \3 I) U% H9 X' Q end;3 f2 h* _$ h1 I7 }
end;
' L2 P# ]! v& eend; -- of the method
, h# l. K" `/ L6 z2 ~ |