/* called by: entrance ctrl of the object 'track'
& [3 D! X8 X! v- b8 E8 i*/" r+ r5 z' `/ f3 D' t0 w- _
is
. G+ X& c3 M/ s1 Y2 l- s part, GlobalDistObj, assignLObj:object;row,Lan:integer;, Y) g# T5 {2 J5 }1 S: x$ ~4 d
do
: F/ l* I; N6 n Lan := rootfolder.Internal.Tools.AOLlanguage;- a: f% g" p2 z( z5 ~ ^: D- B
if current = @.Destination -- else return
' i/ f* Q/ B7 {; |* M7 u then
- X& J% x- k3 ~. J: I' W @.Destination := void;
" g5 H' ?, E0 B% K+ p if @.occupied then
5 ]3 Q/ |4 ?+ @ s part := @.cont;$ s1 r5 Q E: Q( X9 N
@.transpOrder := void;
9 t' q; _) F- V: P1 B part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 j0 Z% X( g6 T @,root.eventcontroller.simTime);8 a+ i3 ~) B* d& ?2 i0 g" i
@.HasOrder := false;
2 t& e! I+ {& Z& H @.DrivingHome := true;
; M* x; \6 _8 v: {+ y' B rgManager.tryToStartTransOrder;
6 A) t) _1 [! m+ W/ y# N; E if @.Destination = void- E2 Z* ~# _6 i! v& U
then -- no transport order for vehicle @$ r# W J4 z% N5 G9 y/ W5 }
@.Destination :=5 m/ u; a: w, z
rgManager.nearestFreeStation(@,track.~);1 x4 k& s' I$ c, C* D
newDirection(@); % U4 z! p* F, D. Q1 }
if @.Destination /= void then
7 {/ W& \8 N0 Z/ g @.Destination.NumReservation :=3 k6 o& w( C; j, U0 C% c& D* N- u
@.Destination.NumReservation + 1;. [. n' o* T3 J
end;
& ^1 Z; ]! M3 |/ }6 z) i$ @& ^2 A @.CurrIcon := "drivingHome";5 T1 }& n: i2 k- U
@.DrivingHome := true;
) [1 g- \0 d: G$ w/ S0 N" k end;6 w( Z0 o" y5 n& O% [2 v* o2 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
6 d" D" t* @4 t: |$ M4 o- l( T! l part := @.transpOrder;
" |$ b W$ d3 y! M part.move(@);-- load part! {) ~9 E4 |. Z( U
@.CurrIcon := "load";$ o/ _9 r6 S: k
GlobalDistObj := part.globDestination;- L s6 @3 R# b$ b1 U2 F1 X
assignLObj := rgmanager.rgAssignL;
8 b5 m' l+ q, M& B) O row := assignLObj.getRowNo(GlobalDistObj);
, E0 v# z5 i& J2 U5 l; C if Row = -1 then -- since 70$ n/ I1 ]+ A2 G
if lan=1 then0 J& c+ Q! n- Y# @7 t; V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 Q" H2 O' ?& P
to_str("in der Andockstation: \"",?.~.name,"\""));
+ u" @! f! l h$ I8 [4 V- y3 _0 _ else. m+ K$ c& Y+ U$ ~ g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- {# ~/ G' r( B& t* x$ ]7 j
to_str("in docking station: \"",?.~.name,"\"")); 2 I$ c( X; |9 l0 U6 T
end;! v1 D1 ?% Y6 L( p1 ]& G
else
, H8 [4 Y. U) m5 i+ U. l @.Destination := assignLObj[1,row];' W4 B4 Y4 Y; X/ A6 Y
end;
( X5 X/ d! G: i* z! m$ ?7 h newDirection(@);
& i6 [" B% l& J2 c9 E! h% e @.HasOrder := true;* P5 x8 F" u8 y9 Q0 d( x
end;' J* Y6 g7 O$ G; I8 X; P
end;, |- v- ?( x4 w( N1 c
end; -- of the method: t" h8 w+ x1 M: [* Q- O) ~
|