/* called by: entrance ctrl of the object 'track'
* d) B( B3 K& r0 b8 P: e*/8 f' K3 y4 K; Y& y2 z% o; k
is
! o; ^( I( _9 K4 l, H part, GlobalDistObj, assignLObj:object;row,Lan:integer; z2 T3 X" g- n4 i
do# Q3 O$ ^/ V0 t0 m( W) K% x
Lan := rootfolder.Internal.Tools.AOLlanguage;
& d5 w8 o5 i# q# n+ \ if current = @.Destination -- else return0 l: r1 @$ k: C; g
then4 X5 J, `: g5 `: l8 |* T
@.Destination := void;
5 r0 Q. ` `1 J6 ] if @.occupied then
( O3 u# M- I3 N/ t# |. \* {. u part := @.cont;( [' k. i. |, p) v8 X8 ^; K
@.transpOrder := void;
4 u" k' r% M; {1 E* @ M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) q, `/ h/ M0 m& g* u. I- ^* h @,root.eventcontroller.simTime);. K* b3 o/ o$ b" N
@.HasOrder := false;8 q4 Z8 k4 G Y) S: R( s' p
@.DrivingHome := true;( q% L5 ^4 \( g- H* P; x
rgManager.tryToStartTransOrder;
' J' O4 h9 Z+ S; Q if @.Destination = void# i( @( p4 \: T% |" E: H4 F% e y
then -- no transport order for vehicle @
1 q. T. }( P8 G. X- I5 L- l$ H6 T @.Destination :=
6 u7 @+ R0 x* `& C- w rgManager.nearestFreeStation(@,track.~);
$ H. r' h, t! F' D2 O8 x$ u( h6 u newDirection(@);
# R1 P) y; T/ R4 k5 Q% J, H if @.Destination /= void then" @0 J u6 H- n
@.Destination.NumReservation :=" @# @1 i8 N$ m" M
@.Destination.NumReservation + 1;
4 M" u5 |( ^* E: ~4 ^: B end;1 G5 H* q; p" s, [
@.CurrIcon := "drivingHome";7 ]. |% \5 q8 Z. {
@.DrivingHome := true;
( p9 I' @; V) a! \3 y, G$ O) O end;
4 `6 Q. ~3 x) Z1 O" B else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" X) C! E' I" _ d9 ? T part := @.transpOrder;7 v# V( J; s% l- W5 `: R
part.move(@);-- load part1 O2 q2 g( b' L
@.CurrIcon := "load";) y+ }6 R& I# V! |/ n! ^( f
GlobalDistObj := part.globDestination;+ D0 X' D3 s* b1 P0 U$ j
assignLObj := rgmanager.rgAssignL;
$ P, k$ k% C8 F9 h8 ~' C! @ row := assignLObj.getRowNo(GlobalDistObj);
- Y8 c' Z, M' }, f+ z4 y: { if Row = -1 then -- since 70
; H3 P8 d$ ]5 A# ?$ v if lan=1 then9 I, ?, W# y0 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
P! ?% h2 {8 N1 Q to_str("in der Andockstation: \"",?.~.name,"\""));
- x) t7 W9 \- o( z6 o6 d( p' [ else
; g9 j" Z) K2 B$ E* M! c3 E; T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* f6 A* H9 \7 G to_str("in docking station: \"",?.~.name,"\"")); : n4 s/ a, ]4 J" G( g
end;
% u% {: N5 ^& F else0 q' T+ _8 ~5 ^$ c
@.Destination := assignLObj[1,row];" w+ }: C# G6 J' r4 T( ]9 \
end;
V' I1 m- ]* c! m7 S1 T. N/ l newDirection(@);
( U; H9 v% S3 A% w- B! f @.HasOrder := true;
1 m/ n1 x6 l# a, }* P end;
- D: b C2 m8 @ end;% v8 @& j8 D2 L" m6 s
end; -- of the method7 ^6 ~: M1 n0 x; o$ p
|