/* called by: entrance ctrl of the object 'track'2 h1 O+ V) Z. {/ A
*/
! w8 O/ u4 g) X4 Sis% C' ]" N4 J3 \; X1 T' S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" Z/ |& W \4 {1 O! Q+ S3 e) d1 U K
do M- [7 l, w8 N( i/ ]5 r$ k
Lan := rootfolder.Internal.Tools.AOLlanguage;, H) I) t7 C$ {: i5 Y+ U
if current = @.Destination -- else return
6 M j# h2 S: p0 R% S( E0 U+ r then
" i. Q3 \' C$ Z8 r6 C+ H. }0 m @.Destination := void; u7 C4 [% K2 x" ~3 L
if @.occupied then
8 h* u/ V) v# e0 m$ C; `) J part := @.cont;
3 ~1 n: L7 K3 D' M @.transpOrder := void;; |' ?9 ~* q( u% ~+ F0 V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 F5 B! ~: M9 M4 W% P @,root.eventcontroller.simTime);! z1 d* T$ N$ j9 d3 J3 V& c1 [
@.HasOrder := false;
; D8 |# @& t8 Y$ v* m @.DrivingHome := true; J# ]; f& B! ^# r7 `
rgManager.tryToStartTransOrder;& c% }+ i9 G. c
if @.Destination = void! t: S/ L: ~. l ~) @3 m1 s
then -- no transport order for vehicle @
5 s- h. T' @; ]$ `$ |# x! N; W: G @.Destination :=- v) J5 _! z K+ P9 U3 q+ c
rgManager.nearestFreeStation(@,track.~);
F6 I/ ^, K' i0 V1 f6 d newDirection(@); / k9 v* H0 Q$ {
if @.Destination /= void then
- Q1 U# X6 h' I5 ]9 c @.Destination.NumReservation :=2 O0 `) E5 H1 i
@.Destination.NumReservation + 1;
: u% Y4 Y" Q5 n! o n end;
9 K- f. x6 [, d% l: `3 Y0 Z @.CurrIcon := "drivingHome";
$ Q# ~% T$ i. b' ?) j @.DrivingHome := true;1 x: X8 P6 K1 q5 n) Y; q
end; N8 d$ R( t+ f5 c! |
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ c& S" A7 m' ?5 s part := @.transpOrder;- X* v7 M6 z# X5 W, `5 C
part.move(@);-- load part
8 }3 z" w/ a9 ~, U1 E/ u8 O @.CurrIcon := "load";
/ }6 q% a3 M5 r. E9 G! r GlobalDistObj := part.globDestination;
+ G6 p, l, |: M$ N* ~! s7 m assignLObj := rgmanager.rgAssignL;7 \; G# J1 F& {5 i$ T5 G7 L1 x. p
row := assignLObj.getRowNo(GlobalDistObj);, k( r8 K9 ^! }$ Y
if Row = -1 then -- since 707 ]6 a, \+ U: _" |1 x- |5 X9 @, v
if lan=1 then: I" z8 r9 r( K, V" J
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. R1 y/ |2 B0 @; }* K7 f0 S to_str("in der Andockstation: \"",?.~.name,"\""));: L" O0 c6 q" Z: @$ m
else
- d" L8 |# T* g3 M g/ j0 J( L/ G promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( }# o, u8 ?7 W- o) c, h4 u8 r
to_str("in docking station: \"",?.~.name,"\""));
# D6 a, }* F+ b: ?- R' V2 N+ d' C7 A1 [ end;
9 B# L! C- B3 [- G else
' ^" Y- _$ J; O @.Destination := assignLObj[1,row];5 G9 ?/ j+ ~& G7 j# h
end;
, f0 B% j$ Q; J/ z$ v7 [0 L2 V( C h newDirection(@);
; H* J) x3 q, Z1 k( E% p# R @.HasOrder := true;
% S6 i" p u- ]; z6 R end;! P3 y, v! C: w G
end;
! b: M6 `; J% ]7 V# r" \/ m1 hend; -- of the method
5 e& w4 D* ?+ w" E3 O! g |