/* called by: entrance ctrl of the object 'track': H/ x0 t# P$ d4 r4 n9 \ [
*/
3 A5 h9 n( ^1 [0 y: m5 sis
) z+ \. T% X' R6 e5 c0 Q part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( r+ r# Y- F: v p6 g( b$ _6 sdo
3 H- [4 ~$ G3 @; T Lan := rootfolder.Internal.Tools.AOLlanguage;
8 T; T, P! F$ Z- C( \ if current = @.Destination -- else return
3 i# m4 _! l% z9 H) I" | then- y2 I( H7 v; y& e# F
@.Destination := void;
8 Q: j9 [5 [' X) V" n+ _" ` if @.occupied then( n7 H v9 ?3 p4 Z3 q
part := @.cont;
) T, @& i* a( q0 B0 a; e @.transpOrder := void;( f8 B; S0 R Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ T5 [! a! |7 ~& @* N7 X g
@,root.eventcontroller.simTime);& r, [3 H1 v& U5 N# Z4 {- {
@.HasOrder := false;
- j; }/ ]% _2 P9 i! f; s/ x4 \ @.DrivingHome := true;: k% E, |: @9 O
rgManager.tryToStartTransOrder;; k g$ | F1 q
if @.Destination = void4 H* |% O! N& r: c6 R
then -- no transport order for vehicle @5 z( g4 M( P7 X
@.Destination :=
% X$ Q5 [* n9 ?' P( |1 n) `( U rgManager.nearestFreeStation(@,track.~);
8 {# {0 ~3 p1 x9 g# g+ ~ newDirection(@);
/ }) D( C8 n9 ` I if @.Destination /= void then+ D( ~" t/ t4 o1 X9 a
@.Destination.NumReservation :=$ k9 V' j1 X4 t6 h$ z3 |& f- q
@.Destination.NumReservation + 1;- ~; f% b+ [' R0 P/ A
end;# f. {$ ]9 ]6 v! m. x9 s9 d
@.CurrIcon := "drivingHome";7 i4 J9 x# _1 r( S- H
@.DrivingHome := true;
: }+ x1 [1 j1 i* h5 N! W end;2 X( p) q8 X k3 P; b4 y; y5 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ ~) I5 K* |. B2 ~0 V5 |! v" z6 ] part := @.transpOrder; f- a/ Q8 \1 U
part.move(@);-- load part; q: l6 }% Z9 k7 ]
@.CurrIcon := "load";
, i2 W8 [4 n9 B3 D0 M GlobalDistObj := part.globDestination;& n2 [9 ?- Y7 p1 d M$ O: |
assignLObj := rgmanager.rgAssignL;6 K- S. ^2 C; u P7 u
row := assignLObj.getRowNo(GlobalDistObj);
1 Y" I, _8 l0 Y1 n0 w7 U3 ~ if Row = -1 then -- since 70
' |& Q, `' R! e( S7 B if lan=1 then
. y2 ?& J' n2 i% h- Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 d( t! X/ A# e& k; ~, N8 f
to_str("in der Andockstation: \"",?.~.name,"\""));# u& ?) N% I' V
else
( t' H& e& F( V. H9 D4 {$ x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 `2 B7 o$ k+ L/ E$ m$ a0 s to_str("in docking station: \"",?.~.name,"\"")); - D( V+ l8 }" f3 z
end;# U5 C& w% Q2 |# D8 x
else
3 {- D! }" y, ^ j! e1 K1 I @.Destination := assignLObj[1,row];
) ]( U( @$ H& w8 E: w! k& F end; ! T9 |" v+ h( i
newDirection(@);( ?2 y" [6 Z" J2 {5 y/ x
@.HasOrder := true;, b! _4 C2 a `$ g& a
end;
. |4 N$ u5 V% {) m5 M end;& f3 q8 y6 F! Y( r# |: }% V, J2 Q
end; -- of the method
/ \5 b# a) Y" X, O |