/* called by: entrance ctrl of the object 'track'
# p6 \# I' j1 U*/
+ |- C8 ~- q; V* M T' Gis
7 n, c; ^$ [1 d$ Y. ?7 X) r part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( ?, k# G3 [& j/ W3 fdo
0 G: J0 o/ ?4 ?9 k ]: i Lan := rootfolder.Internal.Tools.AOLlanguage;
/ a. {8 M5 w: e5 z: p) x) V if current = @.Destination -- else return! X/ f& b4 u1 \2 C. T, d- t
then6 ^8 J7 I9 m/ S: ^
@.Destination := void;
; A, J2 @3 z- Z! O3 n T if @.occupied then
1 X, u/ I6 @- z part := @.cont;2 N3 [5 g# A0 L, m
@.transpOrder := void;. Z+ _. ~+ x' n+ K8 q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ ]. n' D( R. f
@,root.eventcontroller.simTime);" Z# {- I5 U9 p( S: X
@.HasOrder := false;- P' d+ m- O; h9 o
@.DrivingHome := true;3 X3 ~- D% u. i0 f3 i
rgManager.tryToStartTransOrder;
U0 n3 D! P2 |& h0 n. h if @.Destination = void
& V/ f* }6 K4 b, d2 \9 m then -- no transport order for vehicle @
+ t( O n" H$ m: T6 b# v! P' J( M @.Destination :=" s& r, o. r% s2 g; o7 `
rgManager.nearestFreeStation(@,track.~);
5 X& u4 _: [- v+ e newDirection(@); 8 C5 _# z5 e* O8 w: m( F
if @.Destination /= void then
& P4 D7 W+ e/ x: d& v" R @.Destination.NumReservation :=
7 p' _3 ]* c. f1 |4 i @.Destination.NumReservation + 1;' w5 C, {) Q0 x: C' Q# Y. y
end;
; f$ u% I% g( w$ L7 H7 ~ @.CurrIcon := "drivingHome";6 r2 J5 q* f1 W; R7 I
@.DrivingHome := true;' F! \+ L4 O3 t8 o! `! @/ |
end;
5 L; u. B: H) V1 K$ e8 c else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 H$ }4 ~. g% K$ [ H" Z* |# a part := @.transpOrder;# w7 c& W9 U6 B8 l
part.move(@);-- load part
. u) q. r- h2 _- d: W9 e @.CurrIcon := "load";
0 E0 q4 a& a4 Q$ P GlobalDistObj := part.globDestination;5 ?$ h u& _! W( C K. R
assignLObj := rgmanager.rgAssignL;" S2 u: Z3 K' P
row := assignLObj.getRowNo(GlobalDistObj);3 U9 Y) v4 L! Y( i, l7 {6 t
if Row = -1 then -- since 70& g8 T8 `* ^4 ?1 _+ N/ d
if lan=1 then$ v* @0 [5 N/ H& |6 _% \( w
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 E) N- ~) T5 _ O$ j, @- J6 M" S3 ?
to_str("in der Andockstation: \"",?.~.name,"\""));! j/ c/ h+ z1 F* f9 q) h
else+ M! R8 k7 Y: ]) v# A! A6 A3 a
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# k5 B5 _0 o5 k, ^' R to_str("in docking station: \"",?.~.name,"\""));
! b8 b( g/ @6 V& r' o) ~8 g- O1 K" z end;) Z1 F. f$ `$ ^! u: s G
else! T8 Y" @/ W, o4 X
@.Destination := assignLObj[1,row];8 A% X* A% t5 q6 x) _& O
end;
8 e( C8 o( C6 {8 F newDirection(@);
8 e* K+ u F4 q: p, Y5 H @.HasOrder := true;+ H. U1 a# |4 N2 @7 ]- f
end;# C& ~6 E6 Z6 e4 A
end;
% ?& |. j( r1 ~- X( G* Tend; -- of the method4 M' [3 W0 J& s5 O/ W e
|