/* called by: entrance ctrl of the object 'track'
3 @) @4 N8 I( K& c5 Q*/2 }! H; B) `- F; T; N% L
is. u. Y8 m; ?: A- x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( R% r- K( f5 _2 P0 Sdo
- n" P9 |( K" f8 O Lan := rootfolder.Internal.Tools.AOLlanguage;
' ^5 w) B; p( \+ F if current = @.Destination -- else return+ S/ K- w% `0 ~& [3 T
then6 h( m' e( h4 @
@.Destination := void;/ P, k8 q7 V {! n5 F: O) w
if @.occupied then
8 B3 l- \# }( K: L: Y& d+ O/ ?" E part := @.cont;7 }7 L; S I w5 V% |) l3 Z2 @
@.transpOrder := void;
2 D$ F+ h; V; v3 d( _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 I2 W5 \2 y, o9 s @,root.eventcontroller.simTime);$ d' v, m0 K' e# k' ?4 j3 l
@.HasOrder := false;
* }; A3 M5 M1 D+ N; J% T @.DrivingHome := true;
' }% C, r, ?1 j/ y( u rgManager.tryToStartTransOrder;
1 [7 V7 x- c& U0 M- I# A) ^ if @.Destination = void
" B( }9 d0 g1 Q( V5 L0 W3 T then -- no transport order for vehicle @
4 ?) ~4 [" v5 l+ L @.Destination :=8 ?+ h2 R. e3 h' b+ P/ ^. H
rgManager.nearestFreeStation(@,track.~);! X( F8 e$ I4 ~0 H
newDirection(@);
7 @1 u: W( e3 F$ L( M$ s if @.Destination /= void then% u* s+ z j6 a7 W
@.Destination.NumReservation :=! v& r+ G1 N* F4 S( L+ D
@.Destination.NumReservation + 1;
2 c9 E- F2 S, U7 \- y/ x" |/ j! p( w end;. R0 I" J) m. v* Z; {) v d
@.CurrIcon := "drivingHome";
" o( g. Y7 Q$ @3 N* R! [ @.DrivingHome := true;# S1 c0 g: g' w
end;
d3 l: x+ F" \( Y: J: `. O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& [2 \/ C7 |0 e# I# P/ ~ part := @.transpOrder;
& e6 u3 \, p- ^8 E8 L part.move(@);-- load part! Q7 x2 p$ ]$ n7 ?$ L% Y3 C
@.CurrIcon := "load";4 p) u0 [0 ^1 g7 ?5 R7 _
GlobalDistObj := part.globDestination;. P2 G: a+ ~8 a9 j9 g
assignLObj := rgmanager.rgAssignL;2 x2 L4 ?4 h& @/ [
row := assignLObj.getRowNo(GlobalDistObj);% g' F0 A8 _2 ?# g, D
if Row = -1 then -- since 70; ?8 B m& c; W0 d) `
if lan=1 then1 [% H4 N% K* u5 \ {! l8 c+ x- } [1 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' ^; _) f0 z% B0 q3 l8 _- m$ n/ n to_str("in der Andockstation: \"",?.~.name,"\""));
/ T1 `& C) {* Z$ G7 K else& X0 |) e/ I9 F( p; {, _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 e. n. g, ^6 L' ^+ E1 D, K$ O to_str("in docking station: \"",?.~.name,"\"")); % w$ k; D/ }. T2 ~/ _2 x* n" W) a- b
end;
9 B7 R4 y0 \. J: q5 U else
* i3 a- O2 F5 l* d- Z4 C! L @.Destination := assignLObj[1,row];: A; s( x" a/ b$ s: j) r
end; ) N8 F- r2 t) G( [$ J0 W
newDirection(@);
/ l1 f6 T, _: W. u& x @.HasOrder := true;
Y* B1 \, E- H d- d end;
# i2 M0 H0 E: m5 X. l/ |# j end;$ Z& z" Y$ x7 h" G z+ k$ d
end; -- of the method( p: n7 s, R- U# L' `, ~( [
|