/* called by: entrance ctrl of the object 'track'
: S" Y$ t& B/ Q& d8 v7 }*/
& r6 d1 ?: H7 _* [is" z" G8 E# x7 J2 _' N& Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 U; ?) ?! d3 K* ~do
2 p& ]9 m" M' @; H. W. s2 @" m* H Lan := rootfolder.Internal.Tools.AOLlanguage;4 }- w w8 y! O+ T7 W
if current = @.Destination -- else return
5 P+ x9 w% J; J* Y6 B# U then# _) W7 S8 P& x. {
@.Destination := void;
5 R4 t0 ?5 @! {9 I, }; B& _# ]# a" ^ if @.occupied then+ v( S& p, l! }
part := @.cont;
& |9 U4 Y8 b! O7 m# P% n3 Y* d @.transpOrder := void;( z# g' s$ B; L* F. E9 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) R) z. ?5 {: c( Y5 I4 {9 h
@,root.eventcontroller.simTime);
. w5 s: K6 [9 L, r4 f# K @.HasOrder := false;
2 P& B2 @7 D3 E @.DrivingHome := true;" o* G- J8 n5 y I9 F
rgManager.tryToStartTransOrder;$ P+ E3 P* l! c( [/ S: ~
if @.Destination = void6 s; X1 u' Y0 T6 h
then -- no transport order for vehicle @4 ~' R. K+ p7 `# j
@.Destination :=
$ U: @7 _& o* A4 @( y' U rgManager.nearestFreeStation(@,track.~);
5 C0 A& D( w5 X) ] newDirection(@);
" H i( [7 j. I3 X if @.Destination /= void then6 Q4 c1 [7 y( D! A( A4 _$ R
@.Destination.NumReservation :=+ E" B4 u1 o6 f- h. W2 K' j* K
@.Destination.NumReservation + 1;
4 T4 P6 Z1 Z }9 s& p1 |5 N end;
( Y8 i3 F1 w/ [. y2 F- _ Y$ t( R @.CurrIcon := "drivingHome";" x. X2 K% Y) u n* _! E8 l
@.DrivingHome := true;
& c' y3 V& @% `* @' p2 W- ] end;
) X5 M! J* Y. ~( H7 }' ~ else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 m, ~8 q4 ^$ l# i
part := @.transpOrder;4 D r/ a1 n& o( T' P* M9 P
part.move(@);-- load part
0 `3 ]/ y' k; D @.CurrIcon := "load";
- D4 Q* F! u2 A6 I GlobalDistObj := part.globDestination;4 G$ ~; ]( h7 f0 @6 w; D7 z0 K* O
assignLObj := rgmanager.rgAssignL;
' a% g6 T L$ H5 n& s row := assignLObj.getRowNo(GlobalDistObj);( u# M, R" ^6 F7 i$ d0 W
if Row = -1 then -- since 70
7 s5 {% v, R8 M if lan=1 then
. s2 y& E2 T- r( o: s promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: d6 Q: h' V! D to_str("in der Andockstation: \"",?.~.name,"\""));* e$ r d8 M2 |3 P) G
else! j8 s$ r% N( U* K$ Z( R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) D' w, E; A, _" E9 W; D+ n
to_str("in docking station: \"",?.~.name,"\"")); " o4 J4 J+ P/ R; J
end;
" `6 H7 U: |; L. S/ L! H else! B0 ^$ y9 M9 u: m5 x) ]3 K
@.Destination := assignLObj[1,row];1 j% _& w6 S. R# _9 O
end;
& [) V9 J2 C+ p2 r2 ^+ H E newDirection(@);
0 s8 p3 l5 J F& w @.HasOrder := true;
E4 D" C* J2 `3 b( T6 D) T" i* ? end;8 ?, [5 d2 E t$ h$ Z% m0 V
end;; T, w( Y9 m6 v/ C9 @/ J
end; -- of the method7 q" o, c: A" z/ U& |: }7 P
|