/* called by: entrance ctrl of the object 'track'" N! i- T, ?1 {9 p
*/( R( S6 o2 b% ?
is
/ z4 U1 S3 [* y" b2 T) f9 Z8 M part, GlobalDistObj, assignLObj:object;row,Lan:integer;! b4 e' B' \. T1 S
do) c, `* E; {- _1 Q6 ~. {( V( f
Lan := rootfolder.Internal.Tools.AOLlanguage;
# ~) c3 r7 _. [# R4 g6 r if current = @.Destination -- else return
% l/ J# K1 l$ w4 `0 c then
; n7 k$ [' G3 o* _ @.Destination := void;; x, @1 J d* L! t' t+ U, a/ D
if @.occupied then1 {2 Q9 \0 ?3 M0 ]* S; ]5 t: O
part := @.cont;
2 u% @+ C" X" N4 }. u' s @.transpOrder := void;5 [% H) G7 k! y6 Q, m0 s
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( z/ }2 _( ~( Y( x1 @ @,root.eventcontroller.simTime);
. C' r# w- a. P& L) g! j: v @.HasOrder := false;# _9 E& y) S: o' D: x( K2 C
@.DrivingHome := true;% p6 l9 E1 q5 F9 K q9 @
rgManager.tryToStartTransOrder;
3 A3 |1 h" U' |: e: n if @.Destination = void$ Q6 \8 k1 N% N- O0 I: b- d
then -- no transport order for vehicle @; a4 Y4 ~$ `2 N1 y! g
@.Destination :=
7 B. W7 f! H9 W* Z; ]1 o+ p rgManager.nearestFreeStation(@,track.~);# d2 g- c7 b- q: ] n3 k( V+ I
newDirection(@); " Q) r0 G8 i0 o' c9 H( s: i
if @.Destination /= void then1 C `! f* r. V6 q' z7 v
@.Destination.NumReservation :=7 p9 s2 l Q5 K2 s. D8 q: `8 K
@.Destination.NumReservation + 1; x/ g6 G% G. ^
end;
0 o: m- \; R5 N. _ @.CurrIcon := "drivingHome";
* s g: S8 A- g+ J! n. N' P @.DrivingHome := true;
" ?9 f# j3 X3 u1 T3 P end;1 K4 L1 N4 @8 G, ^, ^
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- @* F: @$ C/ r# m" M5 r part := @.transpOrder;
( T& }- @9 l0 b/ S* r part.move(@);-- load part9 z2 k" v: R3 U0 K% ]! G. ?2 s- |
@.CurrIcon := "load";. H7 h5 i4 A- y1 |5 c, Z
GlobalDistObj := part.globDestination;
, l% d3 L3 c- o+ N. b assignLObj := rgmanager.rgAssignL;' |# d3 g. x* r. e8 W$ R
row := assignLObj.getRowNo(GlobalDistObj);" I& K# ~& o) `
if Row = -1 then -- since 70
" ~: X% A, i! J, N- A3 P if lan=1 then0 A/ g K- J0 f& I1 C( {. V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* u* O: {3 t5 r4 b2 v0 L0 c! _ to_str("in der Andockstation: \"",?.~.name,"\""));+ G5 W* b0 V4 Y8 R* y
else: T; @: m' h( g; f9 v( F9 L( z
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' U* H! E& D B- g: d+ i
to_str("in docking station: \"",?.~.name,"\"")); ' u: J) \& W, D3 ?/ V" u6 e$ D
end;, d# K8 b+ T! d
else
8 x0 i/ R* G: n) c7 r! d/ t. M @.Destination := assignLObj[1,row];+ Y2 E4 e3 d% f" P
end;
9 q; v7 ~9 z* q3 \8 q newDirection(@);* ~( d: B0 \4 N2 ]8 I- H* X
@.HasOrder := true; i5 @+ c! @7 `
end;
7 K: F' U& q+ T2 `) M/ P* s end;: \% q4 {, |6 |2 e- C6 `
end; -- of the method) ~& Z" Q* Y) e
|