/* called by: entrance ctrl of the object 'track'
: a% B# X$ [" y* o*/( u9 J9 k- e9 J6 {( l
is0 P, Y4 Y. O' e/ n2 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ Z. M( T/ O( i
do
7 H% h3 ^$ V4 u) E Lan := rootfolder.Internal.Tools.AOLlanguage;
. M: M! S P+ h# E v% u if current = @.Destination -- else return+ c( K' E' `+ c. c8 Y* i6 J
then) g" q2 f4 J& k# C, j
@.Destination := void;
8 ?5 O( ^. r4 Q- K5 f/ o if @.occupied then
% s' e5 E; A, p9 _( o part := @.cont;
3 d* l; S7 X% I( I+ K2 S$ ^6 n @.transpOrder := void;
9 ~+ ^( Y6 N' X# O$ @- ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' I' ~. a6 K& \/ O. H7 U& _
@,root.eventcontroller.simTime);6 M+ g9 ~9 D6 c% m( M
@.HasOrder := false;0 C( d" u$ y. k
@.DrivingHome := true;" P' A) t, `! S
rgManager.tryToStartTransOrder;
2 D1 c! N/ t/ s if @.Destination = void+ b; n) V- [6 q$ \+ \3 H
then -- no transport order for vehicle @
# g6 e6 p* v- k% L* N& F" J% P @.Destination :=
6 {7 W4 s' w) ~2 }4 v6 T rgManager.nearestFreeStation(@,track.~);
' J, [. J( _& k' m/ g4 Q newDirection(@);
- u; r0 Z2 b2 B if @.Destination /= void then0 A# i5 {. t4 Y; M3 s/ P* k* ?
@.Destination.NumReservation :=0 k' ~; n$ R- o7 K& g4 D
@.Destination.NumReservation + 1;* k Y3 U$ R2 z3 q8 D+ g/ t& @/ m
end;
8 n- r) \3 Y3 e# E" J4 d @.CurrIcon := "drivingHome";/ f) @6 o3 B0 e8 c3 ^) C% \
@.DrivingHome := true;$ F8 D- I% v/ s D0 P: @) a+ B
end; R6 v0 g6 p1 ?1 Y6 {' J0 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ @& C, l5 Q2 J part := @.transpOrder;
9 x# _2 Z5 j8 f x% s1 E part.move(@);-- load part3 s' ]( N$ i, @0 q4 z/ O l
@.CurrIcon := "load";
1 l+ \/ @" f" `+ Z% Y/ R GlobalDistObj := part.globDestination;4 A0 r, U- `: p+ ~' ?5 I* O
assignLObj := rgmanager.rgAssignL;
! Z( k! b8 c( ^! I% A0 K row := assignLObj.getRowNo(GlobalDistObj);4 B1 q: W. F/ J4 X* o- K1 n
if Row = -1 then -- since 70
+ z! x+ S6 ^" S) ~ if lan=1 then) f+ Z+ S6 Q7 r2 @2 O
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," O5 i( ]6 Q8 ^. P- w4 L t/ s% ~
to_str("in der Andockstation: \"",?.~.name,"\""));& D# v1 b; \) f1 W! B
else$ }* e% ?3 R' d0 F2 P/ v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* g; B. a, C" T# M+ p* M to_str("in docking station: \"",?.~.name,"\""));
* v, J8 w0 V0 @; a$ p9 y l' W end;% h* s' w8 z4 H1 I0 _" s+ c* Q2 l( Q
else) f5 T a% G j5 A
@.Destination := assignLObj[1,row];8 G0 R9 r7 E6 ~$ t. @0 _
end; 7 _) a0 J' K" U
newDirection(@); H2 Y& K+ V( P3 U; ^ s( [
@.HasOrder := true;' h8 W+ L4 M J" i5 j
end;
0 f5 v) ]9 o. k( c- S* T/ T end;
& ~( n5 a5 s- L* fend; -- of the method
3 s3 x' Y) M) t+ ~1 G9 [ |