/* called by: entrance ctrl of the object 'track'( J: ~' N. x' _2 p- V. I
*/
. ?+ x" e& L h) x( Z1 K' t* @% Ais
- r! _- M; j$ j5 c part, GlobalDistObj, assignLObj:object;row,Lan:integer;! K$ x" Q+ v1 @3 w& W
do% B5 T" i' H# O
Lan := rootfolder.Internal.Tools.AOLlanguage;6 L; a/ W7 t2 w! C' j R( v
if current = @.Destination -- else return, _2 p( z. q$ {7 Q
then
9 @. `7 d% i+ N6 C% s! e+ e @.Destination := void;
) w7 C" `: {' _ if @.occupied then
8 ]* q; A# \! b7 w part := @.cont;* s9 k r5 O- y% K
@.transpOrder := void;! p; n* b; N5 `
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 O: O; o' X- C: b1 O9 M% q
@,root.eventcontroller.simTime);, u1 [: p1 i) \ g0 I* K `
@.HasOrder := false;- H% X' b# b; L$ \
@.DrivingHome := true;
. [- P7 ?- ~, W7 P2 A5 O rgManager.tryToStartTransOrder;8 B9 [( Z( v9 T& }/ h S J
if @.Destination = void
8 U p* [5 Z- x& ~ then -- no transport order for vehicle @* x {0 l: Q8 {5 L1 x" ~
@.Destination :=8 f) K6 @. \- B9 B! p, M { g
rgManager.nearestFreeStation(@,track.~);' S3 \9 q2 P. D7 H, B5 l0 F& ~
newDirection(@);
; F- e! J( j, [8 w- T( |2 v if @.Destination /= void then
7 P m1 ~% [" D) n# u! A @.Destination.NumReservation :=5 I( y1 B1 _% ^" \) Q% }6 v
@.Destination.NumReservation + 1;$ M$ Q4 ^4 ~ ~" z4 N+ N
end;
+ Z6 s- P8 V: P- W" }1 S* q @.CurrIcon := "drivingHome";, d$ N& c" F! [+ E" b
@.DrivingHome := true;
9 i/ _) z2 ^8 y2 l) N) v \5 ? end;/ |; ^. t" U- Y# I. g* @
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 g$ E; z! o& v4 H part := @.transpOrder;
0 K5 t# `6 a3 M% [# E# z. K v6 q part.move(@);-- load part1 B+ J1 S+ P/ k
@.CurrIcon := "load";
% X6 m2 X3 u2 o7 F. B+ t; l. u2 r GlobalDistObj := part.globDestination;
! Q7 w0 ?' A! | f: x) J3 L assignLObj := rgmanager.rgAssignL;
4 L, V' A$ M3 x2 t5 r1 {4 d- P( B/ m row := assignLObj.getRowNo(GlobalDistObj);
6 i+ O9 v! Y9 K) t6 x- ] if Row = -1 then -- since 70 k0 z7 _8 ~1 U' Y
if lan=1 then: x6 u. i: G" z- H( b' H/ ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 ]' E$ m/ j7 _ T, Q to_str("in der Andockstation: \"",?.~.name,"\""));/ E4 U8 F9 @+ k, ]8 C6 d* S
else
- h9 P4 K5 @, r0 S/ j. x5 ]7 p promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 s- h9 Q' L2 ~' z8 \' @
to_str("in docking station: \"",?.~.name,"\"")); - K4 k& ^! h, D5 q& L4 E( {
end;
0 j9 k4 T3 ]* e# d! _. R+ e else
* r# a% d, Y3 M. Q8 [ C' w @.Destination := assignLObj[1,row];; f, R* B b# z# Z& T; G
end;
' A' y5 E$ ] V) P0 B0 u2 I8 j newDirection(@);4 I+ @8 @. K+ i4 l5 d7 G& B# G
@.HasOrder := true;/ q0 \$ F) v8 [# U$ e, ^+ b
end;
) `! L1 h' T. n, P( o4 S end;* \& y( d/ V7 [, e
end; -- of the method' }! p$ B9 P# @% C9 R3 X
|