/* called by: entrance ctrl of the object 'track', y, l9 l' Q( T( v* p) f3 I
*/ \. J2 c" V# C5 F+ p. K9 b- b9 Q6 j
is
& ]1 S: e h/ `; c/ f# a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# v( z/ T" H9 n1 Udo
{$ K S* k8 H& x% N; f Lan := rootfolder.Internal.Tools.AOLlanguage;
: [8 @4 H | x2 T! V! d if current = @.Destination -- else return# `0 m% X( W& W+ u
then8 v0 {( x% ]5 w6 n+ p7 G1 L
@.Destination := void;
3 H4 k9 s+ A! v5 R if @.occupied then
+ p5 F" ~% b9 w. p! Q% o) T7 J part := @.cont;
6 \5 m! i$ ?, H" f: F o" i @.transpOrder := void;- T) n1 q' ]* q& Y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. Q4 m- S$ Y2 S: ?
@,root.eventcontroller.simTime);1 ^! B. M( Y& m% u {' x
@.HasOrder := false;1 c1 w" {9 Z; n/ y# D* r' f3 d. a l7 O
@.DrivingHome := true;# |. Z, N% U6 s9 j2 D3 [" m" g
rgManager.tryToStartTransOrder;/ S& M9 s+ u: Z4 }) Q
if @.Destination = void4 k4 z+ @$ ]* @. R# O
then -- no transport order for vehicle @& _5 b' M1 {7 k/ {/ g8 z
@.Destination :=- S2 F z* q# _. |+ f5 m$ a3 Z( g
rgManager.nearestFreeStation(@,track.~);
8 g9 ^# N4 Z) N( [ @ newDirection(@);
3 C" D' W# i- d+ H; _* v: @ if @.Destination /= void then& w# U {* D1 P# ?
@.Destination.NumReservation :=
2 h. Z9 S8 c! C% V @.Destination.NumReservation + 1;- K& N5 {( U4 L/ c# x/ _1 N; q
end;
7 A$ p7 D. R0 g9 \* J' s @.CurrIcon := "drivingHome";0 @$ O$ Q0 `, C& T5 A
@.DrivingHome := true;
/ A' v' Y( W. r: j; ~ end;
( _9 N& t2 B% L4 \2 q; W& d else -- the vehicle @ is empty, both vehicle and part are in the same dock station' C/ S( J/ M, C, d7 o( ^8 O
part := @.transpOrder;# q0 h5 V- G9 }! {
part.move(@);-- load part! g/ C' Y' {( E9 @
@.CurrIcon := "load";! ]' `' A0 {$ v1 U" _
GlobalDistObj := part.globDestination;
$ r/ Q, f3 |8 c | assignLObj := rgmanager.rgAssignL;
3 W5 f* X$ e, U0 _ row := assignLObj.getRowNo(GlobalDistObj);
! L, ]5 T0 e1 @2 V- K if Row = -1 then -- since 708 m5 ^$ d Y0 }
if lan=1 then/ ~ G/ y, g3 r, ^% \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ X6 h3 P0 s/ H to_str("in der Andockstation: \"",?.~.name,"\""));
* o5 [) p4 H5 n% H# B else
5 q/ U: J0 `: a4 s promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ q/ r; ?7 A: q: Z- p
to_str("in docking station: \"",?.~.name,"\"")); 1 B& u! B- K+ W8 M. m2 W' S) A. h9 D6 W
end;& Y9 a- l( D" |8 S+ D2 k/ c
else" H. A& h' a6 I* s6 N4 \2 P
@.Destination := assignLObj[1,row];; K8 j5 h& _% p {4 l/ e
end; : q" i6 A6 i) M% m8 z' }: E2 w
newDirection(@);
% @1 h: r8 A0 m( w% y# A/ a; [) F @.HasOrder := true;# B+ ~) h7 G; h
end;
2 B: p8 y3 K5 H. ~9 o; S end;
9 k6 t! m0 r% V e7 U$ hend; -- of the method$ m: f. M- B2 b9 N. r2 ~
|