/* called by: entrance ctrl of the object 'track'
+ [1 [* i! g* [*/
8 X- V+ j) x) w: Eis
% H& K6 X$ t) u5 U% B) V4 I) s part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 p N7 I t b) G# C ]. I$ M
do6 a! i% I1 S( ]4 `- o
Lan := rootfolder.Internal.Tools.AOLlanguage;' t0 ~; g4 Q+ {2 W
if current = @.Destination -- else return
; ?2 ^- C; N( e- [% w" ] then. ^3 P% D/ J$ H
@.Destination := void;; }0 [7 C/ ^ j: P" c. _
if @.occupied then( X( }& ~6 E$ H
part := @.cont;
2 R; k- Z% Q5 L* g* U! s1 ~ @.transpOrder := void;
. |- I4 p4 ]0 m" } S$ | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, q6 O# c* F1 v- ] j @,root.eventcontroller.simTime);4 D; }3 `4 e! A9 R! K2 C, \( S% s
@.HasOrder := false;# w% x7 z% {5 R9 O. S
@.DrivingHome := true;- r+ e$ C$ U6 c+ L% W' E# \
rgManager.tryToStartTransOrder;
. o/ \2 P y$ w& E# F if @.Destination = void
" X5 L! z( L& m5 F5 n" o then -- no transport order for vehicle @
! W4 E# \9 `7 A ^, s% z @.Destination :=7 ?. c) d2 X4 ^" r
rgManager.nearestFreeStation(@,track.~);
8 H3 d) i! } x8 y1 _ newDirection(@);
2 _) D- v) M( ^+ N if @.Destination /= void then
" v" [8 F' f' R, a @.Destination.NumReservation :=
8 u) t+ C, r; e4 P) Q) y @.Destination.NumReservation + 1;# y1 e1 i1 a Y( }! M3 ~* z3 ]" n. A: C
end;& Z- F4 G. A+ X2 D' |- E5 e
@.CurrIcon := "drivingHome";/ x( W5 l# l2 j
@.DrivingHome := true;
1 ~+ O0 |* r2 Y7 P3 f8 X end;. E# V" {2 w H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- g# B4 ^& w! n0 e9 o part := @.transpOrder;' @5 q9 O7 j8 u: v j6 J# Y
part.move(@);-- load part
( Q7 ?- e8 p% j+ L" O8 O8 r5 q @.CurrIcon := "load";2 s- O" z5 c$ ~% k; [7 o! v
GlobalDistObj := part.globDestination;
+ _8 J& f8 e4 {) f0 X- j assignLObj := rgmanager.rgAssignL;% [ g0 t0 Q0 R0 B7 o+ O
row := assignLObj.getRowNo(GlobalDistObj);
4 F2 E) n$ F7 [" Y if Row = -1 then -- since 70" }( N+ N0 F- u. Q# Q- e
if lan=1 then/ F/ e8 H& e; a6 U1 \4 D6 d! x6 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- F, m# J* t9 z9 {. n( _ to_str("in der Andockstation: \"",?.~.name,"\""));
7 |( w5 Q+ g6 H- c. P. v" E else
/ G+ K7 a0 e8 U! ~( d' M6 e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," F/ S9 @; ^! @
to_str("in docking station: \"",?.~.name,"\""));
) E2 ?/ C, X0 K$ C( N) j5 r end;- g: t$ G b: m/ E1 p$ f
else
( s# V( [% P0 A+ W @.Destination := assignLObj[1,row];2 r5 Z' a& f0 L4 `3 M
end; % k( @* ~9 @3 w4 B! y: h, p
newDirection(@);
2 u. x( n3 ~- [% E/ h @.HasOrder := true;
" ^" z" U) o( l+ e6 S end;
Q: ?) z# L9 x, Z& c% K end;7 P8 h0 b& ]# }. ^4 g
end; -- of the method
2 F H1 ?) [3 m6 s) d0 z |