/* called by: entrance ctrl of the object 'track'3 W" C5 ]9 L3 I
*/
$ ^; M+ I* x0 e2 X" c$ |( xis
9 Q7 ]4 q: C* ~' M( z( a0 _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;: `0 ]! Q" y8 u# Q8 I
do
+ M: I |+ h7 e6 n" q$ ^ Lan := rootfolder.Internal.Tools.AOLlanguage;( a7 B! N% x+ Z B& n5 t
if current = @.Destination -- else return
$ U; B( y _' V4 w/ e4 c then' S9 T5 i# p6 Z; k8 p3 i
@.Destination := void;8 Z! o; B; F* G" y) b* a( S
if @.occupied then; ?2 J) A* A' A) t
part := @.cont;
- ?$ ?$ A* [& m: U8 Z @.transpOrder := void;7 D" @& o& r2 m. M& |, }; Y9 v- _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ t& n3 @) D: \0 j6 i5 d# G
@,root.eventcontroller.simTime);7 u) w$ v& {0 q/ l
@.HasOrder := false;
/ k5 y: G, e6 P+ P; v" V @.DrivingHome := true;7 L( F5 [$ r; H' S2 |
rgManager.tryToStartTransOrder;) y9 \- @# n1 h
if @.Destination = void
* v' [' J" N( f! E) e5 i then -- no transport order for vehicle @, h4 t0 d3 s8 R2 u
@.Destination :=
9 T4 G) s n" j" }& I$ R, A rgManager.nearestFreeStation(@,track.~);
5 H) g" z: s$ I3 ^$ |' U% G newDirection(@); : Z1 H9 x" ]/ t& w
if @.Destination /= void then& t; N% _( a* S. B+ B- _6 \
@.Destination.NumReservation :=
! f) L$ i( q3 k8 y$ X( H/ g @.Destination.NumReservation + 1;
. `- E; w) b( Z- T4 b& y end;
% k( K( r2 Y4 }4 E6 Q @.CurrIcon := "drivingHome";% r C# X' W a. U
@.DrivingHome := true;
% ?6 D* {0 @+ _, `3 c2 A& s end;
8 ]) ^/ p; l8 u M+ I0 l3 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ p1 e! j/ ^2 W" k$ a$ e% Z1 r part := @.transpOrder;3 w& k7 b' { w' u. L
part.move(@);-- load part" d4 x9 ^4 y+ X8 B4 M- J" [
@.CurrIcon := "load";
5 } I# c, I. c, u4 @3 Y7 I8 [ GlobalDistObj := part.globDestination;
8 _+ @/ B. s1 M; i, }6 M assignLObj := rgmanager.rgAssignL;
. i1 l. y! o: }8 u; |3 | row := assignLObj.getRowNo(GlobalDistObj);
! d% E/ _4 T* I/ z if Row = -1 then -- since 70
1 i4 P0 e& e9 @! N7 B$ p. D. @; s if lan=1 then
) D! f1 d7 s! M' I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! X" z$ m" w+ d) ^# [; c to_str("in der Andockstation: \"",?.~.name,"\""));1 l- @* @0 B( s; Q# Z5 `; h3 }; R% f
else
6 K, j) {& O1 G" f' N promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: n! t2 P- a1 x3 r" w
to_str("in docking station: \"",?.~.name,"\""));
$ ?% j- h% _! T8 E+ x7 d end;8 b3 z; K o# f& S' J
else
8 ~( c, u$ m. h0 H @.Destination := assignLObj[1,row];
! a( }! K3 `0 s& B" x1 G1 R- t end;
: W' K& |. g( c newDirection(@);7 T% b2 X/ P+ s' {% l" h) |
@.HasOrder := true;
. {+ U5 ]& U: Y8 B end;5 K; H l Z) x$ [1 c
end;
: p4 I' u% `# A5 R* w- l2 S3 M0 Kend; -- of the method
1 G4 r5 v4 M4 W# F- F, S |