/* called by: entrance ctrl of the object 'track'
8 s7 y' f) ^1 @9 C# I*/1 }6 k+ b6 D$ X+ q) R' @) B
is
' z M6 f& Y7 h; M6 } part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 o# `4 h7 _$ e
do
( u- b# h# q) J8 ?( ? Lan := rootfolder.Internal.Tools.AOLlanguage;7 I' G( T( C/ r4 F2 F8 {1 R8 M) ^! P, R, m
if current = @.Destination -- else return
- V+ R" p% s, a% N. C ^ then0 [, b K% E9 _& J
@.Destination := void;. e H. P& v: h4 E2 ]
if @.occupied then
) Q& S1 W. F& a9 A- F9 @& f part := @.cont;8 s9 C& i' I5 |1 p6 P: w$ p
@.transpOrder := void;
, J' g( X4 k5 I/ `: l) b+ S8 ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ?! C5 U: k: k$ Q; c
@,root.eventcontroller.simTime);) Z( h2 d% _! E! U( z
@.HasOrder := false;: C; t" [. U- G+ x
@.DrivingHome := true;- J: B! y: j" A. K- j1 m% A
rgManager.tryToStartTransOrder;5 y9 b: S3 Q, a+ Z+ Y
if @.Destination = void
9 M3 s: ~2 [0 L X then -- no transport order for vehicle @% x3 W: T D# {- N" y
@.Destination :=$ ^7 C3 j7 i7 B
rgManager.nearestFreeStation(@,track.~);7 a& c* Y; O3 F1 A
newDirection(@); # {1 G& R F8 Q
if @.Destination /= void then
2 I9 X0 L7 [0 v# @, M8 o$ S @.Destination.NumReservation :=% ]0 `$ o9 ?# S4 w3 ~# \% r4 l& @
@.Destination.NumReservation + 1;
/ K; x8 E$ r% e end;2 n: \. w7 Q8 T) U
@.CurrIcon := "drivingHome";
8 @3 L. h, N/ W! d a$ D- L @.DrivingHome := true;
6 j2 S# u: a3 `; M/ d end;% P( {& ~$ y" k9 L5 ^4 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 I) r7 a6 \7 `# I( W part := @.transpOrder;
: Q w5 k+ |2 s2 Y& D' [9 I& L part.move(@);-- load part
. z" w! p2 _( ? @.CurrIcon := "load";4 ^( f9 m# M8 x- X1 W3 i
GlobalDistObj := part.globDestination;0 w" b! }* S7 H( J" K
assignLObj := rgmanager.rgAssignL;8 Q, O# P7 r: b5 b( m0 R
row := assignLObj.getRowNo(GlobalDistObj);* M0 e4 [- f8 |3 B8 s/ O1 _" M
if Row = -1 then -- since 70
0 N' t; w$ O& l' V if lan=1 then
- m2 J3 U# s& N8 l6 J/ u# D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
$ ?$ X* s5 V# s to_str("in der Andockstation: \"",?.~.name,"\""));
" x2 r5 `6 ~( G% A1 s else1 m& T. u$ z9 _# E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% d) D" e4 q1 A7 N' b: m- | to_str("in docking station: \"",?.~.name,"\""));
' f4 M/ ?: h- [2 R7 @ end;. D: u3 e$ r' m+ V& S! ~
else/ }+ Y& M0 p' r; {6 x
@.Destination := assignLObj[1,row];
) D6 M L" `) P( H) | end;
- _+ K" y' g$ @" X7 y6 S, f/ z% r newDirection(@);' w1 T/ p! c. e- }5 |7 [
@.HasOrder := true;
6 c1 T, K( q2 l4 V end;
5 L* r- N7 @" b2 k4 ~+ c end;( S/ n+ t* P# R! R8 O1 n
end; -- of the method. D$ ]5 j8 W6 O+ ~
|