/* called by: entrance ctrl of the object 'track'& T6 Z, @" }: ]# a( v5 k- Z
*/
" r- X0 [5 g6 i9 jis) U( i7 B4 o `! b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# d$ a8 L! R* e, G. V$ Tdo( G' ~0 k1 ~7 @+ M/ _
Lan := rootfolder.Internal.Tools.AOLlanguage;# j* p, m( \8 R: }+ |
if current = @.Destination -- else return
$ j0 x( p6 \# f( {0 r9 p( p; o then
5 x/ T; n( y! s' ~ @.Destination := void;6 L0 g$ t4 G- e5 _4 V( {
if @.occupied then. ?* D4 |( D) t* Z
part := @.cont;2 [. o; b: K% k1 s
@.transpOrder := void;' S; h6 L2 ?8 u: P
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 f9 R( s, e9 Z& r
@,root.eventcontroller.simTime);2 ]9 s& [+ i7 J8 P4 ]! F8 ~- M: I0 O
@.HasOrder := false;0 l4 P8 E. b8 E/ {- s
@.DrivingHome := true;
* ]! |) I1 c/ q& n rgManager.tryToStartTransOrder;* Y# S& Y; N% k ~9 i& R, X' b
if @.Destination = void
4 o* Q0 {1 W3 E1 ]5 o& W then -- no transport order for vehicle @
0 C8 u0 ]5 q. Z8 d. ]* }3 e @.Destination :=+ S) i7 S4 V2 x/ d
rgManager.nearestFreeStation(@,track.~);& f0 }3 U& P5 W2 E9 {3 }
newDirection(@);
/ T0 b$ n' ?9 H4 p# h9 w! r if @.Destination /= void then# s& L3 C! b: Z# Z
@.Destination.NumReservation :=. [+ }7 Y! h3 Q/ h% O2 A
@.Destination.NumReservation + 1;, G5 L! b* b/ K0 i$ G4 a
end;
0 o( C" J: z9 F+ B6 k, v; Q. D$ X @.CurrIcon := "drivingHome";
E4 t. F/ v- w& W* | @.DrivingHome := true;
1 V+ p, w4 ~, D4 F0 `1 [" A3 ? end;
2 B& m2 X0 }+ |1 Y" h5 _: m else -- the vehicle @ is empty, both vehicle and part are in the same dock station
5 [9 L1 c* k ^$ ? part := @.transpOrder;' Y, m9 E2 A, O9 E& J& o
part.move(@);-- load part
0 Y+ a0 L! N& G% {: K% |6 i9 S; w+ t4 X @.CurrIcon := "load";
* t. M- ~2 U1 q- c$ {& a: }9 V GlobalDistObj := part.globDestination;( ]& {2 K0 F( @4 Q" d
assignLObj := rgmanager.rgAssignL;
0 A6 B N8 y. }( H) t row := assignLObj.getRowNo(GlobalDistObj);
& `6 o4 h9 H( R: R* h if Row = -1 then -- since 703 |; V: w9 F& l4 F2 T
if lan=1 then- B$ p6 F0 L6 X0 S; O* s
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% L5 l% O ]( x* p0 x' e
to_str("in der Andockstation: \"",?.~.name,"\""));7 H3 @7 q& {; w/ Y! }# d
else
3 z( ^7 I$ ?5 q* K7 T9 E" h5 q( ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ c& A0 o7 z& `) u( `
to_str("in docking station: \"",?.~.name,"\""));
( A/ q$ J4 e! m0 M" J: o end;, x' j4 e$ A- y$ M0 F( D8 Z
else
7 @; b6 o ?8 O) A @.Destination := assignLObj[1,row];9 Z" C# G' F' G0 S" t
end; ( X" X6 Z# n ?
newDirection(@); k+ J8 y+ Z4 w( I5 l, w* r5 r
@.HasOrder := true;: ^7 D% U D* @6 q8 ~) O, U
end;
+ X' v- P, [ ]. h end;, }. \* A9 k B5 x& `+ F% E4 r
end; -- of the method
; u ]) C Z5 Z& W, M6 u+ m2 Y |