/* called by: entrance ctrl of the object 'track'
0 D5 g( B% ]3 d3 R*/* c8 J' ?+ T( j4 v6 z
is
; u! \$ o) K& \+ t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! A+ D# F* r1 c# c2 ]do9 K8 h: R# c. d9 U! R5 Q g y' z
Lan := rootfolder.Internal.Tools.AOLlanguage;( `9 v+ T7 R( H
if current = @.Destination -- else return2 q) _5 d- b0 c- c! I
then/ S* ^/ x4 K$ s9 Z8 T E8 _$ z
@.Destination := void;# P& _5 _' d3 I0 O k! l" w
if @.occupied then
" C0 ~8 \4 F' T+ _% p. d part := @.cont;! L. v/ X/ p* a) Y: }7 C
@.transpOrder := void;% O1 P- I# P4 I( r' v4 K4 _' N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 @$ f) W% ~, r j
@,root.eventcontroller.simTime);
- H# n* Z C' x% j/ g @.HasOrder := false;
: I' m* l( ~8 e8 q1 i @.DrivingHome := true;% x/ }: V/ V2 n4 Y( {1 k
rgManager.tryToStartTransOrder;+ K1 X/ Q7 }' n; A; C& R* f2 m
if @.Destination = void
4 E: n* x9 M, d" g then -- no transport order for vehicle @
( m. v& }' d& p7 V7 V1 Y2 o3 }6 u4 p @.Destination :=
# r& P' Z6 c( M! E rgManager.nearestFreeStation(@,track.~);
8 l5 V! }6 N, ]6 W9 o$ u8 L newDirection(@); , m/ u L9 I( O+ \! D. W' |
if @.Destination /= void then; n) z8 T" o- G& k' m9 n2 v
@.Destination.NumReservation :=" Y* e6 a( l" J8 O; m4 o2 b/ v
@.Destination.NumReservation + 1;
/ e! c' M5 K, w: d- Q, @2 U end; ^1 j# w: ?5 j! a. I5 a3 U0 w! V: A
@.CurrIcon := "drivingHome";
% ?: u: j" w3 c/ I. F. p @.DrivingHome := true;
) m! b6 V' l& D$ b end;+ ^# U" G7 @6 H; [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* B4 E- w- {, C' x) c part := @.transpOrder;! B: Y# L4 M- x- `% J5 Q* j
part.move(@);-- load part" t q" \/ e! B7 [& H$ c. E
@.CurrIcon := "load";
- i( n, w4 \9 k8 j* a GlobalDistObj := part.globDestination;
' w6 d# m u8 e1 k' k, v6 L assignLObj := rgmanager.rgAssignL;) v2 a3 z4 x0 ~" L8 e
row := assignLObj.getRowNo(GlobalDistObj);
+ a7 f3 n; k7 p* y9 _ if Row = -1 then -- since 709 T; k& O' A/ \8 r
if lan=1 then
: I. w) S5 Y( l/ K, S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ _; U3 ~8 _4 [) ] to_str("in der Andockstation: \"",?.~.name,"\""));
! ?8 k( g' {7 N- Q else$ \8 u4 s1 P# h& i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) a3 S. t7 m) j& u
to_str("in docking station: \"",?.~.name,"\"")); 6 ?" q) w0 c5 r; b' v: w
end;
! o {* q9 P2 L% O7 W else2 [( X8 {. d$ V: f+ _
@.Destination := assignLObj[1,row];9 t8 [1 e# Q6 Y/ R3 ?4 G/ H# R
end; ! k7 U8 S7 A4 l! y6 h3 p, t5 r! |! }
newDirection(@);- E \! \4 W( M
@.HasOrder := true;
& f1 {4 A* A; j8 k end;
+ o$ f5 B- \3 W% `7 a end;1 M. I. {* G% n) Q5 _* w
end; -- of the method
) w: j" x# }9 X4 P |