/* called by: entrance ctrl of the object 'track'; R2 t" h, j. @6 N& f
*/
- k' u0 N; o) O; }- Qis
% ]% j. u; Y9 ^! Y$ u& }0 t4 P part, GlobalDistObj, assignLObj:object;row,Lan:integer;; Z2 \! a7 ?3 a3 G
do
7 c$ \7 z9 d& G1 i8 p8 @% t Lan := rootfolder.Internal.Tools.AOLlanguage;
( s. h3 t3 r; S, W9 A/ n if current = @.Destination -- else return t8 X! w5 h# O
then6 W- Z# f( y/ g/ o4 w5 @
@.Destination := void;
7 d" w; Z }) i if @.occupied then6 D# T+ I- X; G; N( ?
part := @.cont;
* g* ]. C$ N9 J5 M2 J1 a1 c% x* y @.transpOrder := void;8 v7 X! x" }6 S. g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# O4 T g. }6 ]
@,root.eventcontroller.simTime);
" E) N3 W+ D3 H7 e @.HasOrder := false;
% b% ~( d3 Q# z! Q, a+ ~$ K) k5 P3 ^ @.DrivingHome := true;+ W, F" o0 S( i0 j9 N2 b' N4 U
rgManager.tryToStartTransOrder;
# X6 r& b) v; D+ g if @.Destination = void
+ ~( M( N5 q5 {9 a then -- no transport order for vehicle @
: P. X& N6 [% t5 `+ ] @.Destination :=
3 E& ^( x! @" k! i6 I8 p5 } rgManager.nearestFreeStation(@,track.~);7 B2 ^5 E" ~& a+ Z
newDirection(@); * ^& `' s: _$ T9 H W& M
if @.Destination /= void then ~9 Y, B5 z! Y0 ]
@.Destination.NumReservation :=5 W# I ?. Y- W6 U, I
@.Destination.NumReservation + 1;
9 B% L; F- o0 G T: n end;
* s. l( @3 _; e7 [ @.CurrIcon := "drivingHome";
+ U' \. [8 Q: g! U+ |: [ @.DrivingHome := true;3 A( x; h2 R+ O0 r# I
end;
( C t5 |- w9 Y" P/ p else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* X2 d* N' ]3 v; s7 j2 ^ part := @.transpOrder;7 S! h9 ]: b# z5 l6 O
part.move(@);-- load part! {& @+ ?3 P; V P, O2 q+ p, {" O
@.CurrIcon := "load";8 V4 s2 w& Z7 e4 G' R8 @5 \8 v
GlobalDistObj := part.globDestination;
* ~2 q- Q# P1 z( d6 P assignLObj := rgmanager.rgAssignL;
2 g) @% Q$ H) h, m, q$ G row := assignLObj.getRowNo(GlobalDistObj);
* i- m) `( p+ y# O- \8 G if Row = -1 then -- since 701 V& Z, L; j* r! A' L; l. a2 ?+ b
if lan=1 then
: `4 a0 p' G/ r# [! |6 n \/ S3 ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* i$ m3 z6 _: [4 V( A2 z; K to_str("in der Andockstation: \"",?.~.name,"\""));
& n1 `' [# ~4 |( Y- L2 y+ h else
8 M- A2 x, M2 ~% b, [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- w, T9 l9 e2 ]5 w( C% F5 `% n
to_str("in docking station: \"",?.~.name,"\""));
% f- D+ T( ?- e" i7 |4 i+ n: ] end;2 q v( X+ t, u; v3 _$ d8 `* {
else; ^) V* {- B0 @' m8 h
@.Destination := assignLObj[1,row];1 N3 ?4 G/ [( c: ^! Y1 K
end;
( R9 Q3 I7 g6 }2 @- T d2 x newDirection(@);
9 T# ^9 h8 f" Y( z @.HasOrder := true;
; F" `5 Y2 B( K/ d) {' c$ e; q end;
+ y* S9 e- i8 f' | end; O* d( x9 N3 p) ` j
end; -- of the method
9 u/ m* N. I/ J |