/* called by: entrance ctrl of the object 'track'
9 n& _ Y0 s& s, V7 @*/
5 K" W7 F9 x% a$ e, S3 c/ J4 X1 A) cis6 w/ |" f" d6 O3 G2 L% o, m
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* x, x$ j% U. m& z' `do
' X" i$ k, P- o8 c5 g$ r4 } Lan := rootfolder.Internal.Tools.AOLlanguage;
6 }0 h( L# ]4 U! T: }- P if current = @.Destination -- else return: K0 C6 x$ b0 I% A* }
then
2 D( Y# B8 Y2 i/ T @.Destination := void;% c( a* `" x5 r( n% K
if @.occupied then9 J R: S% J1 P1 b/ {$ t! G+ I& a
part := @.cont;/ a# p+ }; d3 f
@.transpOrder := void;( d4 g# f3 M2 W0 K+ k. S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) M% y j5 R) U0 J5 J @,root.eventcontroller.simTime);
3 `- \+ e! F9 p/ V- Q @.HasOrder := false;
6 E' E, y4 w4 ?4 t1 h$ d @.DrivingHome := true;( D% }. N/ o4 `" S s# ~
rgManager.tryToStartTransOrder;
$ D8 T" ^2 d O5 ~4 V/ C) S R, U if @.Destination = void" |8 k, c G0 S: b8 \' U
then -- no transport order for vehicle @
, H9 i9 { u' Y) o @.Destination :=/ E* ?3 H( S! F9 h3 x
rgManager.nearestFreeStation(@,track.~);. b; w+ {3 H# }1 z" B9 r! A
newDirection(@); 4 I* O* y0 s4 ^- _" F
if @.Destination /= void then
1 {/ |) Y' }: p @.Destination.NumReservation :=
8 {) u; m) H) f1 P+ G, g @.Destination.NumReservation + 1;
% m/ K B a( Y7 C end;1 G/ _4 K: _$ T4 M1 [! }5 x0 L
@.CurrIcon := "drivingHome";
6 e/ W/ r) A3 N( G @.DrivingHome := true;4 [: K" ^" v/ U$ U8 U7 `; U1 N
end;
/ B/ m5 B7 j( f/ c0 ^8 ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. o/ j/ {% ?2 z' f. M" Y, f! U& i! ^, G% B part := @.transpOrder;
) W' s6 N7 f: p9 ? part.move(@);-- load part
0 ?9 u; ]4 n! [9 x: I( n# ]: ? @.CurrIcon := "load";
4 {5 f/ u0 [! M% I' k GlobalDistObj := part.globDestination;$ q) e) O% @0 d8 K Z/ ~
assignLObj := rgmanager.rgAssignL;0 _2 @# Z+ ]6 u9 F+ A# q3 p
row := assignLObj.getRowNo(GlobalDistObj);7 f7 G3 F3 x' P, E4 W
if Row = -1 then -- since 70: m! o* V) M& V) q3 S9 j h) F
if lan=1 then
& n6 G" e/ e' P" W+ \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 W6 Z5 p: c* p- G! c% V# ^) L to_str("in der Andockstation: \"",?.~.name,"\""));$ r, T3 Q* @8 _7 w7 @/ t
else4 k7 @, e! x. v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ V& T9 x8 z) Q& P4 f to_str("in docking station: \"",?.~.name,"\"")); * j- _- s& n& Q
end;
* z! }* ^: [0 I8 [8 O# h6 I8 w: b else2 ^# ]& }# z+ E' \ }; \4 U$ \: F
@.Destination := assignLObj[1,row];3 I L# ]6 |+ J/ x. X8 n) v
end;
. b& n9 `8 g0 I$ R; D# P newDirection(@);
/ j u8 L2 ?8 k2 ` @.HasOrder := true;) R, H7 S- {8 c/ E, X+ C2 o0 J
end;6 {* x* ^: M5 H) m+ C' \
end;$ _3 H6 e4 l S. H
end; -- of the method n p2 h. v2 G b8 H3 P
|