/* called by: entrance ctrl of the object 'track'
! z; ]% P0 Q" O6 Q*/- h' d" S& `) L. S6 @3 d7 i
is
7 F( J% i' x6 D. l+ c# Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 o# r5 _0 B% ~" M- H! bdo# S5 O! h7 N! F$ r; G) r# j, b# H
Lan := rootfolder.Internal.Tools.AOLlanguage; W) B6 O* K8 S) Y8 P0 n4 T0 f
if current = @.Destination -- else return& x2 }' f. g3 L, L6 ?! V3 Z) [ ^* F8 A
then0 Y4 v* U! b G2 r- ^7 \
@.Destination := void;
/ E# ?0 J& q4 ?2 C* s5 i5 y1 S* Z if @.occupied then# t- B" O# X' n, P
part := @.cont;! X) A K; u8 R; |# H
@.transpOrder := void;
! f! Y Z/ i4 p9 k part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ C/ ?! j/ Y6 W; D6 x. I' i
@,root.eventcontroller.simTime);2 D* ^( b- r/ K
@.HasOrder := false;
$ T0 b! B, T7 Y$ [! w! ^# L @.DrivingHome := true;
; n! [. {; ]/ u rgManager.tryToStartTransOrder;7 J% r: a) U0 Z4 T
if @.Destination = void
0 Z* q* {/ C5 U" o; X: d then -- no transport order for vehicle @
0 a2 Y* _- E- P0 w" X4 n$ l @.Destination :=
9 i: Z A1 ]" j+ o6 h! w rgManager.nearestFreeStation(@,track.~);
" ^: h' I/ C( \8 n* r% r$ h newDirection(@);
- w; Y- J& E2 C' c4 U% l- U4 b if @.Destination /= void then" R' z" T# `# M$ x: l3 ^
@.Destination.NumReservation :=
! f* i+ ]3 h% a% C2 Q, I% k @.Destination.NumReservation + 1;) h A, q$ Q% s; Q) v( e. w6 ], j$ k
end;, h0 D; w$ z9 z" S! l
@.CurrIcon := "drivingHome";
2 \8 g3 Z( n& V) D0 o | @.DrivingHome := true;
4 S6 T0 M" C, d end;2 s6 _ q6 x$ b& t3 {5 b% z! @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 |/ Q. w2 k3 e& E6 u5 `, D6 c
part := @.transpOrder;
& i3 }$ E6 U- y% l7 P) q$ d part.move(@);-- load part& Z# Q- S* M% g" c1 _) _% a
@.CurrIcon := "load";
7 u' s+ M! u" D. `: [ GlobalDistObj := part.globDestination;
" K* N& e* v4 _8 K' e/ ^8 s) O assignLObj := rgmanager.rgAssignL;
@$ F9 t3 C8 y8 C' n1 b- }; N row := assignLObj.getRowNo(GlobalDistObj);! L8 D6 W7 w, R/ Y3 h& \
if Row = -1 then -- since 70
: z9 p$ P6 O7 o. W if lan=1 then
( P5 ]. o9 X5 Y: x3 D9 A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 B8 d7 O( L. b/ z; `/ |
to_str("in der Andockstation: \"",?.~.name,"\""));7 J% H, x k( }7 N7 p( _
else
! j. K& { P9 ` promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' \* v& U: r2 R2 H9 T! }; ~: s0 [ to_str("in docking station: \"",?.~.name,"\"")); F( r$ I& P6 F& G& ]* j
end;7 U/ H. z) V* y& M" [1 [
else" i2 j4 U4 h+ s8 l6 s
@.Destination := assignLObj[1,row];
9 S1 w1 I4 n) L! s5 t, w0 Y% o" w" I end; . C& b% G9 A) i4 a
newDirection(@);
, }# J: x7 M. J5 c9 e @.HasOrder := true;, O# ~9 x& P( W0 m2 \6 z) ^! c/ @
end;8 J; S. [9 n, ~, z4 x/ j, G% U7 g. E
end;7 y" g" s- r9 t5 m0 r- ?, Y4 l
end; -- of the method
3 V) H C1 Q' V |