/* called by: entrance ctrl of the object 'track'
: X6 G2 ]) y2 G2 n8 G3 i8 X# H5 Z4 _; L*/" f8 e7 Q. @0 t$ a, E
is" C N/ E' g; ]. ]- d% c; P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
t+ h' n& e! w3 u/ V! qdo
& i( I& G8 ^. v5 _) c) E Lan := rootfolder.Internal.Tools.AOLlanguage;' T# W- a7 p' E1 p3 H& Q) w* ?
if current = @.Destination -- else return
! y" v! l5 |4 R+ C: V4 I+ P9 Y# y then
. d5 H% C. v; | @.Destination := void;+ H7 _% D2 @5 ~6 Q! r! u
if @.occupied then
( D' f# [0 V2 G! w part := @.cont;
0 {+ U% G1 r9 q0 ^5 u% B i @.transpOrder := void;; n+ ]6 Q3 I$ p& ^
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* t, B0 e Q1 w& n0 E) S( m$ L. X @,root.eventcontroller.simTime);' V+ u0 w$ J' w- u- w
@.HasOrder := false;( a# `- j; x- F G3 T
@.DrivingHome := true;+ y' b1 H/ g2 q3 W/ N. X1 [
rgManager.tryToStartTransOrder;2 O6 V+ F/ v% M1 l
if @.Destination = void X) R! q9 F \
then -- no transport order for vehicle @( V3 t* |. a, O9 i0 e* p- N: M
@.Destination :=. x, q& ^7 v: n( `' K8 P
rgManager.nearestFreeStation(@,track.~);; ~, E4 m% l. f" G( w3 L
newDirection(@); 3 X1 I6 M8 e+ Y+ Y
if @.Destination /= void then! q& R9 `9 ^3 l! d9 O) x6 b! L
@.Destination.NumReservation :=
# f# `( V! R; F# F- | @.Destination.NumReservation + 1;
0 K- r! i$ @3 b% `2 z end;" t) ], f+ l% s3 A0 X+ A6 K
@.CurrIcon := "drivingHome";
" X. D* w; h: X. M5 g% L @.DrivingHome := true;
" ? ~, A/ T) w% a/ Q5 T6 \0 C end;1 D+ ]/ L Q8 B$ N4 i
else -- the vehicle @ is empty, both vehicle and part are in the same dock station, }: u8 P. N6 l d5 _1 _4 [
part := @.transpOrder;. w% O0 Q+ R/ U8 n" l- h
part.move(@);-- load part: z$ b% [" r! E+ _3 }0 J+ Q# K% q
@.CurrIcon := "load";
+ s6 P, {; {+ h GlobalDistObj := part.globDestination;- q1 X2 M+ s* @3 t# f
assignLObj := rgmanager.rgAssignL;
* y1 T: ]6 H1 H4 u6 K row := assignLObj.getRowNo(GlobalDistObj);4 ^+ u; Y" H' k, C4 X
if Row = -1 then -- since 70# ~7 p' y; q/ b" I# ?
if lan=1 then
8 `& y" d& D6 B4 S8 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. q* ?8 u, ^) B' l& v' | to_str("in der Andockstation: \"",?.~.name,"\""));
E( J" v( }7 e else" A$ C: r9 k3 I6 [" R; r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), Q# j1 C `. x$ U- p
to_str("in docking station: \"",?.~.name,"\""));
. E& t0 u* @ ~1 R% o3 h end;( M$ ~; B) X# y
else
. v' F* G! C! X- T& `5 E @.Destination := assignLObj[1,row];' L8 q% ^0 c6 ~: S; s+ N" h$ \
end;
" r0 }/ n: A% m! a z newDirection(@);' P: P$ }% i" U( l9 X
@.HasOrder := true;% b7 [/ A! H# J; G6 ~
end;
8 ^6 U6 O% i1 o/ G/ g8 N( l' ~ end;! ^, ?; H4 x" u$ B" o- k
end; -- of the method/ f S" ?& s* n3 W3 A5 k
|