/* called by: entrance ctrl of the object 'track'
5 B% _1 L0 Z" W M*/
# c% D: |" J' [5 b# Q. _is
0 T! A' W2 N. L- b part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 l& x1 S( D6 Q% D! @0 L9 O# Wdo
D, R' D, G6 _/ Z5 M9 p1 p" u, ` Lan := rootfolder.Internal.Tools.AOLlanguage;8 z3 n2 c1 v7 I G
if current = @.Destination -- else return
8 B- P6 |2 b/ J- ]' m then
$ {( j4 G- T8 Z4 I @.Destination := void;
9 S" ~4 P7 Y# r- Z, I6 o if @.occupied then- A3 v- L3 {9 @2 ^* F* h- a
part := @.cont;
d; `- K7 f1 ]# y$ D2 G @.transpOrder := void;" e9 ]0 l7 x8 O; G" V5 ^+ q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 ~8 Y% Y2 C; `7 ~- ^( ] @,root.eventcontroller.simTime);
* \6 c- s+ g6 K4 w# t& e6 D8 `; P) U/ \ @.HasOrder := false;
, X/ L1 m K4 A" | @.DrivingHome := true;! n5 q2 C# i1 m+ _4 A, J# B; V
rgManager.tryToStartTransOrder;
2 C! p" K" n! C) ~8 P) d' i% V if @.Destination = void0 l1 N- N/ v7 k5 j \% C
then -- no transport order for vehicle @( Q" n0 g, `. r' V) q2 l- G
@.Destination :=
6 T @2 e+ L m) e8 c. p rgManager.nearestFreeStation(@,track.~);5 b; F/ k& f c" x. T
newDirection(@);
5 X4 M0 V0 s) z) P if @.Destination /= void then1 D- b' N) |% Q, u5 L$ E
@.Destination.NumReservation :=: ^5 Y; o, |# y! @# e
@.Destination.NumReservation + 1;, n7 {0 g# |) z( k z2 G F
end;2 w& Q2 b, ?/ D! K
@.CurrIcon := "drivingHome";# D+ i+ S; E) x, j( v
@.DrivingHome := true;8 h4 o5 G# _. {, b& O3 ?
end;
- Z' x& a o; A5 Y( C else -- the vehicle @ is empty, both vehicle and part are in the same dock station, t5 P. G! P8 Z; p
part := @.transpOrder;* `) T$ E4 N+ _ K6 ?) _) o( ]
part.move(@);-- load part
+ U) a3 N5 [$ X4 w( |) g s$ E @.CurrIcon := "load";
: |( |0 l9 F2 i$ e" J GlobalDistObj := part.globDestination;
+ q1 P1 B- d3 L T" ^! o assignLObj := rgmanager.rgAssignL;1 {- M2 `( f2 K- V* D# Q
row := assignLObj.getRowNo(GlobalDistObj);
' a) S5 E- t, X* @7 u* d6 \) @ if Row = -1 then -- since 708 z! Y# S5 J- W8 | U. a3 Z$ M
if lan=1 then" D s3 i C2 @
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: D$ ?7 V8 P$ \9 h
to_str("in der Andockstation: \"",?.~.name,"\""));
2 q1 f: B3 r" b3 m0 ^1 u% G else
8 P( M) c* W! _- k& Q' S. Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- C7 C2 G! ]4 F6 A: `3 d7 y to_str("in docking station: \"",?.~.name,"\""));
+ H# S9 y" p0 _& F; q. O1 M end;1 }6 o1 A7 r0 ~; k1 S
else5 m# P8 q0 \: h
@.Destination := assignLObj[1,row];
3 z& g7 Q$ v( j end; / ]0 O+ G1 s/ ]# p. S
newDirection(@);7 C! k5 O) A+ |/ ^
@.HasOrder := true;% E, D! z$ B. W
end;8 g# v' i1 B; p( C2 a
end;
6 T( u' p, Y8 n: H. ]1 E+ Y zend; -- of the method
7 O! _8 n7 _1 {9 `1 Y: A7 u |