/* called by: entrance ctrl of the object 'track'
' R5 S4 L! c( [3 Z% Z9 ^$ o*/
: r4 y; j+ \5 }9 q2 b/ Xis) x# k5 H: Y( v/ e6 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" [8 ^; r& ]! ]+ P3 P. G
do
; s& L$ g$ p+ H/ S# i) f Lan := rootfolder.Internal.Tools.AOLlanguage;
2 n9 `& o, P7 E' m' X: \, D if current = @.Destination -- else return* B# w: O- O% }4 q
then: B+ p* A1 `( Q" j8 w
@.Destination := void;
t0 R D& D/ }6 A( w% _& @2 Y8 M if @.occupied then' F+ O7 P# B. d2 C+ I
part := @.cont;
+ B8 q. @1 {: I# w @.transpOrder := void;0 c4 G2 d; K. [1 p- F) u$ Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 e& ^; G z2 w& e! O: ? @,root.eventcontroller.simTime);
( m' b `) ]+ a5 ?: t @.HasOrder := false;
$ {7 H3 ]% x4 u' L- J/ h4 O @.DrivingHome := true;
2 s4 M! H/ |) y( `: C/ ~& J rgManager.tryToStartTransOrder;" P0 S# m I, `. ~. @
if @.Destination = void
; q6 S8 u& u; e' P then -- no transport order for vehicle @* o) c2 G$ t* A5 G' K8 X
@.Destination :=
$ I, A0 ?; y; q6 u rgManager.nearestFreeStation(@,track.~);: _& z4 X7 V+ s0 e. _, c3 `3 f$ O
newDirection(@); , S( e) e( e8 m: N' g
if @.Destination /= void then
; \1 C: V) W$ X @.Destination.NumReservation :=
# m* Z6 `: h A @.Destination.NumReservation + 1;# m) y9 r! y1 c, g' R4 C
end;
+ Q) b o' J. s% e2 X @.CurrIcon := "drivingHome";
# ?/ p. [) S3 a F @.DrivingHome := true;* v5 _1 d/ p+ e. E
end;
7 j% r M: S6 \7 y2 f. T4 a5 ? else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 \7 ~1 _6 K( m& `* s/ d% A- J* K part := @.transpOrder;
; t8 C0 P3 u6 x8 |, | part.move(@);-- load part$ o6 O. b+ E, V, H
@.CurrIcon := "load";
4 R/ f2 a5 g& G1 N( r0 O) F& |/ Y! s GlobalDistObj := part.globDestination;9 ~% ]% b2 h3 s- d# h0 _
assignLObj := rgmanager.rgAssignL;1 E1 `9 O2 l, L6 C: H
row := assignLObj.getRowNo(GlobalDistObj);
0 X7 d6 L6 z0 \ \ if Row = -1 then -- since 70
$ H3 u' ?7 \& }4 A# y if lan=1 then
* J8 N3 m6 t. s1 O4 l# A2 R" } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 l: W4 u1 p4 m3 N; d7 b5 w9 c
to_str("in der Andockstation: \"",?.~.name,"\""));
' c! g3 p" K2 E: A3 h' x else9 a2 v% @/ q# t" E9 a/ \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- X% ]8 Z; E, A
to_str("in docking station: \"",?.~.name,"\""));
% }7 S- s$ L6 x7 v; u7 J I end;
; i {# ]: a: B" c* h else
* b: A% s( f5 z3 i1 w! R _ @.Destination := assignLObj[1,row];
/ k; R* L6 D" H6 y end; w3 ?" T. }+ d7 V! @/ ]
newDirection(@);' y |9 i+ N% e: ^1 {! I# @7 F
@.HasOrder := true;% V. Q# |8 z: M
end;5 i! _9 V3 [: S
end;
& L/ H" ?/ w/ Q7 j6 mend; -- of the method
; |" ]- r6 R! ?. ~; O/ O6 E |