/* called by: entrance ctrl of the object 'track'
: W* }) _/ @) b; y. W3 C*/
2 l9 I1 h" _ x9 [& xis8 |& w& |7 t* O, r. D) E: d7 c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% }* E6 E2 N1 F/ R! i* x8 E
do
# Z. f3 _/ D7 f* [ Lan := rootfolder.Internal.Tools.AOLlanguage;7 g! @3 l: T0 _2 K: k* I8 V2 s/ I
if current = @.Destination -- else return% y0 J" w" m. i6 @
then
7 j6 S P9 P8 f1 I, @4 w4 I @.Destination := void;' y" _8 Z" G% C# _9 p" O6 D4 B
if @.occupied then- w, y5 X- u8 E* x/ \# c
part := @.cont;' L* Y5 n, D& A: S
@.transpOrder := void;9 Y+ O- u7 r; S" R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 k% }: l* y P+ L; J7 k# ] @,root.eventcontroller.simTime);
- r8 E6 T" `5 C7 {, h @.HasOrder := false;
# o5 R+ h" ~$ Q" D& u& x0 ? @.DrivingHome := true;
$ B4 d" b9 o# o# R4 q- e( L rgManager.tryToStartTransOrder;
K3 J+ q/ t: a/ r6 U( ]$ @3 I if @.Destination = void
# q+ _5 F( o5 A; ?, l7 B then -- no transport order for vehicle @% v/ V- O: H7 `) w! m
@.Destination :=
, c" d; i2 l% x3 ]& A rgManager.nearestFreeStation(@,track.~); v$ N0 u b9 \8 l9 Q! l1 k
newDirection(@); ) k p* h( [( C+ k: Y" n$ p
if @.Destination /= void then
0 c% R1 [! @0 V( t I8 z" I4 F9 n% ` @.Destination.NumReservation := J0 Z- n1 Q, X
@.Destination.NumReservation + 1;
" a8 C5 D+ }! B4 ]9 t end;/ l: M2 J7 V% v6 T( B
@.CurrIcon := "drivingHome";
1 l1 |/ L0 e1 P0 Z* x @.DrivingHome := true;1 s5 n& x2 u6 j$ j( Y
end;
4 g) g/ q8 c+ c3 j else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ L1 y0 O: K9 S( s9 Y g# e5 G
part := @.transpOrder;
7 E+ }' ~" a: y8 F part.move(@);-- load part5 y$ H1 W5 F, s
@.CurrIcon := "load";
) s2 Z) ^* o! W, Q0 Z- E( }) @! l GlobalDistObj := part.globDestination;5 d7 J" c3 h) G- s, X1 _; G
assignLObj := rgmanager.rgAssignL;
! ~' l; ^# [4 a/ Q Y row := assignLObj.getRowNo(GlobalDistObj);
* s$ }; l) r) C: m3 Z if Row = -1 then -- since 70
8 X( C: m# o7 g if lan=1 then. ^0 n' E ?- @+ j3 h1 D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; |; G) k/ F( _- C& M' U6 Y to_str("in der Andockstation: \"",?.~.name,"\""));+ V3 b0 t- w4 M8 l: Y
else* T. `% \+ i9 u# M! N F$ C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 B! f# l( n! F) W8 x
to_str("in docking station: \"",?.~.name,"\"")); * S0 [- M, |3 y5 q/ k* j6 k6 I
end;, p2 ~ T5 g+ v3 X, `3 d$ ^
else
' V& I$ ?- E/ G6 ~4 L( k0 O @.Destination := assignLObj[1,row];5 g7 P& K+ X$ ^6 v: j
end;
0 s* d$ d# B4 r. Y( V6 O6 Q newDirection(@);
9 V) R. V. I: s& J) v$ u @.HasOrder := true;/ u! b3 V. o8 k) p4 E$ `
end;
/ Q0 b. [4 |/ M, n, k end;
% E2 S) a7 \% V- F: L! dend; -- of the method
" A/ L) q; C. h9 S' N4 ^0 \& L1 J& g |