/* called by: entrance ctrl of the object 'track'( T8 P/ [. Q; l
*/
* T2 p# t0 J" W* `. Y/ G/ iis6 ~1 L3 I( D: g( Q
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, U ~9 D8 {' ]
do: z; i! J- Q7 L! \6 R
Lan := rootfolder.Internal.Tools.AOLlanguage;
0 j0 N# \, \5 B if current = @.Destination -- else return
; @- t" W6 z1 Y. Y6 U1 f0 v, u then
" H; B" ~8 _8 v* J) g9 L1 Z+ f @.Destination := void;0 [. ` ]2 c+ b( ~
if @.occupied then* f% w+ S1 B# U7 w
part := @.cont;. d5 r. H; `! m# h8 H# n3 N8 C
@.transpOrder := void;
, W7 ^7 `( h, _0 ]( F% z, I' s5 [ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- \' z+ n% U% |9 F! u
@,root.eventcontroller.simTime);
# t+ g q$ t1 {2 P2 B! v4 E& s @.HasOrder := false;
: v/ R9 l( {' ^7 Z$ X @.DrivingHome := true;
" ? _+ V! f/ S- l# m( B( r& b rgManager.tryToStartTransOrder; n4 M( V2 [3 {9 E
if @.Destination = void
: `( F- Y- }( M$ n/ V5 N# B* k/ \/ P then -- no transport order for vehicle @
o1 f! l/ {# ?9 q6 h9 v9 F @.Destination :=% _0 [6 o& U7 |# P5 N. b
rgManager.nearestFreeStation(@,track.~);
' r+ @5 q( x0 H' N) w newDirection(@); - L- a9 J% S' h6 J' \& I
if @.Destination /= void then
9 ]( Z( O! X/ l3 j @.Destination.NumReservation :=, U, J3 u t# A% D. m
@.Destination.NumReservation + 1;0 Z: `: D$ I) q9 c7 ^
end;6 X. h7 F4 a7 G' i
@.CurrIcon := "drivingHome";
, u: `+ V/ Y: G, S* M5 S& h( M/ W @.DrivingHome := true;
4 C0 S! B0 ~5 L7 \4 r f: ]7 C end;
# B$ c) H0 f6 u& Z* k* K else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 J B" |6 q. O* D# M' G: R3 \ part := @.transpOrder;8 N2 K' o/ q- v' ]
part.move(@);-- load part1 N& ?/ ~' d" B8 O# D
@.CurrIcon := "load";/ ~8 |1 {/ |+ ?0 w
GlobalDistObj := part.globDestination;
$ N. P/ e" x! J1 n8 r, E% ? assignLObj := rgmanager.rgAssignL;0 P6 c5 K" ~# x+ o8 b
row := assignLObj.getRowNo(GlobalDistObj); {2 {9 v* b( a! Y2 C
if Row = -1 then -- since 70& A* R) U) E& @0 k4 R I4 w( {
if lan=1 then# t/ G2 t# z2 i' x2 p- A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 c( _6 p% W3 q$ m& c) c* Q8 _
to_str("in der Andockstation: \"",?.~.name,"\""));' [6 ?8 J$ Y* ^
else
" I: j4 ^( \* Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: l% y( s' X; g to_str("in docking station: \"",?.~.name,"\""));
6 o0 H6 W6 G3 x. E2 O end;$ K, s+ i5 T8 M$ f" T# a
else6 z. Q9 r7 F: f
@.Destination := assignLObj[1,row];0 W1 ~. W x7 F: x: o1 l1 {# h
end; # u$ t. V/ m/ k; w0 i" K4 U. I
newDirection(@);
r& N& F' r9 h* t) I3 m @.HasOrder := true;4 M/ W( m, o/ w+ h) F9 R* n( i) \: i
end;
6 \, Q4 X5 t$ e# b9 Q# ^1 A end;
. s* m7 b5 P4 oend; -- of the method
0 P9 I0 `5 F8 I7 I& B: c |