/* called by: entrance ctrl of the object 'track'
2 a( H7 Y( o7 K# M3 }) O0 ^*/, c, C. P. k/ A5 `+ ~
is
' i( t6 ]0 ^; I( ^$ V) V part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% _: w; a w+ I4 B5 ~do2 J% c" _% n h; j' _
Lan := rootfolder.Internal.Tools.AOLlanguage;+ Q, N* A- V, {3 z9 O8 K' O! O
if current = @.Destination -- else return& W& _( K( d; q
then7 a7 C' I, n7 i) j* h5 H
@.Destination := void;
' O, N2 V, C6 W! Q9 R3 j if @.occupied then5 A, T$ F+ U* m! a
part := @.cont;& {; F& L; e: M0 Y: J
@.transpOrder := void;
# p4 \( m0 L1 x: ^+ Q }! _- _" a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 U( t6 K% ]5 K2 H
@,root.eventcontroller.simTime);( y. A8 F: O2 K4 M! Z' P
@.HasOrder := false;
/ A; T) e) ~9 f) {7 V0 o @.DrivingHome := true;
5 P' R+ g5 ]4 ^0 R! w, Z rgManager.tryToStartTransOrder;) W3 K& l( }$ j/ m* ?
if @.Destination = void
. x! ~" T$ r$ a' B/ @ then -- no transport order for vehicle @
4 `0 _& z' i3 Z9 P& g6 b' k( A @.Destination :=
( `, T: M g7 Q: r. ? rgManager.nearestFreeStation(@,track.~);
) N5 Y* M! `$ F! [ newDirection(@);
% M' m ^( S5 [! A5 B5 z8 C if @.Destination /= void then
- X! k+ H: i K @.Destination.NumReservation :=% I1 M3 L: w K, e; v
@.Destination.NumReservation + 1;
0 A( O5 S6 S) O J1 E* h# o end;7 `2 ?9 H( l7 s# j. R
@.CurrIcon := "drivingHome";
( G+ p" D4 l& n5 B @.DrivingHome := true;
% j4 Q9 W$ \- _4 w& V! a% } end;; c* S: _4 w+ V/ d8 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
$ M; r4 I' f4 d part := @.transpOrder;
2 a4 d+ h# G/ r- y part.move(@);-- load part, D6 Q; ]8 V$ | z
@.CurrIcon := "load";
" \/ X) T/ a1 a, S GlobalDistObj := part.globDestination;
4 S# b% L5 i- @+ A+ O6 T" {1 X D3 o assignLObj := rgmanager.rgAssignL;* c# P" V& ~" u) n
row := assignLObj.getRowNo(GlobalDistObj);# b+ h) i$ Z' q
if Row = -1 then -- since 701 r1 D2 {! Z8 A8 v% `/ p
if lan=1 then
, c3 _4 q$ T, D2 b/ d% H+ g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; q4 V2 k ^* {" V1 y# Q to_str("in der Andockstation: \"",?.~.name,"\""));
3 n9 D' d1 k( B, k% x Y else$ L) y0 V, K% D
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: Y, X6 E& Q# P' {2 k% d* [
to_str("in docking station: \"",?.~.name,"\""));
9 f/ i) f$ E1 `. C1 H end;
% S1 r1 _ f) O; O( l( Y else5 z, t" I& ?1 C+ D0 o+ _
@.Destination := assignLObj[1,row];
0 y0 ~. a5 H3 L" c. _ end;
5 Z7 Q$ S- i3 Z; E" W newDirection(@);/ U. w/ V- E( G, f
@.HasOrder := true;
6 {3 C7 e6 ~. {7 }4 J- J end;& X1 ]+ H- h4 H5 Z( P. p! V
end;4 d2 K: X$ j' V
end; -- of the method( G& u' W7 D! Q4 Z* f6 O, U
|