/* called by: entrance ctrl of the object 'track'
9 j* ]7 Z* r3 A+ y# \*/. B* x6 {+ Y P( |2 V! A: L
is1 Q4 W8 N/ I8 j. c; b5 _ x5 y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# K5 r4 ?8 K) G% `. \do
" d; ?# }1 R5 ]1 C& ]: W X) [ Lan := rootfolder.Internal.Tools.AOLlanguage;
/ H, I0 j0 e( o/ q/ X if current = @.Destination -- else return+ j4 A) K8 g" `( _* ?
then
5 Y. j, o( m% L4 Y @.Destination := void;
6 g( ^$ P; D5 k" X5 ]- W if @.occupied then
( _# v5 B- T i, V; h! F( y+ b: ` part := @.cont;
; H @+ h3 d2 {, Q4 ^ @.transpOrder := void;2 v- o/ l5 f2 m5 T- x6 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 g1 D: k5 m& i2 G/ J% i @,root.eventcontroller.simTime);6 u N- m5 r4 C( B% u1 c
@.HasOrder := false;
4 c9 b8 S& {7 g! Q/ C @.DrivingHome := true;$ c1 q! p. O9 E7 R8 y/ v0 c
rgManager.tryToStartTransOrder;
% Q8 ~4 h1 ?6 K$ | V if @.Destination = void
8 {2 V! W4 f8 M/ f# N) \3 @, w5 ~ then -- no transport order for vehicle @
- x" u+ z$ l Y8 K @.Destination :=) S8 f' _# [; ?! ]( i
rgManager.nearestFreeStation(@,track.~);
: Y. f0 \! A3 l' k" b8 d newDirection(@); " U1 P+ l0 k4 q. Z$ Q. j
if @.Destination /= void then
* E6 u; L" v ^* h, e+ F @.Destination.NumReservation :=
3 L t2 c, v5 c# y* p5 a5 `% p( m3 L3 @ @.Destination.NumReservation + 1;: c% i) \! S: ?/ X, H9 `
end;1 M6 b! F8 l# E4 D
@.CurrIcon := "drivingHome";1 L, D( v9 m4 a9 \! ]- |
@.DrivingHome := true;
) U( n, Y. E3 @) { end;1 F" a- c& r( X, x+ B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 @" x. `+ |" y7 N* D, N @
part := @.transpOrder;. _" L0 A. R0 J7 m0 i: R
part.move(@);-- load part
5 X8 Q! g2 S, {/ k* H9 g8 D1 X6 ~! t @.CurrIcon := "load";1 c/ R& y$ W ?9 M$ }
GlobalDistObj := part.globDestination;
: E3 J7 ~6 P+ J assignLObj := rgmanager.rgAssignL;
! h; U2 F( y5 S1 ] row := assignLObj.getRowNo(GlobalDistObj);+ D2 V8 B6 b5 O$ [* Y$ c
if Row = -1 then -- since 70
6 c8 l7 O) F1 d) E1 s7 L0 h4 g. {* Z if lan=1 then
+ u% i$ Y; v9 X5 k promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# B+ D- `- [" d& J+ ~3 v
to_str("in der Andockstation: \"",?.~.name,"\""));% A$ ^2 M1 w, a& h! m# P
else: u* H5 D V; ?. V1 l9 u6 b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. Q; L8 }) B, \5 R/ @$ M to_str("in docking station: \"",?.~.name,"\"")); 7 m- T. U( E' A/ k3 R; H
end;8 a# e( ]: [5 Y( y
else
- _4 H4 `1 F+ e. T; d @.Destination := assignLObj[1,row];4 k* \) m8 K5 e ^5 x8 C8 e& Z! b6 Y
end;
3 w `6 [/ r g% m! U newDirection(@);
* Q! r+ |, s" ?$ j @.HasOrder := true;4 A L& U' q, p t# V
end;
0 i+ m# d S& b. S1 W end;( H& W2 v6 Z2 P& M* r
end; -- of the method6 K }) N Q7 x( T) ^9 F J* `; a
|