/* called by: entrance ctrl of the object 'track'
. g6 z: v8 U+ v$ c3 i*/, W" A# A+ T. N% k+ m! J% e
is/ v' }8 c+ l6 G$ ]4 I
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# K5 y7 P6 F, sdo
* [" V! f. k: q: \6 D Lan := rootfolder.Internal.Tools.AOLlanguage;. r* m q" R9 f3 t; C4 C
if current = @.Destination -- else return
- M0 b d1 @( |% z2 J/ L2 h- a then3 b8 K. u1 ^3 a5 v, }* {
@.Destination := void;
( z' \ y3 {/ e0 [ if @.occupied then
# w7 Z+ m4 `2 w) V3 U$ x4 A part := @.cont;
1 \3 w0 I+ B7 G) a @.transpOrder := void;
3 K* W. Q( i& I% r1 G part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
?; \+ ]& ?* G' |5 V @,root.eventcontroller.simTime);
( X- b; v$ n+ K/ j @.HasOrder := false;5 Q2 E" J( C* L
@.DrivingHome := true;7 `! s8 S, W& K f! U F( I6 \( `
rgManager.tryToStartTransOrder;
+ t6 ?1 b' A; |7 q if @.Destination = void
+ a- ?2 n, \2 X then -- no transport order for vehicle @
* O: ^5 h2 u7 n8 O% A: @' }! x p @.Destination :=
! N8 ^7 g) u# T" Z rgManager.nearestFreeStation(@,track.~);
9 D6 x$ a( b/ ^, A; T6 f" H newDirection(@); ( ], c. ]- P. ~8 e( W
if @.Destination /= void then6 q. X$ p3 i. s3 M5 w9 h
@.Destination.NumReservation :=
6 E' M/ Y$ G$ K, t) j @.Destination.NumReservation + 1;$ D: K0 d- n" Y! p, w9 L9 N, e
end;
! k/ U& c2 P, o- F7 _ @.CurrIcon := "drivingHome";% j+ t$ W' W, x1 g! H
@.DrivingHome := true;
" D% J9 Q* f% I3 W& T( Q end;
/ ~! N' c" |+ K* K h8 E4 Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
' ^5 a/ k- |! d, s% G' N part := @.transpOrder;8 `( C0 A' R h5 X4 I1 a% k
part.move(@);-- load part$ ?1 T7 {! z9 O
@.CurrIcon := "load";
+ w' n* D0 P! J# q, s0 ? GlobalDistObj := part.globDestination;& U; h M4 P0 V' z8 y
assignLObj := rgmanager.rgAssignL;
4 t3 j+ v; B2 Q* W row := assignLObj.getRowNo(GlobalDistObj);
) o4 O- |1 h2 x4 |2 Z; X" ?7 [ if Row = -1 then -- since 70
z2 i* {" _, H1 g: I if lan=1 then
% R% ], Q8 {5 k4 H/ `0 N4 } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 z$ c9 ^3 @+ R3 y to_str("in der Andockstation: \"",?.~.name,"\""));
7 L( [2 E+ K$ M0 K2 F, d else% g( `/ ~# J8 _& ~6 ^6 _ s7 i
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# j3 l! S1 L& t0 ~4 y/ S9 D. g( H
to_str("in docking station: \"",?.~.name,"\"")); , w8 J+ ]$ e1 K+ h& e, m
end;
2 b! _, E; ~# j! M, U else3 B, @4 L! {# t) @8 g3 R
@.Destination := assignLObj[1,row];
' Z' ^, S- f+ o1 \ end;
7 ~1 A% [1 H/ [) N, i, N newDirection(@);4 g0 h( q, J7 B9 C7 ^3 l2 }0 m
@.HasOrder := true;
" R0 P4 y j2 W B$ E end;
% q( s9 {4 d) J8 z4 F4 H$ u4 y end;
9 M b; ~; ?' Y/ d5 P( ], ^- W/ f6 U: Iend; -- of the method0 G c" ]7 W+ _
|