/* called by: entrance ctrl of the object 'track'
* L/ v) B' Q5 [& Q. t9 t/ Z: N*/% g; D1 u/ w/ E4 T
is+ ?! c# K/ n8 G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 W7 u. F$ j, Z" q3 l* Hdo- P2 w4 l( x* q1 {
Lan := rootfolder.Internal.Tools.AOLlanguage;( I4 {3 J2 U8 ^
if current = @.Destination -- else return8 H5 N1 b/ B4 A7 [, d$ h
then* g+ l7 L) l% x/ c
@.Destination := void;
! ?" J& w! q2 m/ q# x! T' @# ` if @.occupied then
: Z) [: X* c1 m/ L part := @.cont;* v: ^& N ~* M4 r
@.transpOrder := void;
7 x2 {7 |6 a' O& m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. M6 \3 a1 e) P7 s5 o
@,root.eventcontroller.simTime);
& h6 x: ]) V# H% U @.HasOrder := false;8 G# X. `- J- Z/ X, A ^# H
@.DrivingHome := true;. {; x$ J' |" s+ f) \
rgManager.tryToStartTransOrder;
9 W U6 C0 g( f9 ? if @.Destination = void% I9 f3 B0 O0 W# V
then -- no transport order for vehicle @0 I& s. b. r. Y
@.Destination :=
$ M4 Y* ~! Y5 z* n- d# r, n8 B rgManager.nearestFreeStation(@,track.~);, G; Y: _5 P0 c
newDirection(@);
6 w' s- K% m9 \ if @.Destination /= void then4 Z M7 k3 f J' k
@.Destination.NumReservation :=
, A" N3 M" S8 ^2 @ @.Destination.NumReservation + 1;3 z* k o8 {+ \, G" v! C
end;
& @: F) l4 E( }( I9 B- s0 j% o$ J @.CurrIcon := "drivingHome";, J" d) d2 I7 x2 E) }" q/ k
@.DrivingHome := true;, H- n! W+ _8 ?6 w t
end;7 f+ ^. z8 Q9 t: o, D9 B& q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% V/ [6 z: e2 f& u5 ]
part := @.transpOrder;; N: Y. h& o+ f0 q; z7 ?
part.move(@);-- load part J0 l* Q9 d8 y5 R8 P- W
@.CurrIcon := "load";
# d. \0 d( v3 b2 Z; w0 D GlobalDistObj := part.globDestination;5 g8 N+ D% X, z3 o# ?# }6 V! ~
assignLObj := rgmanager.rgAssignL;0 M+ K% p) {3 Q' y9 n
row := assignLObj.getRowNo(GlobalDistObj);
" B4 c6 q: H7 A6 h" e+ v7 j9 z if Row = -1 then -- since 700 t8 r7 q K3 o9 L- c
if lan=1 then' }9 m, v" a; [' z1 b3 ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( X8 }4 J0 O, E- O+ ] to_str("in der Andockstation: \"",?.~.name,"\""));
- O% j2 T% M+ C2 X( s- q6 ~ else
9 i# Z' Z, _* ?& S I0 p [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," g, ^( P: |/ n6 ?5 |
to_str("in docking station: \"",?.~.name,"\"")); 2 j" a$ a/ L' W+ k, |
end;
* w: z" H% X. M5 r else
( N0 M" b$ N- n7 V4 [ @.Destination := assignLObj[1,row];+ H, k8 @' f* S4 Q! a
end;
) z! T- n+ c! y1 a5 v1 n. ` newDirection(@);# ?- H5 O( \- j4 V j9 X
@.HasOrder := true;
+ V5 F8 E$ R- K end;
4 R, d2 j L! l# _- x end;" x$ h/ b7 ?- `# N" U' G( W8 ]0 Q
end; -- of the method
' T- v) W. E' L6 s$ B/ Z& z! V, U. K% j |