/* called by: entrance ctrl of the object 'track'
2 \. s' O K# g. w3 F7 s*/
/ A8 g& H. M: eis3 I; F) \2 A1 e5 b# x N- k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;# O5 ]. q1 h ]+ m- o; ~; F
do
1 L6 W3 R1 b8 c7 S Lan := rootfolder.Internal.Tools.AOLlanguage;: d7 [8 h# J3 t
if current = @.Destination -- else return( }1 V, v5 \ X
then' ^& \6 r, m! m' Y: g
@.Destination := void;
" L( Y# D0 u9 N if @.occupied then
5 Q8 b, j5 S" c9 ^% t part := @.cont;
; j) P* L o X* _0 Y) R. ? @.transpOrder := void;
9 |3 w2 s+ k' @% B/ e3 o part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 u; t) p, E' i t0 h
@,root.eventcontroller.simTime);' V" ?$ n: C+ t8 O/ S# Q
@.HasOrder := false;
# ~) ]+ y. b. c* T- U @.DrivingHome := true;
' L7 ] s3 N9 l* j' `+ f; q rgManager.tryToStartTransOrder;
. ^& P; I, n, m, Q if @.Destination = void5 I6 k5 t0 [: v' Z* v9 E/ S
then -- no transport order for vehicle @
_/ V8 O, e, m+ M+ A5 Z; T& M @.Destination :=5 P* ]# V' w: e3 m
rgManager.nearestFreeStation(@,track.~);4 c( C3 ^" T& ~
newDirection(@); 7 Y/ i2 t$ c5 N
if @.Destination /= void then& _2 `% H/ T* d) @2 l: ~
@.Destination.NumReservation :=. D+ h: O( g1 K, p( Q" a' D
@.Destination.NumReservation + 1;' Q: @# Q+ q0 T- h& }9 y
end;5 t! O( R# f8 ^
@.CurrIcon := "drivingHome";5 c. f4 e5 g& ~4 X) R- ^
@.DrivingHome := true;
- U, ]; B, ~/ m end;
& D/ D" G% \5 W# Q( U else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- y* A0 W4 p3 ^& f) h part := @.transpOrder;& D2 r+ Y( S* u! G
part.move(@);-- load part
* z/ I2 S# S& f- O% i @.CurrIcon := "load";1 H( r3 _. ?( j- z
GlobalDistObj := part.globDestination;
! r6 m: y" f9 b/ ]' a: J; b assignLObj := rgmanager.rgAssignL;9 p" _( b. h. F9 a
row := assignLObj.getRowNo(GlobalDistObj);: z4 ]" d& s: ~7 z8 S7 Z* g" W. }
if Row = -1 then -- since 70# w6 q4 z) Y4 F' A' a) M2 D1 O+ L$ X
if lan=1 then
W* k, q, h8 f* Q2 S" K+ t promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
0 F& Z- e, {7 _5 o, i7 g6 Q2 t% y to_str("in der Andockstation: \"",?.~.name,"\""));
/ s( R3 l! n3 G2 |2 x% o0 m else" ~7 i- f5 Q: T: C' q' ^
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 Q/ b; \" _4 R% ^+ s& L
to_str("in docking station: \"",?.~.name,"\"")); ; b) a) q- s) H+ Z% j
end;& h+ J9 W5 x& r$ w3 y
else
$ H- l6 P# m3 m5 k @.Destination := assignLObj[1,row];
7 S* y* t8 n0 p% w' ] C1 n end; 9 ~: I5 J6 S3 t' h
newDirection(@);
* `' ?( S% Z0 t @.HasOrder := true;
& D. d4 Y( q) b( I3 B end;, p+ p# e5 v2 a0 {" _4 Y* u
end;
+ v( m, C9 T( I- I* Z6 I" eend; -- of the method/ R W' \$ V8 j1 Z( d' Y# c3 w* {
|