/* called by: entrance ctrl of the object 'track'
$ _( @; j$ O! P) ^8 Q*/& ]! d5 `! C1 g4 }
is
, t* Y% Y( Y! S) G, z: M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ r) p. G. h# B2 r" z7 g, hdo
* f7 d; H- ~1 _0 m1 _ Lan := rootfolder.Internal.Tools.AOLlanguage;7 x& v4 X( t4 I1 @
if current = @.Destination -- else return# v! z# Q! Z3 ?) S- K
then
7 i3 C- ~4 F9 h2 m6 | @.Destination := void;4 w1 l @: C+ M7 {7 ?
if @.occupied then
" L2 D6 t/ S$ K9 H1 a3 b0 T part := @.cont;' |" T7 q! Q; m; H+ p5 R( T
@.transpOrder := void;$ g8 \8 l6 B1 ^" z; e3 r
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' s& L. R% O: [8 O. t
@,root.eventcontroller.simTime);
9 m- s0 Y5 K$ u! U. L; m @.HasOrder := false;
8 k+ |6 g' y8 }) F% r4 p @.DrivingHome := true;; u9 N/ O9 c* H
rgManager.tryToStartTransOrder;
/ V- [( h7 r( H if @.Destination = void
' B! c0 U0 p) |4 W then -- no transport order for vehicle @
) c A* G* e% ]. E1 ]) N @.Destination :=) ]- D" K/ i$ _( N1 a( L
rgManager.nearestFreeStation(@,track.~);
0 M: X8 a1 R: M. A; u3 n' v newDirection(@); ) n. u1 z1 j7 e E
if @.Destination /= void then
, ~+ w# c3 d5 ]) H( Y5 e! B @.Destination.NumReservation :=
7 B. q' D9 ]/ ~6 \% ]; _ @.Destination.NumReservation + 1;
9 u2 A& Q8 X. D' a5 u end;( o C; [/ [5 y; t8 Z
@.CurrIcon := "drivingHome";
" `7 N w* n( B$ ?5 ]* h( z- y$ P7 M @.DrivingHome := true;4 \, S7 L$ `$ o' Q! ~$ g3 q
end;
" K- N8 W1 `/ n# g @- d I% a else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 p9 `$ \3 D6 e$ c0 a" B+ j
part := @.transpOrder;
" _# ?; ~; U: V9 m* ^* o; X part.move(@);-- load part. w" {0 o, b6 x3 d
@.CurrIcon := "load";6 W: U2 T' D/ e6 M/ d9 O, Y; j
GlobalDistObj := part.globDestination;" z: t n- v( |/ l% t1 ~& |
assignLObj := rgmanager.rgAssignL;
- C$ Q# `2 l9 R9 i/ U4 h, \, e% K row := assignLObj.getRowNo(GlobalDistObj);# p* f1 Q+ p4 x& Q$ G) p( M$ y
if Row = -1 then -- since 70
3 y- L% P: r; ^5 {( E& q. |5 R if lan=1 then
7 b, [+ e1 E. Y4 c/ Y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 }9 Q! i1 G( v6 \8 R! W* } to_str("in der Andockstation: \"",?.~.name,"\""));
1 P& D8 R! w- F: t else
& Z+ `0 f% O2 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 G& [4 x" B1 i2 B: ~ to_str("in docking station: \"",?.~.name,"\"")); 7 \! {3 b. k2 d+ W- o
end;, u" E+ y; O* U- s A! p4 @
else; r: _7 d1 L$ ^, l, n: n, W/ z
@.Destination := assignLObj[1,row];: w: x5 U. Y; |2 H# a' t
end;
# _ T1 I {7 K; R( x( {4 [, t newDirection(@);
! \& ]% }$ W0 X- N) |" Z @.HasOrder := true;) f8 _! Q8 ?# m) p7 n. K
end;7 _1 { g; O) z* W$ q1 O( n3 [9 \
end;
' `% u# W( L% }- y3 V# y/ v/ Oend; -- of the method
7 n/ |+ w) X1 h6 R' \1 u% \1 J |