/* called by: entrance ctrl of the object 'track'
/ X! R& m4 R, k*/: Y+ b* |3 A. w+ w4 e& Z* |
is
9 t. ?4 K* T. h2 D% r& u part, GlobalDistObj, assignLObj:object;row,Lan:integer;
* E7 z( r' v7 \4 P: E! Hdo* C0 t6 H7 f; ?: E: `" k
Lan := rootfolder.Internal.Tools.AOLlanguage;
) g2 h0 W9 y* P4 u if current = @.Destination -- else return
+ D( n* f# }6 U0 R7 x then$ J2 G5 e% X I2 d
@.Destination := void;
* @+ X% c; m7 r8 ?5 C# G% A if @.occupied then
2 U, T6 `- |$ e: y8 S" g1 J/ v part := @.cont;
$ R% J- q7 h7 n/ H @.transpOrder := void;
# {4 Y0 J$ a( f D& m+ ~4 k7 ~% c' k/ ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,' n/ a, W$ d9 s1 G3 b u
@,root.eventcontroller.simTime);, }; T, L8 j' y% Q* O' d: E& ~/ Z
@.HasOrder := false;
; W4 V8 ]- T3 l1 I$ K8 V1 Q. @ @.DrivingHome := true;7 @# a( Q$ r3 g7 o: V% G% V
rgManager.tryToStartTransOrder;
/ d' i1 {9 @' x8 N6 o2 ]; m if @.Destination = void( I" f7 ?' S' G0 E
then -- no transport order for vehicle @1 N9 \* c- _, ~. o+ \$ @
@.Destination :=- K. t$ X. ^5 p4 ^: B% K
rgManager.nearestFreeStation(@,track.~);, k: e1 }0 k' T/ G# h1 Y
newDirection(@); 0 b, B: G- c* P
if @.Destination /= void then
D5 M/ F4 W4 V6 G" o+ q! } @.Destination.NumReservation :=
# `+ L7 V; t g, U" G @.Destination.NumReservation + 1;
3 f% _( `+ Q' b% o9 f end;
; E* H) O) Y" Y# ~, d @.CurrIcon := "drivingHome";' w* P+ p( v8 p" B: H& q! j
@.DrivingHome := true;: ]. @: A* u! G) g- _ G% r
end;
! j& A) r# T% F) { else -- the vehicle @ is empty, both vehicle and part are in the same dock station! s0 k# J( {5 v" w. G" G, Y
part := @.transpOrder;
+ ~. X" m' L$ L. c1 R part.move(@);-- load part
; }8 g: g! M+ j( b+ W! K8 [# ^ @.CurrIcon := "load";0 Z1 l" l9 t4 V+ K# R0 m
GlobalDistObj := part.globDestination;
1 ?( N( M& p, i assignLObj := rgmanager.rgAssignL;5 r, K( K: O! ?; o4 N
row := assignLObj.getRowNo(GlobalDistObj);3 R# [& v1 } q8 w, O" w
if Row = -1 then -- since 70
$ J/ v: m6 ~+ @" l) N* a! N if lan=1 then
$ N9 H. K7 r( E+ v( B1 t6 \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 S% F1 n9 `6 U to_str("in der Andockstation: \"",?.~.name,"\""));
1 K, j! c t- |9 E1 ^' x2 e, a else
8 u* ?$ n/ p! P. D/ Y0 ]- h b( f0 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
: j j& d* q1 C- S2 S, ?4 i3 g. D- \ to_str("in docking station: \"",?.~.name,"\"")); \# I, x) c0 j. ^$ E C- `2 j
end;
+ J' R1 I2 W/ }: c/ e4 W3 ~, ]) e else4 ]# I1 t: j# \
@.Destination := assignLObj[1,row];
) D3 b' h5 Y0 X* H end; 3 v! L9 {4 q0 Q- @; |9 P, v/ Q% m! c) a
newDirection(@);& q; X, M5 T0 J4 T% @* v; O3 T, L6 @
@.HasOrder := true;
! A7 K5 M& v4 f! u+ E; s5 o. X end;
- y7 b5 q1 s; j( d: G; V9 x end;* ^# l- Q3 d+ u, C0 }6 S! C
end; -- of the method
, I- l5 r9 V" U" Q! H( @+ C$ V1 V |