/* called by: entrance ctrl of the object 'track'1 p. ], k g- V0 p) Q
*/
9 g. G: ]% N; z' Eis
) n& {: v" n l8 W2 y1 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
. {: `9 `9 v3 D5 j5 ^. Ldo' U$ u3 c( W ^- G+ _
Lan := rootfolder.Internal.Tools.AOLlanguage;
. L+ R/ C7 b9 Y2 e if current = @.Destination -- else return6 O7 ^9 K* ?* n" g2 U2 W& U
then
& o1 @+ V7 @" n- e; j" Z6 F @.Destination := void;9 ?" h; |) t% E/ K( G
if @.occupied then
; Y1 ~ ~ r( O5 q) @$ |( I part := @.cont;
# w2 Y4 Z7 N0 @( v @.transpOrder := void;) _9 U2 ~; C; p5 q) N- B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! a1 \& g$ z4 D
@,root.eventcontroller.simTime);$ s, F/ f: d4 ]* T1 u' O
@.HasOrder := false;$ ^9 j( |1 f% N& O- O- z2 e
@.DrivingHome := true;
; p. ]+ c: C3 O( B- [7 n8 ] rgManager.tryToStartTransOrder;3 \3 S' Z6 r; w( e) u3 e/ V' i
if @.Destination = void
/ ~" K; R5 R! w then -- no transport order for vehicle @
+ ?" T* D' k) D! f" x. t. w @.Destination :=
7 p: { J! u) Q/ W% ~' T rgManager.nearestFreeStation(@,track.~);
2 D0 @! W- s' B( L newDirection(@); ) x' g7 s4 M: n) E; A3 J% {
if @.Destination /= void then5 b/ i/ u$ R6 W+ D
@.Destination.NumReservation :=
# F, [! X/ L8 L! z4 D @.Destination.NumReservation + 1;( U+ e9 w5 [/ V+ A0 b( ^. |
end;
0 l$ k4 y8 a% S @.CurrIcon := "drivingHome";0 M. w) W# u1 ~7 a2 o1 l' \9 [
@.DrivingHome := true;
7 M$ U% C" T. o2 N8 e1 m end;8 I, i V# I8 ^+ {! g8 v0 b3 A' k/ b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station p2 n3 R& S% y; N; K
part := @.transpOrder;
6 T: m8 w5 N$ T: j: h& r part.move(@);-- load part6 s. R; \5 u3 ^9 |3 q i1 c
@.CurrIcon := "load";
" k$ K7 a) z9 A2 J( v# N! p GlobalDistObj := part.globDestination;$ ?8 E9 w+ N5 _( s) C+ v
assignLObj := rgmanager.rgAssignL;
' g5 w# o2 f% H1 R, E row := assignLObj.getRowNo(GlobalDistObj);# H- j' F$ g0 c3 T: _
if Row = -1 then -- since 70
6 n$ j" E3 i& T" \) E l if lan=1 then
' B/ Z6 R, n e0 G0 A! ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) q& p& z( h0 `" |
to_str("in der Andockstation: \"",?.~.name,"\""));( x) I/ x( J3 m$ r$ y0 q7 X9 C
else- O. ?& o [( `- U U" h# ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! G$ }) n& S" A' p; e
to_str("in docking station: \"",?.~.name,"\""));
# V: F0 W( C! M7 D end;
5 i7 B* t0 s1 l else8 d- q( x# t- c3 a1 c, C
@.Destination := assignLObj[1,row];6 B# f E* T% f0 S1 o/ w2 ~
end;
, d D) ?' i0 V6 F) Z; E7 h& c newDirection(@);
# _* [5 q& H4 V! {$ H- t4 | @.HasOrder := true;
1 N ^8 \$ X: N7 K" b$ d' w end;: D3 s3 g8 s- g5 N1 x
end;
4 m" L3 W# u0 T- l" ]3 N% `0 W) Bend; -- of the method
6 H$ G) L5 G) ] K8 p+ K8 i$ u* p |