/* called by: entrance ctrl of the object 'track'1 O! R! y9 b. t$ P& j( V1 @1 u1 s1 l
*/
* q$ d/ M) ~- y. \is' H/ S4 o, ]2 C8 r5 P7 z( G4 T3 }
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 X- M1 u" V" G: S( t3 e) kdo5 V+ X: F1 j( F% G% ^4 u/ Y9 |6 {
Lan := rootfolder.Internal.Tools.AOLlanguage;% w, L6 x! Y3 k \, ^# y
if current = @.Destination -- else return
) [- E4 Q2 ~. x6 u7 C0 f then$ J4 z9 z# v! v$ V& P' A; B
@.Destination := void;
( R0 S* a/ y2 t9 I+ Y1 F0 c. }$ [5 Q if @.occupied then/ a# w1 |1 t: C$ J1 ]
part := @.cont;, k1 r) Z4 R( h7 @1 F8 K5 V- y/ c
@.transpOrder := void;6 l$ [& A0 Z4 t& p2 J/ l
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
4 c4 r6 l5 O0 @6 W: Y9 j @,root.eventcontroller.simTime);! G2 k* q |/ H+ I) L) g
@.HasOrder := false;5 n) g6 {7 D$ u/ T5 Z, t- `* e4 k& P9 }
@.DrivingHome := true;- v2 Q1 P9 r$ A" R% V2 B
rgManager.tryToStartTransOrder;/ D" O9 P$ u* l8 G5 U
if @.Destination = void) r7 t* K3 t# I3 F/ K( I
then -- no transport order for vehicle @
2 O. o, A; p' Y" L. n @.Destination :=. {& x2 b2 ^" V; C7 z: F
rgManager.nearestFreeStation(@,track.~);
- K* a/ {( ^+ \& R- V newDirection(@); 9 U0 L% \# s" i' ?
if @.Destination /= void then
6 h2 j! f+ N3 D0 c @.Destination.NumReservation :=' }: `( P/ ?& r: _0 g& f* [! y
@.Destination.NumReservation + 1;5 p: i) m* [$ Z" e3 R
end;' [+ Y4 m* o; [: C
@.CurrIcon := "drivingHome";$ t& I3 S+ o5 t0 _
@.DrivingHome := true;% y U+ A' N4 P" J
end;3 g" g0 @' X- ^ o
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 p5 N) G1 t. a1 { part := @.transpOrder;( g/ L3 T9 P& c# p
part.move(@);-- load part' W% O7 }% Q |" W
@.CurrIcon := "load";
) n; }# ~* m/ {6 ~# ]0 e GlobalDistObj := part.globDestination;1 @* L3 k$ P& H2 [
assignLObj := rgmanager.rgAssignL;5 s k& U/ e" W# K3 f2 w
row := assignLObj.getRowNo(GlobalDistObj);
- O! N' M- d1 I/ Y% L if Row = -1 then -- since 70, g9 i& c+ J/ T! j
if lan=1 then K* L e( v! e0 N( _- X' I" z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ T* x+ L* p$ n! e2 q! X6 H3 s to_str("in der Andockstation: \"",?.~.name,"\""));! [4 {! z& S6 w) u4 s3 }
else
: c" c* J {/ l, b- l promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& S. k* o5 W1 C W% x
to_str("in docking station: \"",?.~.name,"\"")); ; ]# `- |& V: C% o
end;* c1 f/ Q/ c7 b0 @( D& q% [* g
else7 O% [8 |5 C X* Q$ u3 D
@.Destination := assignLObj[1,row];# h" u+ S- j+ D7 v. [
end; ! }% s' E5 o! {& y5 ~1 F* `7 d7 m, V& d- |
newDirection(@);4 s# D2 A! m" P' _
@.HasOrder := true;
$ d/ U T- w- i$ v. p end;
: P9 ? A/ ^ F* w* g2 o/ E& O& u3 c end;
$ y: R: ~* L- E! h7 Tend; -- of the method# K7 M2 v _# ?
|