/* called by: entrance ctrl of the object 'track'# Q. a! z9 M I! N
*/
2 @ ]2 }7 ?7 x$ q' His
8 M) C. ?; f5 A1 ?- Y" c part, GlobalDistObj, assignLObj:object;row,Lan:integer;; B& r% t/ O1 l1 U b
do p# }/ O w' A0 _( q
Lan := rootfolder.Internal.Tools.AOLlanguage;
. O I9 W; P7 R if current = @.Destination -- else return; ^: s2 w% w! |( `1 j( C+ k
then
& \$ Q5 O* b, L* `3 m @.Destination := void;! D- h+ m3 E j+ e7 d
if @.occupied then% A! V/ t4 h! X0 U
part := @.cont;; N/ m& b- A7 M
@.transpOrder := void;
, P! Y# C, T# b) F+ j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 f) w0 H1 T" o6 z3 n S* q
@,root.eventcontroller.simTime);+ x4 g5 |) B0 A& G; {6 B, s
@.HasOrder := false;( C2 P5 ]# y [7 B
@.DrivingHome := true;& h. t/ ?; m) L
rgManager.tryToStartTransOrder;0 W6 T) F [+ P! a* [& V
if @.Destination = void' l5 `* I) M4 L" w
then -- no transport order for vehicle @
3 ]. |) Z+ Y7 C& h @.Destination :=, \& R' D. i- R! P0 }5 p5 S
rgManager.nearestFreeStation(@,track.~);
9 q7 H, C' ]6 m3 M# U newDirection(@);
0 I8 P6 ~# k+ |. d2 C8 T, w3 Y: X if @.Destination /= void then) T$ `* }, _ p' e7 Q( n
@.Destination.NumReservation :=) h' F1 L1 A* \& b# l& \2 d9 e4 \
@.Destination.NumReservation + 1;! g1 _( @% H; z' j, N
end;
8 Q' r0 L$ C5 k/ X6 x! u @.CurrIcon := "drivingHome";0 ?& `2 E' L$ V0 l8 i, L; j
@.DrivingHome := true;
8 q9 c4 H8 R' {. d' { }7 @: \3 s end;
! T- H* `/ a6 n5 y- n+ W( Y7 P else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 g: Q" x: d! u6 f# I# z part := @.transpOrder;# i0 u* C; }$ w2 k6 I* `
part.move(@);-- load part
' Z* I/ ?" X2 n1 B" W8 c5 @ @.CurrIcon := "load";
* O. z, |6 M0 I GlobalDistObj := part.globDestination;* I- k; A: D1 J; `
assignLObj := rgmanager.rgAssignL;2 L9 d! e3 b$ G- }5 M
row := assignLObj.getRowNo(GlobalDistObj);5 G/ {0 C0 A: V% [/ w
if Row = -1 then -- since 70
& g2 m0 A+ g8 }5 k( h( P5 N if lan=1 then% |0 j8 l% E* _! k
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 u0 r7 k9 V+ r: B% G" `8 u. U to_str("in der Andockstation: \"",?.~.name,"\""));
. h. j" I$ S3 }# P0 N) P else5 R* R2 @8 d2 q- S5 [- T' b* C' @
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! \+ G+ C. A2 `$ e4 d$ J- q
to_str("in docking station: \"",?.~.name,"\"")); $ D" _: `2 H) A, d
end;
# ~ l X7 x R/ h! e else1 Y8 G( ^5 B& K7 |
@.Destination := assignLObj[1,row];
I, a1 }! H" N O end;
6 E# L- @$ R& s4 b newDirection(@);) E) u# G8 a. X( a
@.HasOrder := true;
+ d& t/ }) K7 W+ c$ f end;6 ^$ \* ]& L2 x9 s7 @
end;
6 U' i& Z" c. cend; -- of the method
& c( _3 p2 F5 U* k7 F1 X# E& r |