/* called by: entrance ctrl of the object 'track'
' e/ @( c: z4 s+ c*/
9 w/ y1 k. x6 h( J! Ris6 N7 n% Q: v( s5 A; ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ R) H8 d" q, S- j' L( |do$ |$ |0 U% H0 b) S( B
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 i. @+ S) C. L1 |: a if current = @.Destination -- else return$ `# R# Y9 ?& B4 {8 C
then
. G/ o5 T. P& A: A @.Destination := void;
1 \& h/ w9 c3 R% b6 e/ e' M6 {; F if @.occupied then
3 V6 Q/ ]6 l! S( q part := @.cont;
6 p3 L6 H. R6 c* v7 ?# b @.transpOrder := void;
( \8 N' U4 f3 w3 {3 @, C" }' A& X1 M4 Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ \; N+ K; ]! z5 V4 a @,root.eventcontroller.simTime);4 C- u8 W7 K0 K
@.HasOrder := false;; u; S- i2 d9 A4 f& J0 k+ m7 M$ s4 S6 j
@.DrivingHome := true;9 s2 |2 E$ P8 \
rgManager.tryToStartTransOrder;
8 Z8 u7 N8 |; o3 g& D if @.Destination = void
! _5 `1 e# P$ ^, V) P( } then -- no transport order for vehicle @
& n1 k1 `( o. q4 I, b1 T i7 D+ C @.Destination :=
8 M8 n. @/ p) {) b rgManager.nearestFreeStation(@,track.~); [5 ]0 ~/ l$ J+ l, ?
newDirection(@); & F. n2 z9 {: A' k5 Q; u$ W2 n
if @.Destination /= void then$ X7 o/ C% X* O, R
@.Destination.NumReservation :=
; I3 O. f9 u1 l( ] @.Destination.NumReservation + 1;
1 X+ B) Q7 p2 [# ^" q end;+ B' h5 ]& _# V0 `4 p
@.CurrIcon := "drivingHome";, h! j7 Y- r% C+ E
@.DrivingHome := true;; v7 F! j7 O7 I1 b" j
end;
) c6 U9 D$ Q! }! D1 _8 ~9 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 O/ J& J8 v% k2 i part := @.transpOrder;, ~- i; i, k2 D& q% t, J M
part.move(@);-- load part
/ N: V" R% V: x" s @.CurrIcon := "load";' o: h7 r) |- n- z4 z, D
GlobalDistObj := part.globDestination;
- T, v/ H, }; Y/ G# h assignLObj := rgmanager.rgAssignL;
" c: B1 s+ h3 l; Y0 R3 R row := assignLObj.getRowNo(GlobalDistObj);+ ]# Y0 {1 f3 W5 W
if Row = -1 then -- since 706 R1 O8 N) L( I/ \5 o
if lan=1 then+ R+ A5 x/ Y- V6 R) a0 E0 t8 U! U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( p# I& A4 J2 ^, n2 k7 a' I- \* }
to_str("in der Andockstation: \"",?.~.name,"\""));
% \) Q2 j) E$ z, h else' y+ d& E( R% Z4 l0 \- E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. ~4 l: E; y' P4 D0 \/ k5 m- p* m# j
to_str("in docking station: \"",?.~.name,"\"")); s& Y) K H) s6 R( g: ]0 ?: z
end;
9 {; _8 @5 A# M0 Z' a else
* a1 J: U: v7 G* f P4 Z) [% x @.Destination := assignLObj[1,row];
& q# l" E7 s. i end;
9 z+ |! @# c5 a+ v newDirection(@);3 L1 r: o" W7 x
@.HasOrder := true;
5 ]3 ]- G+ I; ` E5 A0 l% T* A% A end;" j- R% |6 ]7 k
end;7 ?( l+ } z& q6 u
end; -- of the method& R2 k6 U( H9 K( Y1 X
|