/* called by: entrance ctrl of the object 'track'4 I5 H+ V; d! Z2 Z/ p0 b; M
*/8 w! v* }5 a! r5 u& N! K- p6 I
is
3 x' L O) \+ m( M5 [. n; R part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 Q0 k4 A$ C. N# E' e7 \
do
9 k3 B0 t1 R4 H3 S Lan := rootfolder.Internal.Tools.AOLlanguage;2 o4 N* p# Q& x( B7 K# N9 z
if current = @.Destination -- else return- i2 v2 I- [; F5 u m5 t7 p+ K4 W
then
: }- v& [& n% ?! {4 h& u @.Destination := void;; Y) p& L* s3 w
if @.occupied then! W" D/ h3 W& m) f
part := @.cont;
$ W6 G' n2 V% @. S @.transpOrder := void;
4 _* F' y" Q( T# J+ b. i# n part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. a1 O' {$ w9 [8 _# N
@,root.eventcontroller.simTime);
* J& Z8 @9 Q. R @.HasOrder := false;' D, y7 S7 f6 ?& ^8 n+ ^/ w! V
@.DrivingHome := true;
3 W, m$ |* N4 r; ?' ]; G rgManager.tryToStartTransOrder;% i9 [# L h0 x7 N" _8 T
if @.Destination = void$ T1 O8 \% c5 R
then -- no transport order for vehicle @. T. i3 w3 ?3 Z9 @2 X
@.Destination :=' E& z% V: X+ e6 S0 M" U+ p% T# H; V
rgManager.nearestFreeStation(@,track.~);
$ Y k r0 W: M newDirection(@); 8 E) j6 j( h+ g9 m' ]9 {8 S
if @.Destination /= void then0 n, ^; P2 }! n1 l3 ]
@.Destination.NumReservation :=
9 w7 l9 x9 V: |- }( S, a @.Destination.NumReservation + 1;; U0 ^3 ~* \( U
end;( U b0 m* m! [: C* p& F) s6 a
@.CurrIcon := "drivingHome";
/ y4 c* j0 E% O/ h V3 A) z @.DrivingHome := true;
/ P1 X' |+ e3 u3 v) F$ f3 j end;# L* k" o8 u( j( L9 F4 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 O7 [ p5 C0 v3 O
part := @.transpOrder;# y/ K+ Z# T; j
part.move(@);-- load part4 W1 x a/ I& Y$ r! W
@.CurrIcon := "load";
6 e W0 v8 E0 V8 ^9 O& ? GlobalDistObj := part.globDestination;
0 D; E, ]! f0 S5 w assignLObj := rgmanager.rgAssignL;0 M" w) c% ], l+ x/ i& E
row := assignLObj.getRowNo(GlobalDistObj);
( d8 C7 e J' p# ] if Row = -1 then -- since 70% S+ s/ u7 w: S9 ~7 B
if lan=1 then B6 ^9 H f4 {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 |& F& O. s9 M) s to_str("in der Andockstation: \"",?.~.name,"\"")); f, ^; O2 z6 _$ i
else" l$ p0 x7 R1 m' l/ j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ p; p; u$ ?1 I2 q to_str("in docking station: \"",?.~.name,"\"")); : B; v* X, A( j) r+ s
end;
; T9 }$ S$ b& B else' O4 } m4 J9 O( t' X% b1 F
@.Destination := assignLObj[1,row];
/ R; K# J/ V$ d" I! |9 d end;
$ L# ^/ ]9 m6 K2 S newDirection(@);
) ?! U# k2 _* o8 a8 U9 D @.HasOrder := true;2 K6 K2 @# c+ u, r
end;7 G, s0 B5 Z1 k( D
end;
. D" y) B' a, H$ B) s) _end; -- of the method
[8 R( t5 g) `# ~ |