/* called by: entrance ctrl of the object 'track'
1 |7 L6 p& V! \: H5 f; p m l% y*/. O. b/ u' e& ]$ Z6 P' V8 ]
is
+ ?) g+ a9 q& ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
J# {6 i7 g3 Y# Cdo V; O' v0 P+ Q, A( C" E
Lan := rootfolder.Internal.Tools.AOLlanguage;4 y% I9 x/ c3 k: `! b# L
if current = @.Destination -- else return8 ^0 o/ u; o+ z$ C5 r; G3 F
then. }9 A) B$ E; E' F& n2 [2 z
@.Destination := void;
( o1 v- c( q c6 t5 J if @.occupied then3 J: X' }7 ^! ] a' t
part := @.cont;
0 ]2 y" e; U% L* L. J# G$ i @.transpOrder := void;
6 z q0 V. N" ]. D3 l: | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( n; v4 f% d) `
@,root.eventcontroller.simTime);
: P; t5 }7 D, n# R @.HasOrder := false;
" D% s1 R$ z" J" e# ?6 L @.DrivingHome := true;
, s( f& s9 U9 [7 @( A rgManager.tryToStartTransOrder;$ @ Z" \) G0 W( q" N0 q% a/ P; G
if @.Destination = void
: r! n/ N# q( C7 K3 e7 k9 k" o# G3 ` then -- no transport order for vehicle @
8 j/ c1 s: O O0 E+ q3 m) Z @.Destination :=
3 m, M& |7 n% m1 @6 b rgManager.nearestFreeStation(@,track.~);
# ~2 r* b( i4 X. t M! y newDirection(@);
: l& v h: O9 j! V; b if @.Destination /= void then
- w. M) w7 n4 a# H( g! A5 u( Q, m1 |5 q* P. K @.Destination.NumReservation :=9 X+ q7 B7 u: W, {9 B1 p* }9 I2 f
@.Destination.NumReservation + 1; a1 D; Y$ k# D/ w' n
end;
2 o* M. b$ ^$ g, {- t @.CurrIcon := "drivingHome";
+ J7 s' F# _8 e0 K e# t* l @.DrivingHome := true;
% W8 E0 C. r/ V; E! Q; Z end;
. G) c& ^2 m& n/ y) l5 t; _$ O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 R+ }6 M, t( D+ r( u9 e3 I y0 K part := @.transpOrder;
" y; t7 E7 c1 y, ]! j part.move(@);-- load part
x5 n- P5 t1 c, ~9 _- P! o' E' e0 O @.CurrIcon := "load";# ?3 \1 e7 _+ w
GlobalDistObj := part.globDestination;
v5 Q- }; D. S6 R assignLObj := rgmanager.rgAssignL;
& {, j1 z8 E4 p* A1 c8 w* v row := assignLObj.getRowNo(GlobalDistObj);
: y% n( l+ S( ~$ Z6 j6 W if Row = -1 then -- since 70
" i+ W; f& y9 ^9 E H if lan=1 then+ @; q% c! O8 e, N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 L' d/ C# A9 b1 P# O& \ to_str("in der Andockstation: \"",?.~.name,"\""));
! [8 v( }+ k3 X/ a else
- p+ N$ [6 S5 g' a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# u5 ^$ u8 k$ u# e
to_str("in docking station: \"",?.~.name,"\""));
# y2 h3 f( L3 b end;
9 \% X9 r. V. M3 R1 V$ L" F else
. D' G. R& |8 j @.Destination := assignLObj[1,row];0 F9 I' U' M' {5 d- [( n& ?
end; 2 R6 A4 b9 Y. `8 T; P7 l( e
newDirection(@);
8 |2 R! z6 j! J6 a+ ` @.HasOrder := true;2 m$ w. {4 b- ~- ~% \4 N
end;
6 `" ^' Q" R/ V8 i; e* P" X end;
) ], T0 h# m+ `+ U! Y0 R0 bend; -- of the method
5 [: M& y* N; n |