/* called by: entrance ctrl of the object 'track'
3 ^) \9 K9 L" e0 b*/* `0 [3 V, \7 s( I& H3 t3 e
is
. @9 D7 L, U7 y1 w3 c' v) W( Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 S' ]: S0 c9 @; z# m' S0 P% z
do
: C! r6 u0 q9 s4 Y/ N. B( b Lan := rootfolder.Internal.Tools.AOLlanguage;
; m+ C" n' _5 p( e7 ]3 W if current = @.Destination -- else return- q' i1 t7 h' m* u7 D
then
. T/ Z! ~: Q1 G6 @+ R0 o! x0 J, B @.Destination := void;
) _% b# q0 I ~3 _ if @.occupied then# w8 x- @7 L% N) h. m
part := @.cont;* b6 k* p+ H4 f) w" @2 ^
@.transpOrder := void; d& n5 D/ i' W: c9 x, n7 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 a4 P# \0 [3 j8 \: Z9 f @,root.eventcontroller.simTime);1 }! ~9 s: i' }" M; L0 c
@.HasOrder := false;. f2 t0 u. a# L4 f
@.DrivingHome := true;
4 c9 Y3 N+ l( @' L rgManager.tryToStartTransOrder;* v+ x8 ]1 v: Z
if @.Destination = void
0 M9 {; G8 Y! S" O8 Z then -- no transport order for vehicle @# c, e0 ~! r0 a
@.Destination :=
3 v4 W( D: P( T3 j* U+ L rgManager.nearestFreeStation(@,track.~);
5 _+ F- S7 p1 a- ^ newDirection(@);
8 s( _; U6 I$ B2 P7 P if @.Destination /= void then1 k( I" r; t4 q8 E( a
@.Destination.NumReservation :=% M3 X8 p* @6 P; K1 {
@.Destination.NumReservation + 1;5 d* o7 \( g4 ~3 P3 {' G4 e8 p
end;
) f/ z/ _* C9 c @.CurrIcon := "drivingHome";$ Q# Q- c0 a \) M& S$ r! J+ S
@.DrivingHome := true;
/ O4 c9 K9 p5 H- K0 }( w end;- Y# _2 _) E) Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 B6 v1 [+ ?* f" W4 j part := @.transpOrder;
6 @2 S5 b& f0 u: c9 [) W part.move(@);-- load part
\2 e- \: u! ` @.CurrIcon := "load";
; |. h" T9 f4 c O GlobalDistObj := part.globDestination;
1 E T* g3 s0 m3 A, Y! Z3 ^9 p assignLObj := rgmanager.rgAssignL;
, v0 Z5 Y* W" m" O8 D }' ^/ L row := assignLObj.getRowNo(GlobalDistObj);9 n0 v# C* U, C; Y: g7 Y
if Row = -1 then -- since 70
1 A* L9 M+ \" Q8 h. e if lan=1 then* D. v2 l( [0 `7 `* h
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, q3 H0 A% k% x
to_str("in der Andockstation: \"",?.~.name,"\""));
% g! F" |0 H7 _ else
% ` w! [/ ]/ X" C: w2 s0 T+ x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; Z, Q8 S5 s$ }9 r; j7 ^, W
to_str("in docking station: \"",?.~.name,"\"")); : H \2 r( k: H# J. W w1 ^
end;
6 C6 M4 Z0 C: ]3 J else
' q9 N$ K2 M9 P c: G: d @.Destination := assignLObj[1,row];
3 J2 } l0 u4 M" f end;
3 R U( t% ~0 l newDirection(@);2 h5 K; j5 X$ X
@.HasOrder := true;
J3 ^0 H( Z! w6 E& S1 | end;
$ D- w+ N3 k2 i, n, e6 S3 U end;3 M7 `6 p7 g4 D; y, {
end; -- of the method
2 @5 p0 U9 l' [2 Z: ]% F9 ` |