/* called by: entrance ctrl of the object 'track'/ k0 }% l( Z; k* Y
*/
. L3 H. E1 x- _4 ois
z% U/ X" q, I4 u+ E- _& T( l1 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;! m# ]( i$ t3 f5 z& l+ s
do5 [; E, l. _) U2 u* ?
Lan := rootfolder.Internal.Tools.AOLlanguage;
; J: K. ~& q9 i7 ~% Z9 v% j' @ if current = @.Destination -- else return+ a9 f N8 Z6 ]# S" ]3 b2 y
then
/ e4 ]0 Q$ x `& r @.Destination := void;4 ^& ?8 |2 @- {; c8 n
if @.occupied then* m* J1 |7 _( D h
part := @.cont;
. T2 T" K5 L; \& |( D# g @.transpOrder := void; h0 d4 g. a1 B/ F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& z* h* M( I( ?6 u @,root.eventcontroller.simTime);
+ [* r, `/ W' _& a# S5 C7 d& | @.HasOrder := false;
! E2 x3 p; F E' m1 B) k) C, V @.DrivingHome := true;
" [0 R$ ^" Q# V; f( Y" w rgManager.tryToStartTransOrder;- @: q4 r# R0 j+ m$ q
if @.Destination = void
$ s! z; Z6 |6 E$ Y, R# z then -- no transport order for vehicle @2 ~5 j$ a: S6 a [6 o I
@.Destination :=
. K3 R. ?+ E! [$ X, Z1 \ rgManager.nearestFreeStation(@,track.~);
7 v9 X, Q: a f! z8 ?. K newDirection(@); 2 p: `* n: V+ b2 y# j
if @.Destination /= void then2 V$ q" B" @" L* [! K6 P4 j' N
@.Destination.NumReservation :=
% ?$ T9 q( ~* ~. ?! g @.Destination.NumReservation + 1;
) M7 T: q+ q- Y2 m" x end;
! B+ ^6 s4 p+ |3 P3 p @.CurrIcon := "drivingHome";2 R. n" E# U6 O
@.DrivingHome := true; s) \5 f( z8 q2 B/ x7 b" X4 c# k
end;
# h" C7 X3 h( i6 u( \2 c else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 J3 |4 p1 G8 u0 I: {7 {
part := @.transpOrder;. z% i- V1 Z: i( P# N4 R
part.move(@);-- load part
8 ~; Q% ]+ L+ C! T+ h @.CurrIcon := "load";' p/ x6 b) c' |3 ^8 X5 c( A& R. v
GlobalDistObj := part.globDestination;
: z! u4 w& c$ t7 ^% Q assignLObj := rgmanager.rgAssignL;) Y5 f$ p2 s, z' K2 N( \
row := assignLObj.getRowNo(GlobalDistObj);; t( T5 v4 Q! ~" O- ]& @! \& h
if Row = -1 then -- since 70! {$ }& w5 \+ ^$ y1 ^
if lan=1 then; e7 }5 ]- i& X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 x' u$ O5 V2 ~8 [: \/ t to_str("in der Andockstation: \"",?.~.name,"\""));
& l' @6 E9 J6 f) N; V else7 P+ R7 y2 R( j$ M) U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( p5 a5 A; s8 k; q9 A& `
to_str("in docking station: \"",?.~.name,"\""));
: C! u9 r1 ?4 o3 { end;; g7 ?& L( H3 u
else" B5 X( m# _- H- ?" V: p6 ~
@.Destination := assignLObj[1,row];
0 v. D. A; U5 G4 z! G end;
9 h; j2 G) F: ?; `8 q4 P newDirection(@);9 F- o0 B- A+ [( |! |$ f
@.HasOrder := true;+ T& C- z1 \7 Q& l3 k9 r- D
end;
# X9 ?6 N k% \! I( A# r; I$ | end;) U5 W( x" N& i) y3 j# D
end; -- of the method
% j7 U9 ~5 G" M7 U! v& P3 r |