/* called by: entrance ctrl of the object 'track'; ^$ \% f5 }! a. L5 \9 J& i
*/, \9 u2 r6 F" G
is9 M; c/ o& N3 m, J- B6 r8 f/ W
part, GlobalDistObj, assignLObj:object;row,Lan:integer;& X K* X9 e# u& Y
do
9 z5 q4 x, C2 C Lan := rootfolder.Internal.Tools.AOLlanguage;: j& B( B( }9 x' ~) c* a8 p
if current = @.Destination -- else return2 A( V+ G, I6 l6 G" L. T' z0 O. G
then( T& X. r# r+ B' X6 V9 {
@.Destination := void;! {# ^* T7 k. Y# Y, [
if @.occupied then3 I5 l6 T" A; E# s% n$ W; H
part := @.cont;( b- G" D, l- p. n1 N' n: j# T! h, K6 _
@.transpOrder := void;
% f h+ K ~! a) z; c( {% E/ _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! v' u* k- ?8 y* s* u1 M, ~6 P8 a; b
@,root.eventcontroller.simTime);
6 r$ |7 o& h% `2 t' q! W, g5 A @.HasOrder := false;
& N$ i& z" b* p6 V' I2 B4 i5 L. n @.DrivingHome := true;
) o) b* q& R: w1 m5 W5 d1 t% C rgManager.tryToStartTransOrder;- x( ~9 E1 c0 B( N; f
if @.Destination = void/ Y: p) x: K" o$ R# @, N( s
then -- no transport order for vehicle @
( ~9 B( M, K# a0 R* s/ d @.Destination :=
6 Z6 {% b$ q/ m rgManager.nearestFreeStation(@,track.~);
- p. R* ^1 o3 J newDirection(@);
" @# d J& ^7 H( f if @.Destination /= void then9 I% l6 J5 b+ \) H
@.Destination.NumReservation :=# y2 P+ N3 C8 |. {& W! A
@.Destination.NumReservation + 1;9 q! `' ?/ z s+ z6 V5 H/ b
end;
9 H0 T h" z: ^ @.CurrIcon := "drivingHome";; x9 |4 n- w" L# i+ b
@.DrivingHome := true;) ` Y& w% J) U: A
end;6 u; b5 }( O# J. t: d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* h" H( ]+ q, g6 k* v
part := @.transpOrder;
' F+ V/ c9 ^9 H i n" c$ c# i6 A part.move(@);-- load part3 m2 N8 |8 e5 I
@.CurrIcon := "load";/ b4 |0 b4 X4 Q, M) M* l
GlobalDistObj := part.globDestination;6 Y+ ^/ O. J5 ]6 U; b1 ?
assignLObj := rgmanager.rgAssignL;4 ]3 Q, }0 u5 k
row := assignLObj.getRowNo(GlobalDistObj);2 m# f/ H6 J+ s. @
if Row = -1 then -- since 70
U$ T- ^+ Y3 D$ \8 ? if lan=1 then9 {7 B& k2 |1 r- B3 Z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 O. H5 \: e% h3 ~* ^) A ~, f
to_str("in der Andockstation: \"",?.~.name,"\""));# ~/ }7 A* \) ]0 z6 A' a/ C4 V
else
% Z4 F8 p7 d4 S) d# Z" ]. \. g promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% \( x/ J* ?0 V- b) H' Q1 d
to_str("in docking station: \"",?.~.name,"\""));
- Y1 p9 K. L% W) Y end;4 [/ R( {7 Z: `5 V2 Q/ V
else
) c! B9 j1 ]+ E4 O+ V$ i @.Destination := assignLObj[1,row];
4 C. A2 ^: l5 V3 d end;
% h7 C) S; C! v" o4 n0 w& Y! |; G newDirection(@);
- A! \/ X# i Z0 C. ^ @.HasOrder := true;5 e# Y6 Z) C+ v3 h5 N2 p4 I( o9 K
end;
7 ~4 a" ?8 b U/ I end;
" [$ B3 n, {% ~" n8 ~end; -- of the method
1 N8 e$ p9 I, @8 |+ g |