/* called by: entrance ctrl of the object 'track'
, [4 f9 s5 k/ l7 u2 R*/. H! f" A7 V; p: f
is
" M+ d5 v6 \- q8 L4 X0 { part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 j- o7 j& `( G9 R2 ?% Fdo
1 u) I, r- \* j$ `1 x# U7 m k Lan := rootfolder.Internal.Tools.AOLlanguage;" z" a9 C. {7 F( {: }6 R3 j7 e
if current = @.Destination -- else return6 p. b' }) a: A2 U/ j h* y; o, k; {
then- w7 j4 w5 G" J$ [
@.Destination := void;; U' d) j2 X$ q) ^
if @.occupied then7 {$ ^' T( A) N% j0 R
part := @.cont;
! g9 _ n9 P2 o+ n @.transpOrder := void;* {* P5 c8 [$ n% r" g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
8 L; b" A& Z4 z @,root.eventcontroller.simTime);3 n& \! o4 ]& l1 A
@.HasOrder := false;# _* [: S) z7 e( _# `
@.DrivingHome := true;8 q! m* n9 v) l' l& M: c
rgManager.tryToStartTransOrder;( M- p7 z2 u; f, f
if @.Destination = void4 M& c& u( J& O# Z- a5 _
then -- no transport order for vehicle @
# }; j. @5 z6 a4 r" d3 { @.Destination :=
; t( L5 g- V. C0 Y4 j rgManager.nearestFreeStation(@,track.~);
; W8 z1 ^% g' M$ @: k newDirection(@); & t6 f% b" a% S+ O
if @.Destination /= void then+ O( Z9 B1 S4 l5 j% V; I3 `1 s
@.Destination.NumReservation :=
# s- g/ ^1 i7 d& c* x% p; h7 I @.Destination.NumReservation + 1;
( G1 P' s" T! e$ A# W end;
4 w0 l, L! d! ], ?& q% W, t. L0 m1 @ @.CurrIcon := "drivingHome";- g$ t& l+ |& |3 Z$ s+ S5 D
@.DrivingHome := true;
: R1 ^8 @4 p6 q! `$ M: g+ h end;
! |# @( M7 H0 y2 Z. G else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 u- ^ p5 S# o7 N: S
part := @.transpOrder;
8 G, s0 M- C5 i, k3 }/ K part.move(@);-- load part; C3 R; a# r; H8 U8 E, h
@.CurrIcon := "load";
! N( d$ c5 G* o: T GlobalDistObj := part.globDestination;8 p# m; V1 n7 p8 y0 U& s9 @# h1 {
assignLObj := rgmanager.rgAssignL;
& A6 i5 c2 w0 Q2 L: H; x: W2 W row := assignLObj.getRowNo(GlobalDistObj);
& W3 ?" F# f* ]' J if Row = -1 then -- since 70
! c# Y( `. J+ j& x if lan=1 then
A4 k2 \! C" u G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 V, A. a- \: C7 s to_str("in der Andockstation: \"",?.~.name,"\""));9 ~2 i% `/ C) u
else3 A, S, |+ V& ?- H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ p D8 x9 T9 H# e
to_str("in docking station: \"",?.~.name,"\"")); * c8 G9 }) C( @; f( R! {: X" u* Q
end;
1 N! j' {: _4 U/ I; { else
' m# R9 d, l6 W' l! ~ @.Destination := assignLObj[1,row];
5 `! ^7 i0 a2 N end;
. A: d6 C) c3 y9 a newDirection(@);
* _2 e1 Z2 X" B4 } @.HasOrder := true;# j! V8 P2 t9 M& g) o
end;
L+ e. X; g( G# N. g% x4 y" p end;( b) N% a9 z) J$ Z& H3 Z
end; -- of the method
) r% g& p/ M7 J( h; O6 H |