/* called by: entrance ctrl of the object 'track'
5 A' q) ?# i$ g% z*/' w" F8 g3 N; L% j6 \& f% H6 E4 Q
is
1 V1 a# e1 h1 ^+ V( ^: z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
+ c" d7 v& ~+ r6 N" X& q. H* Mdo
4 u& u. F8 l; ?# [" O+ U3 t% |! P7 y Lan := rootfolder.Internal.Tools.AOLlanguage;, {' O5 z- D, n( }1 c( j
if current = @.Destination -- else return
# a5 V- `0 H/ i then
, k& ~; e3 t: v) ? @.Destination := void;+ d; N0 X/ ]; ?9 b5 A' s
if @.occupied then
# K" u4 n1 D4 d2 {7 ^! V5 C8 o7 E part := @.cont;
( r8 ]' W7 g2 C" h7 R+ @( K& q @.transpOrder := void;4 a' ]# B9 S& U
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 d4 j+ _- m: `* N$ p @,root.eventcontroller.simTime);# m8 r. L; ^2 ~, j+ t. {
@.HasOrder := false;
0 @ H' y0 z: |) [3 b" k @.DrivingHome := true;
' q w# h) ~: p' W0 V$ w: I rgManager.tryToStartTransOrder;/ Q5 ^" H9 V6 E1 g9 g
if @.Destination = void+ O9 Z6 G4 @2 g
then -- no transport order for vehicle @
0 z4 m/ W5 H. d$ Z, I( y: B1 } @.Destination :=
3 d% I" G+ ^1 @9 p rgManager.nearestFreeStation(@,track.~);
+ V5 x& o1 A. m; L" ~! u newDirection(@); # f& g3 b& j2 l/ P% |8 Z
if @.Destination /= void then$ o7 K4 j% ~# D; ~
@.Destination.NumReservation :=( h- `, \2 G6 z: u, H
@.Destination.NumReservation + 1;1 k+ `9 p9 j$ P ]2 y* {8 m
end;: I0 s" [! z5 m0 X
@.CurrIcon := "drivingHome";3 s0 P" J7 u! ]7 l$ l
@.DrivingHome := true;
, ]! a( I3 O9 I! t5 N, I end;
- f2 X1 B) W# v: t& P8 |4 O/ \6 i else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' P9 a- g1 N; x5 x, l part := @.transpOrder;
3 o2 m+ V1 ]7 L2 M part.move(@);-- load part2 h# Q# K4 b% x5 z
@.CurrIcon := "load";9 p# L' Y% o$ p
GlobalDistObj := part.globDestination;# m8 k& [$ m$ Y9 P! V! i3 J
assignLObj := rgmanager.rgAssignL;
4 g' [. C- K# b' I& R row := assignLObj.getRowNo(GlobalDistObj);
2 O3 H: [, N; S, E B1 x if Row = -1 then -- since 70
& _$ q# b# [4 L+ ]7 c if lan=1 then* S& ^/ x( ^) `; `5 [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Y& ~( B5 ]- v to_str("in der Andockstation: \"",?.~.name,"\""));
# w" B% J, g) n' M/ c* U else
: }8 ~, H% [9 c3 a T, W q0 }0 L8 w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 q: q. F/ J% `& @# k to_str("in docking station: \"",?.~.name,"\""));
1 v% n& D/ ~& h+ f* m end;, P0 X- I4 l3 J( W: D2 t
else
9 T: z- m, ?7 g4 n1 R @.Destination := assignLObj[1,row];# G$ _8 H7 {8 ~8 I7 Q
end; & K& ^9 K y4 n4 q+ Q% D( T9 s
newDirection(@);( M2 q! \9 V. z, B
@.HasOrder := true;
# t9 ]+ }$ `3 ^/ f& Q end;- a# K* M$ ]7 _; p7 v0 M9 m9 K6 I
end;/ J& A8 o1 f' ~) c$ ~: ~! ?
end; -- of the method' O( z3 I M; p, b( b
|