/* called by: entrance ctrl of the object 'track'
) R% m0 g# {. L# d4 f G*/' N3 @# b, L6 C; N+ b- ]
is0 B$ Z5 \9 V; u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
m2 j+ J4 a9 ]9 |% b( J! jdo
' t, V. q7 n \; | Lan := rootfolder.Internal.Tools.AOLlanguage;
( b1 t$ h+ _& i, U# y: [$ T if current = @.Destination -- else return
9 \. I* K+ S9 Z5 l$ W6 ` then0 m w3 F4 t9 ~& T) ^
@.Destination := void;9 P6 ?1 B) K z Y
if @.occupied then
, {* z x2 K, i: A* L1 [ part := @.cont;
2 f& ^) s7 p# D6 w$ I. u9 n) u @.transpOrder := void;" o$ ?& t# }! W3 j8 J- [1 C
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 Y3 p$ T9 c( l, |! T
@,root.eventcontroller.simTime);
. r" ]% ]* F) R3 {2 Y @.HasOrder := false;: l+ a6 n3 I6 n
@.DrivingHome := true;4 f) h4 j2 X t- H( j$ W) \4 X
rgManager.tryToStartTransOrder;3 [1 I B2 W. \( `% `
if @.Destination = void; l% M8 g2 q2 ] ~
then -- no transport order for vehicle @
1 {" b$ [/ j! g! ^) N, x @.Destination :=4 E `, r0 S) K" W% {6 K
rgManager.nearestFreeStation(@,track.~);
) z1 G. a# }( y Y newDirection(@); 1 ^9 Z2 }! I2 x" ?0 {! v
if @.Destination /= void then
, S4 y6 n# @% P0 Z( k0 n, q @.Destination.NumReservation :=
6 _8 c, K8 B. @! [ @.Destination.NumReservation + 1;
9 j0 D" P8 e" o* B end;
% c8 p2 j0 G/ }# V @.CurrIcon := "drivingHome";1 \( [# c. H+ L; T& G3 g- g/ D9 P& u( U
@.DrivingHome := true;; H7 Z9 ? N; I/ |8 E& ~
end;
) y) D( f$ Y9 E8 Q d) [. Q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 q2 U& `$ @2 }, c part := @.transpOrder;
: H' J, J/ t- k8 b$ Y5 ] part.move(@);-- load part' q3 N4 ?; l4 h( I; w6 Y( T8 u
@.CurrIcon := "load";
7 m3 C& B' O+ [3 w$ w H GlobalDistObj := part.globDestination;
# A+ b& T6 K- M; [+ ?9 i% Q" | g assignLObj := rgmanager.rgAssignL;2 U$ v( o- b1 x! S" H6 w5 a, I' A/ u: b
row := assignLObj.getRowNo(GlobalDistObj);( {! T/ T0 Y9 W. r
if Row = -1 then -- since 70
- x! A g7 @" _, W. w% d if lan=1 then! r& Z8 T7 E; B7 w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* N S% m- _1 O9 V- S
to_str("in der Andockstation: \"",?.~.name,"\""));$ Y1 Y1 ?/ j0 c
else- z. p; E# `" Y' ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* ^% D+ `7 M9 Y, o/ q! H to_str("in docking station: \"",?.~.name,"\""));
0 s1 B+ `2 V! o- {2 \ end;" o! I6 j) P# E! S
else
( k8 T1 C9 M! m" i @.Destination := assignLObj[1,row];
2 l' V X* G% n4 X& P. H3 {$ j8 b end; ; K' r4 I/ A% D" e1 d3 g
newDirection(@);
4 X7 u9 l1 D+ u" }/ a @.HasOrder := true;( D: x0 L; S$ B6 f7 M$ |& D3 o
end;
* d- s5 l/ G: M5 P end;
9 g3 I4 U/ T- l3 ]9 mend; -- of the method5 u' L$ B- F; b" d% c
|