/* called by: entrance ctrl of the object 'track'- |) V' z! v; {1 ?' D* _
*/
5 _" r' m% ]% I5 y. ~/ C: Dis5 ~8 d% x3 a- T/ `& c
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 ?$ l8 @/ R4 [+ w I
do
( Q" v% }3 ~& h0 c Lan := rootfolder.Internal.Tools.AOLlanguage;! b3 f/ C L Y- e: \( a
if current = @.Destination -- else return
/ b5 {& c* P$ P' @; H) {- w then3 R8 U5 T$ Z& _8 x
@.Destination := void;3 K+ V% B/ y U& k5 U+ r
if @.occupied then: [! H5 l' i: p( z; f; n6 P. S t
part := @.cont;/ n8 c; ?& h( {8 x# V
@.transpOrder := void;3 b& H% W V- F/ B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 E+ u" R8 O; G
@,root.eventcontroller.simTime);: x. I5 ~3 P# l5 i" P. `
@.HasOrder := false;3 Z+ ]4 T b: u( ]2 u
@.DrivingHome := true;( v. o) d( G; X6 ~ Q {
rgManager.tryToStartTransOrder;
$ ]- V/ i2 g, |9 m% \ g1 w if @.Destination = void2 _ E8 }6 N8 u7 `& ~3 A
then -- no transport order for vehicle @% V1 w+ t# u d0 e7 ^2 N/ w
@.Destination :=
* {6 d1 b$ m- ^+ h% k9 ] rgManager.nearestFreeStation(@,track.~);
0 g W" X/ b# W) u newDirection(@);
1 f' R, S) F5 P5 @! L8 l if @.Destination /= void then0 c9 P8 b' y/ N) _
@.Destination.NumReservation :=5 u) u* p/ d. Z/ |
@.Destination.NumReservation + 1;3 K& d7 S8 ]0 G: e7 O
end;! n, H; d0 A: X* R5 `
@.CurrIcon := "drivingHome";8 a! r- O" U% U8 V) z
@.DrivingHome := true;) J( D! V9 Q4 ~0 }( p; f' p1 ~
end;
- |- V$ H( ? K6 P: V else -- the vehicle @ is empty, both vehicle and part are in the same dock station% H1 r) r' |8 ]: O9 P
part := @.transpOrder;1 v) y# B, p3 e1 `! M
part.move(@);-- load part) a( c% L G8 ]0 K! A. W7 O
@.CurrIcon := "load";
' Q8 ^- `) v7 e0 j7 J2 v GlobalDistObj := part.globDestination;# ^. h9 n+ _) K3 [3 M# `
assignLObj := rgmanager.rgAssignL;2 \; s2 `1 A0 E3 x7 H
row := assignLObj.getRowNo(GlobalDistObj);
$ ^# u7 A1 a0 g: I1 b/ D if Row = -1 then -- since 70
6 L& d; ]8 i0 v5 l9 q6 o" L) o if lan=1 then4 Q+ T# u3 }" W0 Q8 D, I" g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 I. \; |- w* N to_str("in der Andockstation: \"",?.~.name,"\""));
* [$ H# D& y3 h* ^ else; C% j' v! s) E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# J+ p. \+ n8 S, l" l7 _ to_str("in docking station: \"",?.~.name,"\"")); * U; J/ p! r- {' q& K
end;
% D' A% s0 a7 O- \& E! ~ else) J8 z9 p/ I" O+ f
@.Destination := assignLObj[1,row];
/ q. x. V- T9 C' A end;
: b, B1 [0 K: j3 |! _ j newDirection(@);: \, R# U( V$ Y. w; Q% G
@.HasOrder := true;$ _5 B+ f6 w6 G0 D3 Y! @
end;% D! V9 H4 z- W/ g3 H: v+ f
end;
# B T2 P9 J5 u- _1 Z2 ?! hend; -- of the method+ ?2 G* }" p" S( ]: f9 o
|