/* called by: entrance ctrl of the object 'track'
4 \3 K) A/ i( w- ^; x7 t*/ J% o0 K8 |* R( {8 D3 {4 V2 O- ]
is) Z7 F% Z8 d! f# ^; v* U4 b9 I' q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 W2 Z ^5 i% @" Mdo6 f2 d/ l- @9 F1 [3 e& h7 {) _6 ~3 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
% o1 B, ~0 ]! z9 A6 V if current = @.Destination -- else return( k o) {$ _! u% O! w1 z* Q1 l
then
3 n& _' y3 N. ^# \& @4 Y @.Destination := void;
# h' N3 ?/ m- Z! u6 k0 w4 X if @.occupied then5 o+ ]/ G: f7 T
part := @.cont;1 K ]+ G3 N) |( h
@.transpOrder := void;
9 I9 `& a+ N9 r/ n- c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 z# u1 U( c7 G
@,root.eventcontroller.simTime);' s( F4 K( n6 E$ c
@.HasOrder := false;1 M3 c* @+ e b
@.DrivingHome := true;
" U5 W) H6 J. Z4 | rgManager.tryToStartTransOrder;
/ ~% W; t1 X) x0 ~9 z t if @.Destination = void7 ?' @, x I5 D6 \3 \; K
then -- no transport order for vehicle @
% i% d" g" _* O @.Destination :=
8 U4 q+ I Z8 L6 n: P4 | rgManager.nearestFreeStation(@,track.~);
7 b$ m7 [, N9 g/ z newDirection(@);
! o- y0 t' U" g5 }( O if @.Destination /= void then" F2 k' A3 b9 N9 W( u
@.Destination.NumReservation :=
# k9 \- D, A, Y: d4 Q( J @.Destination.NumReservation + 1;
; j: ?0 R: W0 E) i+ e8 g end;
2 Y- q5 F0 T" n1 d0 o @.CurrIcon := "drivingHome";
; K6 b# G. D7 @6 @6 Y* a1 e @.DrivingHome := true;3 v: v+ W2 i \, l' D
end;; N9 x# U* h' A8 q. m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ E7 }+ {( D$ m8 x
part := @.transpOrder;* j" f) G2 W, c+ g3 ?
part.move(@);-- load part
7 a" {' y, }# j4 O# m @.CurrIcon := "load";
/ i l0 Y7 F/ }! `4 A& p' s GlobalDistObj := part.globDestination;
1 T h7 c. h9 g assignLObj := rgmanager.rgAssignL;) ]1 A0 H) T7 y* O
row := assignLObj.getRowNo(GlobalDistObj);& Q2 N9 ^, d% T J6 s% R
if Row = -1 then -- since 70: V( W5 N2 D' x' F7 @, N
if lan=1 then
9 Z) t5 u k. V$ p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ {' Y/ W4 V$ g& d2 y& Y" s
to_str("in der Andockstation: \"",?.~.name,"\""));" p% F+ |. B" u; Z
else
8 d- y7 m7 X1 `+ e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 }+ H7 |, L1 k$ _' `. B; @ to_str("in docking station: \"",?.~.name,"\""));
& \ k4 |/ ]! g end;6 M0 f2 g, f- R# U3 `4 F: C
else
2 T6 f7 r e% ~, C# J, _6 L. z. L @.Destination := assignLObj[1,row];8 Y! Q7 |# e* X. L
end;
* [$ b# w; [6 _/ k/ } newDirection(@);
y3 h6 b# o1 B' _' ` @.HasOrder := true;3 m9 ]. B% c3 |% @" q% Z
end;) \, U& I n- R& M1 Z; }
end;+ e& n9 s0 W4 u& n
end; -- of the method
% X5 e4 F1 V" b |