/* called by: entrance ctrl of the object 'track'
4 Y5 G* k! L1 ~* s' q: s$ f*/5 I0 U) J/ c* a F8 E0 z
is6 @& A8 r$ p& ]- A
part, GlobalDistObj, assignLObj:object;row,Lan:integer; r; R$ Q9 f/ H
do
$ Q! J6 v+ l5 }3 ~. J Lan := rootfolder.Internal.Tools.AOLlanguage;
8 D6 Y, M6 k2 c! \. y4 y8 x8 w" f( x if current = @.Destination -- else return
2 v* }+ v3 j8 K7 Q( k( z8 S then
( l- Y1 K: A- R1 B0 ? @.Destination := void;4 o: |4 s5 y0 O) M$ Z4 b
if @.occupied then7 ]7 V) t; @- m, u
part := @.cont;8 V! R% Z! R5 r! M% T; U) P- z" I
@.transpOrder := void;
/ D, F4 q# p/ z) Z part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ _, {2 `7 v( C+ O* B8 }, y- H0 v
@,root.eventcontroller.simTime);7 ^+ K" l* L( d$ j4 {. ?
@.HasOrder := false;
" h& v9 M. f1 ]; Q @.DrivingHome := true;% m# J, O4 ?+ M4 y4 u( Q
rgManager.tryToStartTransOrder;
2 Q3 J; @1 a4 v; {% Q: s) u if @.Destination = void
/ E- C% _6 W' A1 B1 ? b `+ F then -- no transport order for vehicle @3 O& H T+ g% T$ r; F, ~
@.Destination :=
/ P# h; i6 D7 P/ ]8 I rgManager.nearestFreeStation(@,track.~);2 a, p6 ` _8 F! v! K+ b2 [
newDirection(@);
1 G; f" D( P6 K1 t1 x) h4 m if @.Destination /= void then4 @+ F( Q- g' I$ ?7 f9 F
@.Destination.NumReservation :=
& k d6 P/ z9 E( M' A @.Destination.NumReservation + 1;
$ z& O& r% l1 k5 M5 l2 t1 N7 m end;
- i* b$ A: ^0 S" _2 W @.CurrIcon := "drivingHome";& B& c9 k! T( ~9 h$ q3 w) I
@.DrivingHome := true;
2 c) ?/ A& Z5 P5 f( k* N* F( x( e end;
% \: D/ U$ A( s0 f: W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 R. v1 V, i! _) Q( Y! K part := @.transpOrder;: a2 g% a9 Z6 D" p0 \2 w9 ?
part.move(@);-- load part- U. g* I) X) `
@.CurrIcon := "load";
$ v7 [2 a+ Z# l5 R: y" {' K GlobalDistObj := part.globDestination;8 z; d! T4 Z3 Z& f% \ w d, H: y
assignLObj := rgmanager.rgAssignL;
8 a! ^) d) L4 k! E% H$ _ row := assignLObj.getRowNo(GlobalDistObj);! e, _" |; ]' {/ r5 p8 Y2 t. E! H6 Y
if Row = -1 then -- since 707 j) ?' W; b0 q i6 r& v
if lan=1 then9 g& W( x/ T1 s5 ?5 Z2 Y. S
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ u9 t: {3 H% j$ ^5 K to_str("in der Andockstation: \"",?.~.name,"\""));
- X1 U( g; r9 }2 ^7 \+ d6 U else
8 }! u: b! a: l1 @# w5 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, y* q# e0 N# s2 C to_str("in docking station: \"",?.~.name,"\"")); 2 H8 a* \0 N5 M/ m8 k. }/ h5 n7 F
end;3 l, i; i3 a0 n1 C- v) h
else, y* t# @ [+ u
@.Destination := assignLObj[1,row];3 X! [$ i# J! @' o5 s c
end;
4 l+ ?; @4 ?" X) c newDirection(@);+ R' ]& q, ^ m! Q; d: {4 o9 P
@.HasOrder := true;
- q C5 l3 Y/ _6 X7 e7 U3 \ Y6 K end;4 d! U7 D3 N( d" J, z. F2 U
end;. M! V& v3 x# _! ~
end; -- of the method5 s6 A: T& C7 u4 w4 v/ W
|