/* called by: entrance ctrl of the object 'track'5 Y" d# F6 A9 q( N
*/
% C& ~. e- m0 Cis
) d- Y9 C! j# V: A& c# g part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Z% p5 R" W, {' @) G0 `$ _3 gdo
) J" h1 j9 A( I. o$ F; w7 X# L+ o Lan := rootfolder.Internal.Tools.AOLlanguage;
& G# Z5 g3 v% m5 D, C5 P ? if current = @.Destination -- else return
" Y5 v& R% Z" H, } then
5 m7 L2 K/ u' H @.Destination := void;: s, Y- e! x @/ c
if @.occupied then! ]1 W W- o2 U1 t$ ?5 K
part := @.cont;
# Y5 O( k* y9 W' ]9 D @.transpOrder := void;
; ^+ S4 ]% D0 B% K" ]' L0 {8 K' S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ E4 i) N2 d" p% H- k% T @,root.eventcontroller.simTime); W$ c5 r1 T, ~9 g2 F
@.HasOrder := false;
j( Q. Z: @ q( R- z/ f @.DrivingHome := true;
' d4 K+ m- U# I2 _ rgManager.tryToStartTransOrder;
+ u* G r- B, L6 S0 ~ if @.Destination = void( I/ m, A! Q" U% i. N: p; ?
then -- no transport order for vehicle @) v& D* {* L( e" j" t6 o& T
@.Destination :=- B* d& M/ P' z4 `$ S" J/ U
rgManager.nearestFreeStation(@,track.~);
' V+ N- n# ~3 n( N7 K; q newDirection(@); 7 r3 p; d+ J& H% S) v* j( ] _
if @.Destination /= void then
* K& {1 a5 }0 ]0 ~, I1 n @.Destination.NumReservation :=9 R; b9 B8 C4 }: n2 c, q% s
@.Destination.NumReservation + 1;
) G) A3 I2 l- O, z# l# h$ O2 j end;
, R$ f( Y# J+ e @.CurrIcon := "drivingHome";. A7 s9 x' J2 T2 }9 f
@.DrivingHome := true;3 v) X, @* H X! O6 s/ {: w% c
end;2 {, h+ C7 }7 ^' L2 g
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 u1 M/ u+ c3 G+ H4 ~% q) y/ X! l part := @.transpOrder;4 O7 ~3 x2 W' o; E. ?
part.move(@);-- load part1 |. |& |2 E( U) W4 y
@.CurrIcon := "load";
' t# t% M6 \/ `: H, Q { A7 ] GlobalDistObj := part.globDestination;
4 B$ Y+ O) X3 [8 N6 Q9 g assignLObj := rgmanager.rgAssignL;
& R4 I4 M3 |2 _ ` row := assignLObj.getRowNo(GlobalDistObj);1 w; [/ A3 {- b9 w1 i
if Row = -1 then -- since 70
$ a# {% C+ l+ {) O# y) ` if lan=1 then
3 s; j- D. J# l8 j) v7 w1 x) C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; f8 ?: d$ h5 @+ p5 V, w# X- l* y
to_str("in der Andockstation: \"",?.~.name,"\""));
- l$ b; d4 r4 \ else# Y `. C3 `; g7 D3 m' _+ Y! r
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ Q; {8 N' D8 y$ P5 ?7 u to_str("in docking station: \"",?.~.name,"\"")); ' Y" z' X) E6 ]7 a9 |; G( u5 R
end;
* H6 ?) F, Z1 ~/ V+ G9 h else. T$ S4 w# |1 } M4 g4 \( u+ j- t
@.Destination := assignLObj[1,row];7 U2 F3 S/ U. y7 z' k* w
end; : \0 ~" Q' o! q( R" i7 N
newDirection(@);" j* {4 M$ B. f7 R% ?0 l# [
@.HasOrder := true;
. ]. z. L) L, Q4 A1 Y- [ end;
* Q2 E4 R) H4 Z* L7 W$ ~1 M end;
# d8 `5 y! h$ l* cend; -- of the method, Y! u5 ?2 ~9 m( M% E0 V
|