/* called by: entrance ctrl of the object 'track'
/ M" b6 C# o9 b( Y5 ]' P*/+ M2 G& M+ j5 D( w
is- i. K# \ S$ ?# J
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% w; c: D$ p. Z* f1 `do K# P k& y- j; F
Lan := rootfolder.Internal.Tools.AOLlanguage;7 p, X7 f1 \; r! o7 G
if current = @.Destination -- else return2 { X. \3 \! h* X
then
% n/ {" @. c% a9 O' P( e2 w, J @.Destination := void;
9 y3 F& c, S( O1 E" y9 {. G1 {# J if @.occupied then
7 d6 D6 e# m: { part := @.cont;0 K7 p U( x H( }5 _* h
@.transpOrder := void;4 i( S2 A4 t5 G. ~7 n1 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," W- K" L. f- `, ~& }# f
@,root.eventcontroller.simTime);
) d ]% T. V7 @8 x$ m @.HasOrder := false;6 o. g/ n/ C5 S8 P9 h2 C
@.DrivingHome := true;" b9 _4 ]1 [. X* T. D% @
rgManager.tryToStartTransOrder; v6 B' k: N p/ {
if @.Destination = void
4 S$ d! Y) T3 D$ b' l0 [ then -- no transport order for vehicle @
* W$ ^8 B7 p a) e @.Destination :=" v/ r! U6 {3 Y7 g4 z/ Y/ d, u, D
rgManager.nearestFreeStation(@,track.~);
3 T7 O3 i% {$ h newDirection(@);
9 m3 ?; V" j! S9 A( c/ |: D4 E if @.Destination /= void then
: u- \" J8 ^ m- ?. w2 v @.Destination.NumReservation :=
$ ]% u% {2 Q9 k. n- X @.Destination.NumReservation + 1;8 _# @( V0 ?: `1 a
end;' D6 ^' ?8 K; W2 I$ ?$ H
@.CurrIcon := "drivingHome";
6 N; E1 u0 d8 A; R u) g @.DrivingHome := true;, U" X* C+ X2 I+ S! ~* U& D/ J5 H
end;2 }- S5 O& u+ A
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' z$ g8 u' w" N, D! c/ x! g part := @.transpOrder;4 s: ` I w$ ` G
part.move(@);-- load part
5 F5 W5 @, b4 b* O4 t( }+ b, j @.CurrIcon := "load";
5 t6 y6 u- o; X) [: e GlobalDistObj := part.globDestination;
( K( a* [/ S7 Y0 R3 ^. D$ U8 Q assignLObj := rgmanager.rgAssignL;
' G* F% t# P1 s+ Y' \7 K7 j5 \ row := assignLObj.getRowNo(GlobalDistObj);% a" f) \7 C, m1 A
if Row = -1 then -- since 70. f4 Q6 K( x9 U% n7 _4 z
if lan=1 then
5 q' C9 {5 s7 z9 N& K9 {/ ^9 x( Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 t1 y9 M( Q1 M* v3 a: T! f
to_str("in der Andockstation: \"",?.~.name,"\""));
3 z+ O0 q/ W; x4 e/ n else
" y5 d* |: f- Z0 U, b. f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) k; L- }1 t- P. K- O
to_str("in docking station: \"",?.~.name,"\"")); 7 l- {: j3 R. ~
end;9 ]8 R; v8 d, g c0 e e7 |$ `; E$ J
else2 F" C" Y9 }0 z( O0 w6 ?9 R
@.Destination := assignLObj[1,row];2 d& M6 _ a4 h2 ]
end;
4 c8 c1 S n: C: w" A( P+ o newDirection(@);- R/ n) z. I: V5 k! L! x
@.HasOrder := true;
( O. b4 K9 _1 K8 r. y end;
1 M( U4 A, ~# c5 K( D& N end;4 |. t1 k g% D9 D* \, C
end; -- of the method
: h. k! S0 R& @# c: F9 e |