/* called by: entrance ctrl of the object 'track') u0 Y/ w' j' L5 m7 x
*/
L0 ^; `- ]. G0 d6 P! U9 Dis0 Q! c& w5 L% f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 U+ R1 N) `. C- M# T
do; ]; t& u1 r- u
Lan := rootfolder.Internal.Tools.AOLlanguage;$ D( F* m8 q8 |/ E4 u8 W
if current = @.Destination -- else return& n$ V* i6 B0 K, O1 h. U
then/ u9 J$ _- T y' E9 B0 _$ ~
@.Destination := void;
5 f+ w- J, n5 P7 T9 e9 _ if @.occupied then
3 W: K5 c8 Y% n- W part := @.cont;+ @* S* p! `& @0 K3 z( R1 G
@.transpOrder := void;* F6 I. _, d$ ^+ B& s/ w1 ^$ m5 _; o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& q2 ^# E2 _1 s2 [8 t @,root.eventcontroller.simTime);0 o# z; N3 Q6 o0 z
@.HasOrder := false;
1 U' ^6 j3 A/ v2 y8 L @.DrivingHome := true;
3 h: y$ c% X: R4 G& H rgManager.tryToStartTransOrder;
Z: M" ^* P) x% q, M if @.Destination = void; {, C, T$ I8 A1 i) r# B3 `
then -- no transport order for vehicle @
4 \ I5 ?1 [0 I& P2 q2 P4 U g @.Destination :=
4 Z# y2 S! C' |" @4 e2 G& d rgManager.nearestFreeStation(@,track.~);
+ Q9 f, r( m, U- |- b4 [/ N. e newDirection(@);
0 s; t2 k' r+ R w if @.Destination /= void then" h- K0 j" T' s- o) l
@.Destination.NumReservation :=
u6 J" [2 I' b2 U U( w, u @.Destination.NumReservation + 1;- H/ `. `. Q/ p9 t! b/ U! e
end;0 Y& d+ _+ ?9 d1 s7 k8 t$ j
@.CurrIcon := "drivingHome";8 [2 A' ^( f! ^+ h* |! d) ]& v9 o/ E
@.DrivingHome := true;
# W4 q: i1 p' a% a3 b end;. i, y6 q6 {: _0 ^1 m' ~0 r+ d$ E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. p+ K4 M n) ]: i+ [% E part := @.transpOrder;
1 K6 _0 S( u' [4 I; i0 `1 Z6 R6 O+ W# W part.move(@);-- load part9 S; M r2 g" b& c6 D: N
@.CurrIcon := "load";( ~/ |- `4 ^0 v' z+ @
GlobalDistObj := part.globDestination;
+ }0 r8 f+ `4 W6 M( ? assignLObj := rgmanager.rgAssignL;
- C2 C0 z$ T% B, D ^% y3 F$ d+ j row := assignLObj.getRowNo(GlobalDistObj);
+ v; ^7 a" D# C! L" }; x) R if Row = -1 then -- since 70( c. B! {" _, y9 O) i: Z5 G
if lan=1 then
7 d! j8 h i9 O6 H promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' h! M' N* H5 Z to_str("in der Andockstation: \"",?.~.name,"\""));
) m7 F4 S6 w( N6 ^( f& S: q else
0 D! H1 D* } e' U' y5 ?, Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* m9 n* I3 k4 I$ Y
to_str("in docking station: \"",?.~.name,"\"")); 2 Z4 f/ T; O( C3 P$ L) S5 B
end;0 s& _# v4 o6 O. H
else5 S+ Z! f1 W6 ?# K
@.Destination := assignLObj[1,row];
$ E# B5 t( e+ |6 v, _. l" s1 U end;
, z3 p7 P( `# d; u newDirection(@);
5 q1 F: o7 g9 g! O# t* E @.HasOrder := true; f% w K; S# ]
end;
+ s' |/ z% R' A+ E1 Y end;
& H J4 Q S u' fend; -- of the method: i% C2 P& [9 p; H
|