/* called by: entrance ctrl of the object 'track'
( T( r$ u7 M) @! C5 Z*/
" m# A( m- e5 h \: F; sis: P* k# H$ T2 C* Y7 m. B8 ]' ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;1 Y- f" y4 ~8 j# `! `
do
5 N* e3 o8 ], ` \# u Lan := rootfolder.Internal.Tools.AOLlanguage;
4 ^! \/ Z' g7 D1 L( `+ t$ _# { if current = @.Destination -- else return" s) H- [7 p0 o% d, P2 D
then
: U- ?6 o1 t' W2 k# r& [4 { @.Destination := void;9 P/ k X5 K& j/ I8 a! D, ^
if @.occupied then
M" L/ E+ J8 K& X part := @.cont;
* p0 U. ~: C4 i5 W' X4 F% { @.transpOrder := void;
1 W) h& E+ s7 O part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* F' n, g2 \1 p! a
@,root.eventcontroller.simTime);
+ a- D4 I8 ]5 a7 n7 k+ b @.HasOrder := false;( z% E7 E5 Y! ]; O/ x
@.DrivingHome := true;+ c) s( s5 t$ M' I9 s' F& T
rgManager.tryToStartTransOrder;
7 h' e; t; _5 O7 _6 `$ E) Y% f" k+ p; _2 ` if @.Destination = void
$ y( Q# X H# V7 W then -- no transport order for vehicle @3 ^. Q6 K ^2 c/ W: g( V
@.Destination :=
1 D9 f5 ~ `" O( i4 r rgManager.nearestFreeStation(@,track.~);! n, k3 y1 T7 o2 R4 V+ R+ z( C0 j
newDirection(@);
" a$ ?: Q1 ?5 P* w3 @; b3 h if @.Destination /= void then
# p; m; B7 h4 f0 e2 F+ K+ H @.Destination.NumReservation :=
2 i: x$ R- j9 J( e$ k; H: } @.Destination.NumReservation + 1;' f L! \# O! [+ u1 U/ t
end;
3 r+ O% v$ R8 o# g @.CurrIcon := "drivingHome";
/ G) d, _4 K. c" c6 `; i( l- ]6 H @.DrivingHome := true;7 j# M, p* G# K$ R! ~1 ^
end;& X: F$ Q9 g3 r7 Z$ o h% F
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* v0 M0 X0 w( X: l/ ?. C( ^' k part := @.transpOrder;7 j0 a, |. Q3 I6 X- M! `
part.move(@);-- load part
t1 F' r7 ]& r# n# E @.CurrIcon := "load";3 R" g7 s* d4 u0 K5 d4 b3 t4 j
GlobalDistObj := part.globDestination;7 k' o; q) u: y# T
assignLObj := rgmanager.rgAssignL;8 w- y) g! X9 |0 o+ L4 ]# ]/ t
row := assignLObj.getRowNo(GlobalDistObj);
6 w8 m" a4 C1 m) p$ L5 q if Row = -1 then -- since 703 |; b7 H4 }, u6 e3 X: z' }
if lan=1 then! F& _3 w; O8 e/ ]7 K# @) f
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 u7 J. S, y* D; W2 R/ q0 I0 \ to_str("in der Andockstation: \"",?.~.name,"\""));9 l3 R& c( s# a9 J& ]0 @
else0 `( N% p8 ?+ l4 c, N
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& ^" L! ~6 y, G* K
to_str("in docking station: \"",?.~.name,"\"")); ; \2 \ s7 ~& V- U
end;
: S4 x& K0 F: h9 q7 \ else- a6 N1 d3 T# w6 ?, A4 ]6 J
@.Destination := assignLObj[1,row];" P( Y! y0 `! y3 r! Y
end; " c! f1 K/ V% V& k
newDirection(@);# f1 D+ e3 O& a; t9 [
@.HasOrder := true;+ j; H6 Z- @+ C9 g4 j- w
end;
0 @3 A0 y/ t& d2 ^+ O2 j end;
% K' } Q8 D: Cend; -- of the method3 j. Z$ Q; }6 p7 F% W L2 y
|