/* called by: entrance ctrl of the object 'track') u. o+ ]4 n- @& I$ S" K2 Y
*/; A/ K z$ p. h
is
* b& G/ \" Q9 j# y$ M4 B4 B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 l* D5 W6 i8 r. ddo2 \5 e. R, t6 [9 f5 L9 V
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ _4 H& n# D/ `" y9 O2 X7 `/ x if current = @.Destination -- else return
D3 d+ O5 `+ e' p8 A n then3 \$ t! }8 H' ~- Z7 m3 f/ Y
@.Destination := void;; y9 i h9 o7 X; _
if @.occupied then
- ^% \! c" S' N2 R$ g part := @.cont;
, `% ~1 @& Z" t4 T. Y' P @.transpOrder := void;
) s# s# Q7 y) Y5 w part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' P- t2 L7 W5 `3 h @,root.eventcontroller.simTime);
M1 o2 }$ g e1 Q @.HasOrder := false;# G/ z7 R0 @; R
@.DrivingHome := true;) R7 y2 O0 M/ `
rgManager.tryToStartTransOrder;
' c$ @2 w$ W. e1 ~5 [& ? if @.Destination = void
3 z g" q2 o' y) j2 b# |8 K9 i then -- no transport order for vehicle @# b$ k4 T- {) r7 ~9 q `
@.Destination :=
s: d& P; o T3 a/ y$ [1 r0 _$ Y rgManager.nearestFreeStation(@,track.~);
) ^- k/ {. n. [" V' Q, r( x9 f newDirection(@); ( V$ X! \* C+ W$ A1 Y9 L
if @.Destination /= void then
! N4 e- j6 S7 [, c1 C* ^) ~4 C @.Destination.NumReservation :=7 u) y( F* X% Z) M
@.Destination.NumReservation + 1;0 @: Q% K* o* B' O+ [5 w
end;
0 [) V& d# g- a0 g7 B( r' |/ ^! s @.CurrIcon := "drivingHome";
7 ]9 j" z% O0 p l, Z @.DrivingHome := true;
3 ]+ o* L) Q9 L6 B' W end;
- k4 v. H. ^% \9 V- \" [% r ?7 l else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 }% f# [7 O3 N
part := @.transpOrder;1 B: r, k( [- f2 t# R- H5 n1 K
part.move(@);-- load part) j. H j+ |* R0 g
@.CurrIcon := "load";
0 j5 B ?5 m2 E0 q) o' U8 ` GlobalDistObj := part.globDestination;) r# V( f* ^/ Q- H
assignLObj := rgmanager.rgAssignL;
( @0 Z5 x6 _2 r `9 D row := assignLObj.getRowNo(GlobalDistObj);/ [6 x9 [+ p. A7 M, U3 Y
if Row = -1 then -- since 708 [) T0 S2 a& U) |( }
if lan=1 then8 b( b. I- F# m( H7 g2 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 T+ W% J. V- U, a# N to_str("in der Andockstation: \"",?.~.name,"\""));6 c# A- T* b6 Z, p
else
( S4 u8 y( \" Y1 U7 B$ e promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, T- X5 o4 m0 }4 }: c1 x to_str("in docking station: \"",?.~.name,"\"")); . t/ _' I- i. _ l
end;
/ Q, e+ q' ]- ]2 l# L* n else( l& q2 U3 o' u1 C2 m
@.Destination := assignLObj[1,row];( P1 c1 }7 |8 V/ Z9 ]2 E Q5 y+ E
end;
, U9 z9 q) X1 _. L1 |$ M newDirection(@);- B+ l, h5 C6 n; H. A9 ^$ ]- I* C, S0 L
@.HasOrder := true;9 q- F& `0 D$ }! H
end;/ `2 ~" b+ O, z0 v7 ?
end;% Y! P0 t J* @" Y7 T) U# S; K X
end; -- of the method& T! F" _0 o6 J" Q A, A
|