/* called by: entrance ctrl of the object 'track'
* U% B2 o) N1 T7 X*/
& F* d* {& n% k' Y6 V/ }' gis
$ C; O# j9 q1 }$ T5 C% d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. v: Q1 q3 Z, s2 Jdo9 Y# M: z2 {. k4 W6 J
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 c! l" T' [5 P& [5 O5 | X! i if current = @.Destination -- else return
2 g2 t W0 T: r# c% W9 j/ g then
7 b1 |. c' Y# L$ p$ o @.Destination := void;0 u+ a) i" A0 a8 h8 [5 D! t% Z6 }
if @.occupied then' B, k) r6 f0 \; g6 O$ _6 \- @
part := @.cont;
+ p8 K0 R+ {5 E' B- ]# J, l) K- F6 x @.transpOrder := void;" n6 n0 ?2 I" L) G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
i, }$ B3 z1 S H; C$ i @,root.eventcontroller.simTime);1 Z, U: s9 p2 ]0 V, J+ i3 M/ G; f" X
@.HasOrder := false;
( f# e, P( ] m! {/ w @.DrivingHome := true;# C, P9 z7 G0 f/ H
rgManager.tryToStartTransOrder;6 a2 y. |) m2 ]
if @.Destination = void6 U6 A! K1 X+ m& c
then -- no transport order for vehicle @
, Z0 |9 Y# P" E! \! b8 D, P @.Destination :=
8 V8 [- ?! F+ v* H. |4 D' g rgManager.nearestFreeStation(@,track.~);
% M' @" Z0 N& R- O$ V# {1 g newDirection(@);
' y+ ` ?6 Q& o' V& W0 j if @.Destination /= void then
* N0 O- C: f% |. H, z# ] @.Destination.NumReservation :=
v% t- A: n. T$ F @.Destination.NumReservation + 1;
2 F$ D: V& [; H9 P) J6 O1 W% J end;
8 x @4 T) A( ]( ]+ m. Y7 B- h2 L @.CurrIcon := "drivingHome";
7 A5 s; y& i1 D) \ W' O! y1 p @.DrivingHome := true;5 H$ A% a3 s, L/ r- T: K
end;: q9 D0 t3 S1 w. c3 M4 ^' H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: w( m+ U) j/ k part := @.transpOrder;
$ T, ` f6 W% S# e$ q part.move(@);-- load part+ {- Z' _, _. A
@.CurrIcon := "load";
! Z% D5 V# m8 W% X GlobalDistObj := part.globDestination;
, W1 r( o5 ], O assignLObj := rgmanager.rgAssignL;
( @7 S7 P7 h8 L9 X# u' X6 { row := assignLObj.getRowNo(GlobalDistObj);/ y U; `+ c9 j' }8 {
if Row = -1 then -- since 700 o2 ?9 S6 i* H; J; n2 n0 b
if lan=1 then; ?8 Q, K- m4 L5 L; s7 S, A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# g; m/ |% U- y to_str("in der Andockstation: \"",?.~.name,"\""));- {" j0 K: Y7 g1 m. C' H
else
) b, J, M: K2 a# i& M: F2 K promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 I f7 j; D4 R& J* H2 i( Y: n to_str("in docking station: \"",?.~.name,"\"")); # v8 t9 P) ~/ w, e" ]) Q& I4 x
end;* V- \9 P9 l3 g3 p; s
else
. N* X; G/ v0 e" @3 h2 E, Q) j @.Destination := assignLObj[1,row]; F+ l- J7 T: ^5 W) c5 ~1 H" J
end; 2 [! y8 v1 M& U
newDirection(@);0 N3 }9 e, d* N
@.HasOrder := true;5 t& ^4 b/ l3 Y; N
end;3 J4 {+ X8 q7 N' |: w
end;+ z8 E7 m- T" n. K/ O! [0 i
end; -- of the method1 w+ }( ^( R( k' v3 g1 G' I& Q
|