/* called by: entrance ctrl of the object 'track'+ F: U, N: l' ~; u
*/0 _8 y4 a5 ~. k2 T
is( c9 [) T2 w8 R0 k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) a- M/ [* I! o+ E5 O6 J3 }, {& xdo2 g6 u- e7 H5 E: n! G+ A( a- `9 T3 s
Lan := rootfolder.Internal.Tools.AOLlanguage;
( K7 I7 j! T. k% i: |9 s if current = @.Destination -- else return
1 Q" x U% Y$ V7 c( F$ [* p0 Q then5 f1 o# _9 Z) L* J! U
@.Destination := void;! g6 Q0 k- N" d
if @.occupied then: j- v: k# e( v# _5 O* s
part := @.cont;
6 M' |% r/ f) }& N @.transpOrder := void;
5 `1 ]9 l3 h5 {' u& q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! {/ \( Y7 [0 D6 S
@,root.eventcontroller.simTime);7 n3 K2 l' T) c0 g {2 N
@.HasOrder := false;
% c7 R. q6 o$ Q0 ]. L" x @.DrivingHome := true;
% g$ c# L8 A6 \; @ q3 C+ H- | rgManager.tryToStartTransOrder;
" O$ i. G. `6 E8 C( w if @.Destination = void
+ o2 E4 l3 a" d5 K4 R, M' e p" I then -- no transport order for vehicle @
$ u3 m, x% s3 {* v4 x5 g @.Destination :=! ] x0 _2 j# E! |: l
rgManager.nearestFreeStation(@,track.~);
: F+ V% z. ]: U& C newDirection(@); # w2 j' u2 C3 D: M6 x# _ H. m3 U
if @.Destination /= void then
+ g) Y( P/ M3 ^0 F0 R @.Destination.NumReservation :=
% I: r7 K- G) i7 M( B) B2 | @.Destination.NumReservation + 1;
6 K4 `% L* O1 `2 j. [ end;7 H4 L3 d2 V3 |$ t( S k4 q% | h
@.CurrIcon := "drivingHome";8 _; R' Q- h* [- C
@.DrivingHome := true;
: g2 I6 I" f/ L* j end;7 v; s+ ]1 k/ {! o' I) \: G3 O
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 V6 e# a1 K2 q5 l( K! r7 f5 x part := @.transpOrder;
$ V- O! h' H- k( `+ l) _' ^ part.move(@);-- load part9 u1 g3 V" ?5 c3 ~ z0 j$ ~1 L
@.CurrIcon := "load";, H; J8 j& n3 s, m' e" N
GlobalDistObj := part.globDestination;1 h. D- s7 S) k _/ R
assignLObj := rgmanager.rgAssignL;8 M/ d k" V; a: ^. y/ u
row := assignLObj.getRowNo(GlobalDistObj);* g) t9 X* c9 h# Y
if Row = -1 then -- since 70) Z" H3 j4 U( I1 ^% C# ^9 R' D
if lan=1 then
3 P* P0 {, {! a. h promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 f9 g) G7 e# X0 \0 y- b( i6 _ to_str("in der Andockstation: \"",?.~.name,"\""));
# }* z% C5 @' ?# i4 T4 p else
0 f) Z6 m, O8 f( H: O! O1 h# T2 S/ e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 S# X! x; Y6 x$ y2 ^9 b
to_str("in docking station: \"",?.~.name,"\""));
' R. d7 {# n8 t7 c9 a8 i end;& J1 W( z% z7 \; M9 y
else
& u% r8 R% p9 l2 d @.Destination := assignLObj[1,row];( {6 T' h2 _: u
end;
0 a1 e' K5 N! A# f' w1 | newDirection(@);
+ D! g5 k5 m1 P$ M @.HasOrder := true;
7 I4 T& }+ H* D end;
" x& Y' p5 l' q% I2 c( | end;
3 G! `! y4 q. j9 X- H* Kend; -- of the method4 k; \* U4 U @8 [# i4 h9 A* W
|