/* called by: entrance ctrl of the object 'track'
' W5 P# G+ s+ q6 z+ e/ t8 R( i*/
4 H$ ~+ B7 k9 a; Yis2 D; m% y% R4 v* M! Z' i' K1 v1 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 I; d6 a# L7 p. O0 k$ x! F
do$ Y) n* j" x3 _7 q
Lan := rootfolder.Internal.Tools.AOLlanguage;8 E- m) W! F: U; X
if current = @.Destination -- else return& a6 }/ |1 m" e
then G7 d' _# w4 H! G* x
@.Destination := void;
! r/ X9 P$ J+ E R. x if @.occupied then
A f" ]4 S: E" Z# V- d$ ^; U part := @.cont;
2 {# i( @( f6 x5 J8 q @.transpOrder := void;
9 _6 P: G, q8 Y: V part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 w0 `& c/ b& ?0 c, W @,root.eventcontroller.simTime);
! h4 s& {9 W# m8 M5 C @.HasOrder := false;* P z+ N/ n- J$ R' G
@.DrivingHome := true;6 N- H: a8 V3 h x g, ~
rgManager.tryToStartTransOrder;- p( ]/ J5 y- p
if @.Destination = void
, t0 X0 j ?- W8 O& | then -- no transport order for vehicle @+ W0 |6 Y: x4 U% {( h/ r( _
@.Destination :=
# {+ v7 ]2 u+ w rgManager.nearestFreeStation(@,track.~);, X7 L9 H; W- t2 G8 i" O; L
newDirection(@);
; V, P: y2 \$ r& _" p* O j' d" } if @.Destination /= void then
4 X( e1 r9 \7 y+ D% C' q8 b @.Destination.NumReservation :=
) |# B! C+ q) E r# j @.Destination.NumReservation + 1;! D9 y% y/ C4 ?5 B
end;
! }: }9 D, }- | @.CurrIcon := "drivingHome";% X+ l1 P! Y- `
@.DrivingHome := true;
; H# x0 O' Z- q4 B& C& ~* ] end;
2 e) n Z6 ?) \5 @9 L" n: W# G: J2 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ r& F6 j: t$ b1 t& W% Z part := @.transpOrder;7 }: Z7 B7 S) V9 [1 s( t3 l$ H
part.move(@);-- load part9 Z2 r! W- G/ v" ]9 \
@.CurrIcon := "load";
" A0 q/ j# ^4 w& L% _ GlobalDistObj := part.globDestination;5 W/ T. z) t- n
assignLObj := rgmanager.rgAssignL;% J4 P$ x v5 J& w. w0 L
row := assignLObj.getRowNo(GlobalDistObj);
: l1 A3 t1 l4 g- l if Row = -1 then -- since 701 I# r6 }" ]3 { V& Q
if lan=1 then
/ T: Z# h1 F, n; n/ L, [4 h4 N% T) @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 O( M( `1 F# ]; i9 O# }: ^6 e to_str("in der Andockstation: \"",?.~.name,"\""));
# I4 M# ]& }" s% V7 q0 n else; S! L( p3 e+ A# I9 Y `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 Z2 H }$ |0 P* s: c to_str("in docking station: \"",?.~.name,"\""));
8 k6 I. z* q6 O' T8 J# f end;
+ B3 j; B k/ R- d+ ^% R else. M! d! B; V# R
@.Destination := assignLObj[1,row];) V) m& _' F3 J( I
end;
5 U; o( Y" l9 X2 \ newDirection(@);4 e( h7 g. Z; m) Z4 D- r
@.HasOrder := true;
8 j) K O, Z( }& X8 Z) b/ e7 z end;* s& l6 I: y% U5 J
end;. ?8 J2 ~: X6 J& P/ o2 s
end; -- of the method0 f! Q) _7 T) l, v7 a
|