/* called by: entrance ctrl of the object 'track'# F$ p. K" |. E: K( [% z
*/
Q; |+ f+ c' I* Ais& Q3 A* y1 G8 i0 ~
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 U# o2 r+ g0 G2 Y. h$ `% Ido
L! |9 Y b! \ Lan := rootfolder.Internal.Tools.AOLlanguage;3 E% I: W2 G$ n0 y3 Y _7 x( f" F- z
if current = @.Destination -- else return9 z; k6 g J$ k
then. [& C: S. J% [
@.Destination := void;
3 ?, n5 d p: }( ` if @.occupied then4 n8 v/ D" ?1 {9 G# \9 t
part := @.cont;
/ O0 G" r: \1 E' u: P @.transpOrder := void;* s W1 q. L% \( p' g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
; E+ U& B* a0 ^ @,root.eventcontroller.simTime);
' v) J/ |: q/ P5 d& Q3 i; v @.HasOrder := false;% q) G7 ]# q( r
@.DrivingHome := true;
$ L7 _" A; M% p rgManager.tryToStartTransOrder;
- g6 \# i& H# ^6 \ c if @.Destination = void+ J: w# n& r: b) y) p
then -- no transport order for vehicle @0 K+ C1 k! Y5 X1 _
@.Destination :=
! ?$ |" x9 A6 }! ~ rgManager.nearestFreeStation(@,track.~);
$ e5 E3 V; Z. m, r. i8 \ newDirection(@); $ p/ }- k2 F) x7 w! E
if @.Destination /= void then) a& s' o4 D6 h) u5 O' U
@.Destination.NumReservation :=
n9 N9 b9 n2 D @.Destination.NumReservation + 1;" _1 E5 K% T* h4 l, J
end;7 T" ?5 P: O! E
@.CurrIcon := "drivingHome";
+ v" x. w/ {& g1 c) M4 R. e @.DrivingHome := true;
9 r8 z* x1 _1 V; N! k3 n end;
7 J7 y/ r7 L% k# M3 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. @# z6 k/ [+ A part := @.transpOrder;
+ v& j7 d# ?( Q4 } part.move(@);-- load part: e$ i' j6 a5 V! X; O& s
@.CurrIcon := "load";8 z- \4 u( D) N8 C1 b3 H: p
GlobalDistObj := part.globDestination;8 p* K: c9 R! k8 S9 N
assignLObj := rgmanager.rgAssignL;& o% S- p$ U$ @. i/ S8 P* w
row := assignLObj.getRowNo(GlobalDistObj);
) I, U) ^+ |3 B& A) e! p Y/ } if Row = -1 then -- since 70+ W1 U# l+ w3 u8 k
if lan=1 then
8 ], T6 U& |) u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 v' } P8 a' F/ B# g5 I. z6 R* j to_str("in der Andockstation: \"",?.~.name,"\""));
+ C; h0 I2 e- q: {* B2 O. Y4 c" Q( ? else- |" f' _9 L3 \2 Z# N) Q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 F/ N* t4 k# e9 e( j1 l
to_str("in docking station: \"",?.~.name,"\"")); # s0 r( Z G% E \
end;
; z$ j. f: K& }' X' n; x else
2 t# A( j2 a% Y1 e6 F* R @.Destination := assignLObj[1,row];
3 T! T3 ^) Z4 P7 j% r end;
! I$ a! p& o4 Q1 x) R3 D newDirection(@);
8 @! K1 H0 Q- o7 f8 T" S! S @.HasOrder := true;5 `! Z% ~8 l% w7 Y! Z) `
end;$ I2 U/ `6 p g
end;
) i- c) Q: f" ], T! Iend; -- of the method
( y5 c- c& d" p3 K0 A |