/* called by: entrance ctrl of the object 'track'
6 T+ B4 a# e% l9 X*/7 b% X- q( ~& J+ g! \1 }& N1 _
is
8 Q, R7 z* H4 G" O" P. p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: m9 M: I! C! u+ H5 hdo
* L+ ?+ U4 i% [ Lan := rootfolder.Internal.Tools.AOLlanguage;
$ L6 T0 D. a: [& i% C if current = @.Destination -- else return
$ A* h: e( i4 [% B then; W ?! p6 ?9 p( m9 _/ q
@.Destination := void;
) |. a5 A/ q+ f- R5 p4 ~; E if @.occupied then
& v* D3 G/ k. K' K part := @.cont;& G) X% J$ I" j5 ]
@.transpOrder := void;5 r+ p- {+ c1 Y8 o! g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, U3 ^9 ]* k# R: c$ r( B @,root.eventcontroller.simTime);
4 R/ _ W/ e' ]' E @.HasOrder := false;1 p# i \' r6 x- ^# N- b8 j
@.DrivingHome := true;
+ M8 ~2 ]2 u- o4 K0 ?* k! T% ? rgManager.tryToStartTransOrder;9 @2 {1 S6 m3 U2 ?$ Q, O
if @.Destination = void- L( `9 Z. Y) q/ b2 q# t
then -- no transport order for vehicle @& r5 @; q4 ~5 s* ?; \% m2 n0 V
@.Destination :=
v: d9 d, i8 L! {) r rgManager.nearestFreeStation(@,track.~);
: Z/ H: x3 S) R0 R2 I' K newDirection(@);
% \# X6 y0 f! K4 m if @.Destination /= void then% J" u0 F8 K8 v- T8 i% E$ n
@.Destination.NumReservation :=
2 I9 S* ]8 m+ u& v+ d% ` @.Destination.NumReservation + 1;
" ~/ Y: h" s; h$ R1 s end;
9 z3 S3 s) X; J' L4 d$ ?9 [ @.CurrIcon := "drivingHome";( Q. H' h q2 w/ l, T/ b( ?
@.DrivingHome := true;
, Z w& V' @0 c( q1 G& _1 r end;
! j% G K' R6 ^7 K6 g else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 K3 O, [' U7 H6 j0 ~4 A
part := @.transpOrder;% o7 a: G: }- g; {/ O( o# H" ]% ?
part.move(@);-- load part9 f5 F+ @2 P3 p& R9 z
@.CurrIcon := "load";9 y- X) v2 D1 F& Q
GlobalDistObj := part.globDestination;
/ |, P5 T# n) v: _6 z' G assignLObj := rgmanager.rgAssignL;( D( }5 u) F8 J8 c3 t3 E
row := assignLObj.getRowNo(GlobalDistObj);5 P, u F2 z- T5 M* A
if Row = -1 then -- since 70# ]4 }8 \# x: ]$ C
if lan=1 then
& }- p0 ?6 F8 a9 \3 W7 {! `3 Y, D& L promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 s3 U: v) ` Y* ]5 a" ?9 Y
to_str("in der Andockstation: \"",?.~.name,"\""));2 N, S( S2 f9 k# Q: E( D
else) \' y4 ?% _2 w [ i" Q6 s+ C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% q7 |# x" l( ]0 }% t2 i8 ?
to_str("in docking station: \"",?.~.name,"\"")); 5 S: y& o9 @; \& r4 h
end;8 c! ~7 `9 X; v Z8 R
else q* e7 l1 X0 A6 x
@.Destination := assignLObj[1,row];) [) p+ K0 f# T: s7 I" s
end; + U* O% V& w5 C) }' T
newDirection(@);, Y- o# Y. M, V6 f! s
@.HasOrder := true;8 l9 ?& M2 U# L) F+ V9 t
end;
" G% W& M; I& S) S end;
- @( S! R" S& X: h8 U2 \end; -- of the method- g, ~3 j, \. s& o* R
|