/* called by: entrance ctrl of the object 'track'
. {1 C M5 p! y3 U! Y*/
5 \; h V, Z8 f/ x$ u9 ?is
- w& T/ ^6 d7 D& u. K, L$ X' U part, GlobalDistObj, assignLObj:object;row,Lan:integer;( ?$ c ] f1 C k% `) C
do
! V/ {6 o$ ]1 M) M2 } Lan := rootfolder.Internal.Tools.AOLlanguage;
0 x7 B" F. y* G( s' T o: ` if current = @.Destination -- else return o- |2 T9 y1 Z! }* C; X: L1 P1 H; a
then
+ Z& z3 ^3 G" _" ~ @.Destination := void;
, k4 D5 Z$ Z: s' n1 p% ] if @.occupied then
9 q* x7 b. f3 x& P part := @.cont; K& b A* g2 v
@.transpOrder := void;/ D @3 `1 C0 h) U; k+ p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 p1 G8 ~3 j% [3 d( O1 k) i
@,root.eventcontroller.simTime);
4 M% N3 H% X6 `4 c+ J @.HasOrder := false;$ `4 ] c/ z9 ^# a/ f8 ^/ I
@.DrivingHome := true;
/ c, @6 a. ~+ E9 n2 ] rgManager.tryToStartTransOrder;
, C+ }" X9 G. Y- Y if @.Destination = void; u9 _. f7 c1 Q' H
then -- no transport order for vehicle @
% A& k; x5 |' [3 C @.Destination :=8 |" m I: M- X, `+ p
rgManager.nearestFreeStation(@,track.~);* X+ o+ E3 Y H2 N0 \
newDirection(@); . |# E* S3 O( ?3 g5 `5 a7 h- m$ K
if @.Destination /= void then/ ?: ?' I Z* k% I$ L( G
@.Destination.NumReservation :=* q( R' |2 M4 D: }- a: E5 |
@.Destination.NumReservation + 1;" S% n$ O, S+ u2 u1 l3 m
end;. T% J. r6 N& r8 K
@.CurrIcon := "drivingHome";
, F9 _$ _ U: n' X9 E @.DrivingHome := true;
; E r0 D* a+ a end;
' v/ B$ ]" e$ N0 ^3 x# g1 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 s6 i$ v5 |& ?
part := @.transpOrder;
& m) f6 z0 o; x% w J" r9 i$ P8 r part.move(@);-- load part
( |( P* y7 _/ { @.CurrIcon := "load";* e' u( L$ f s! K3 b
GlobalDistObj := part.globDestination;& N: Q/ |# G( K7 b4 L, l" t9 w* V
assignLObj := rgmanager.rgAssignL;
+ \7 w( j* p- T- \ row := assignLObj.getRowNo(GlobalDistObj);2 I7 R. |% q8 d
if Row = -1 then -- since 702 ?$ L8 _1 B- Z8 z, H9 l* {
if lan=1 then
1 H% e; C3 e, q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
) {! }, p% i( g3 m+ O to_str("in der Andockstation: \"",?.~.name,"\""));; C3 g( e6 ?. m+ U, o* Q
else
5 v! a: Y# e) U0 `: B4 P7 l* D' W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, A1 y2 l3 W- k H1 K1 X
to_str("in docking station: \"",?.~.name,"\""));
; X* E7 j: l( ^; m/ k, N% k& E$ l5 ] end;
' j6 q" i9 S) S$ I" h5 ]0 Y( \" C else* Y! {9 ~9 C0 |! P
@.Destination := assignLObj[1,row];9 O- [! `) I, ~- r. h! h% I; H0 [
end; 8 q, q: ~: V2 v& Z+ ?
newDirection(@);
3 v* C! s- ^' B& {5 g @.HasOrder := true;% C6 _: l3 S4 Q7 t) r; y6 H" D
end;6 ^: r/ c* s' x; [/ L
end;% H, U5 F/ U' H6 M) O: a* ]
end; -- of the method$ [* p% `% b1 a) Z# U2 D8 ^
|