/* called by: entrance ctrl of the object 'track'
/ e8 J* `% m0 I3 `( E*/6 o$ O: v; i/ a
is
- Q) K1 K" X6 G8 C) U# R1 ~3 x part, GlobalDistObj, assignLObj:object;row,Lan:integer;- T& w- b. a( `
do
% d5 ]) N7 s. N Lan := rootfolder.Internal.Tools.AOLlanguage;
/ w& J% P7 C6 E8 e0 z; K5 ]2 D3 H if current = @.Destination -- else return
8 D2 X* Q0 d o9 J$ `" P then7 N, K: q& X: u, Z7 n
@.Destination := void;' o- j! P3 ] z
if @.occupied then
9 \8 \. i, e3 ^+ f0 w part := @.cont;
1 W6 T+ N1 t8 M5 s$ ^ O @.transpOrder := void;8 s3 H6 G, g$ r+ m0 Q2 n8 Y9 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 U6 Z# y( V9 C) ?- w( r" d
@,root.eventcontroller.simTime);
: J& W' q) _! A* h) L( u! c: F( h @.HasOrder := false;
I& ]$ i4 }; K, S% R @.DrivingHome := true;
( K5 N% p1 i' ] rgManager.tryToStartTransOrder;
1 A1 |% {2 A, V; w+ q+ Z! A if @.Destination = void6 P e5 \6 @& k, t4 J; ?, c$ s* T
then -- no transport order for vehicle @% l i$ w1 c- K" K' c9 C
@.Destination :=2 m: H- r6 V3 b% |, G3 K
rgManager.nearestFreeStation(@,track.~);, t# K6 b) ]6 W) Q& w
newDirection(@); i- n% g& \9 t7 h# C" O5 B. m" Q
if @.Destination /= void then$ G {$ s0 U0 Z2 v, E# h4 f
@.Destination.NumReservation :=
& S S! [# S- g, W7 e: d3 ~ @.Destination.NumReservation + 1;* G% D( w9 d6 L/ g1 B1 I. b* Q) C5 {
end;
9 [5 M- @2 I) e/ Y. f @.CurrIcon := "drivingHome";
- p2 Y. m$ a! d9 n1 v4 J/ Z6 s @.DrivingHome := true;
0 x" R+ b5 _( s, u: x. L" k end;& f3 A$ X3 w+ M6 g6 L+ u- N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 H& m5 e' L" N- M5 A G' [: s part := @.transpOrder;8 v7 Z) [1 M; h
part.move(@);-- load part" h0 j' z" I* v) f
@.CurrIcon := "load";
% `* V/ o! Y z/ `# D GlobalDistObj := part.globDestination;1 w! Q) z7 G( a% W- C9 ]) @( K! u
assignLObj := rgmanager.rgAssignL;
5 ]4 D7 T( @% A9 N/ v row := assignLObj.getRowNo(GlobalDistObj);- V+ k$ S1 B8 L" j3 [4 t
if Row = -1 then -- since 70
0 z3 k7 o0 i5 p @5 y if lan=1 then/ W* o& T: _$ T1 u; ~
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: Y8 J& n9 L0 _* z \ to_str("in der Andockstation: \"",?.~.name,"\""));5 m' P3 B6 W, g8 Y& u2 k' }) d
else
/ R9 s" s" M- S3 s0 d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, g3 i3 K$ N% x- F
to_str("in docking station: \"",?.~.name,"\"")); 2 i4 Y# h; k$ O2 }
end;8 s, J4 y3 e# }" S- S) r8 T3 C1 l! g
else: W$ I' n/ j% @8 y) f
@.Destination := assignLObj[1,row];3 ?5 ?/ E/ y$ G2 Y( F0 n+ U
end; ' Q1 U3 n6 t) m
newDirection(@);: l: W3 Q2 R v
@.HasOrder := true;! m3 m9 K- i1 G% u
end;& }2 s: r9 _( \0 Z" H1 f- w
end;9 S7 E: H; j, _8 K+ P: ?! @4 W
end; -- of the method9 V8 [! W- j. Z1 u0 Y! G
|