/* called by: entrance ctrl of the object 'track'& C9 P1 K' V' d/ O5 f
*/
+ T& s% w9 {$ p/ C) ]2 R& T; W" ~is
- [0 b# V6 ^+ G part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 j: t& S8 w# ?- `
do
- t& l# {4 f. c( P; F, ^- m2 B2 S Lan := rootfolder.Internal.Tools.AOLlanguage;
, |9 l3 h( M! {9 T: X2 r if current = @.Destination -- else return, w2 I7 c" o6 e* o
then D! [, E& T- B8 _
@.Destination := void;
! d7 v' b; M5 r' x if @.occupied then' ? Q. W5 u% O& k0 B2 K" R$ j
part := @.cont;& l6 J5 n1 U+ }/ x4 s1 \8 C e, U
@.transpOrder := void;- N C" X% \0 _. X1 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, r9 ^9 o/ [8 t0 R! x @,root.eventcontroller.simTime);* Y& E6 w# U+ B
@.HasOrder := false;
; N+ \ }6 \4 W' n& p @.DrivingHome := true;/ M: @& C3 O9 x, s9 Y2 C2 N
rgManager.tryToStartTransOrder;- c* c' F* f& D# a
if @.Destination = void+ r7 I- `- D4 M) ~" M
then -- no transport order for vehicle @/ m& G6 R3 h) @; A2 W
@.Destination :=5 o& G' A" D% ^9 S
rgManager.nearestFreeStation(@,track.~);
* B3 ?% [+ H! \0 p) m newDirection(@);
0 A$ p8 B4 O# l- ^ if @.Destination /= void then; L6 R2 c1 t% E. C$ ?& @
@.Destination.NumReservation :=
. P+ a% D: _) O7 R9 l @.Destination.NumReservation + 1;0 w1 R' c; y& b
end;1 y8 O7 A, |4 T& S. n, G
@.CurrIcon := "drivingHome";
- ^% H+ ?. O9 ?# r- h3 y7 [ @.DrivingHome := true;
% A& B( E( Y9 K( _# @. c$ W end;1 E1 y0 L2 H, t1 A8 U& u4 y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- S, q+ u" u4 }9 Z part := @.transpOrder;
0 p& j5 V- z1 C- S: ?$ G1 f% R part.move(@);-- load part
9 z u3 Q3 G- J, n+ Q; G @.CurrIcon := "load";
$ [: a! }' A0 H, D GlobalDistObj := part.globDestination;3 h1 O- u7 _- M/ C
assignLObj := rgmanager.rgAssignL;
# ~. `4 e7 `+ Q$ ^ row := assignLObj.getRowNo(GlobalDistObj);
! P. A- x* i( V0 u if Row = -1 then -- since 70
6 O6 ]! {0 R1 @- Z" U( K if lan=1 then
8 H/ G' E" |2 h& ~0 a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," ~9 O0 V+ i c; \3 d
to_str("in der Andockstation: \"",?.~.name,"\""));' n v; J( X2 n
else- h' p, L7 ~2 W% q1 {/ ?% C; m1 Y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- i. I8 z5 A" Z1 b( ^, o2 S to_str("in docking station: \"",?.~.name,"\""));
# X4 M6 C% h o4 q, S end;
" {% L. | B! r" i! M t else$ R% {" i! B6 Q
@.Destination := assignLObj[1,row];
4 Q3 I" @* }) O4 h8 n! C6 y end;
# r3 M2 Q, c% z; f9 e+ X+ ? newDirection(@);
7 b( H; [9 C- O2 p @.HasOrder := true;3 t- N" j- O$ O ]3 a
end;
( C1 B- a8 W$ M2 U9 A U2 k end;2 b4 D6 \5 @6 u
end; -- of the method0 @+ e4 B* j' y3 z9 i0 V; s
|