/* called by: entrance ctrl of the object 'track'- g+ v; `/ j. o8 \0 \
*/
* ?6 M( G2 e% a. O! \is
& d1 q* y5 l$ s- P. c part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) r, `5 J" s4 Z% p4 x/ l; q$ Ido5 g7 L/ V7 K# F; n1 C) [6 k
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 U6 ], D& s2 g if current = @.Destination -- else return- \+ ^# C8 _! x8 g% C- I- v
then
7 K( P' b. c9 S* M. r% ^8 L @.Destination := void;/ \/ k& k. A' U( ~7 D& v# L
if @.occupied then
0 ]( U3 R: X6 @, C2 { part := @.cont;
2 O& ~/ f: \7 \- O: A; ~6 C& ` @.transpOrder := void;- I D, j) I# {- H' V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 W6 M) |2 t" i! e8 v9 A
@,root.eventcontroller.simTime);
% F) r) O* a8 s+ ~6 x% D/ y: M8 S7 Z @.HasOrder := false;
9 M# B) t7 \! V; A9 ? @.DrivingHome := true;
2 }; v1 q: U9 _( {! d rgManager.tryToStartTransOrder;
- [& `0 u" b& O% P if @.Destination = void/ i/ C3 a L7 {1 L* e6 l" H& \' q
then -- no transport order for vehicle @. P- j2 \ u3 U' z6 f% r1 ]) L6 R
@.Destination :=
8 |; G8 S) z4 `5 `- k; w rgManager.nearestFreeStation(@,track.~);
' M& c- h Q9 [ F+ \; a newDirection(@);
) Q- d& J$ N% |" D if @.Destination /= void then
# Y5 ^! F# L4 f7 w7 e1 o- P5 P1 O4 p @.Destination.NumReservation :=
) n* B3 X' i8 P- y @.Destination.NumReservation + 1;- B8 G+ `3 O) z
end;) y# @4 Y' R8 g' Q) U2 t
@.CurrIcon := "drivingHome";
7 X" G/ x0 E& d1 }* L$ e @.DrivingHome := true;
: e& K4 j$ [/ ^1 C end;4 }4 x+ j( I3 ?
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 W% g& C5 Q5 r part := @.transpOrder;
5 E: }8 F: E, u& n, |* S, u( y F part.move(@);-- load part7 s7 Z4 M0 r, A# E+ V$ y
@.CurrIcon := "load";; V7 @( u$ q& Z) \4 U/ h- z2 g& C
GlobalDistObj := part.globDestination;# e: \: f1 A9 u; z) o: o
assignLObj := rgmanager.rgAssignL;
4 F& W# Y8 e( Z9 a" I( [ row := assignLObj.getRowNo(GlobalDistObj);
( z7 V! L# \2 x; t) \2 d/ A- L if Row = -1 then -- since 70 \/ m, y0 _5 c1 J g
if lan=1 then$ W/ g8 J/ \2 f3 w; { Q5 y V. V
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 C0 j5 h8 p" S, `5 U/ N5 N. N0 s to_str("in der Andockstation: \"",?.~.name,"\""));# ` X* v3 U1 T l$ g/ }
else1 e; q) @/ E' M8 t* F) ~/ q) J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 G) G- e: n0 [5 A9 y2 T. ]& m to_str("in docking station: \"",?.~.name,"\"")); ; T+ q- N* g$ {1 O
end;4 m& W- x3 w8 C4 n. [1 T6 h) l( V$ [
else# ^5 H$ o" W( H+ D5 g6 v
@.Destination := assignLObj[1,row];6 @& q3 i# [* W; u" x6 P: g
end;
& X# r6 X0 y: Q7 I z+ I; T+ q3 A newDirection(@);& N( j* i! v' {5 P$ s
@.HasOrder := true;
0 B6 {1 I3 Y" l9 X% z, H end;
6 ]* z6 d/ l5 j end;
2 p& J4 f/ _! H' Xend; -- of the method0 @; X% U. ]) _4 T* o
|