/* called by: entrance ctrl of the object 'track', K, P# d* W8 W, w
*/
. ]5 l) r+ T4 bis+ h% I4 k5 R' M8 {) @( l, r
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( R" b2 w. ?, z$ `
do
: ?! F5 U! n! \7 g Lan := rootfolder.Internal.Tools.AOLlanguage;
) B; m( b3 x0 H, Y$ | if current = @.Destination -- else return
A2 _/ Z5 I" \! z% c6 f6 _ then
3 @9 H; a6 d* @/ |, A @.Destination := void;6 H( \% S( r3 ^3 I& B$ G. x( e
if @.occupied then9 _2 N% w0 W [" [* ]0 K* z$ i2 m. p
part := @.cont;
5 N {0 h& ?: ? @.transpOrder := void;2 x! P- U6 M ?" P: T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 c7 G, T' ?4 h8 j+ a, a& J$ O @,root.eventcontroller.simTime);7 j6 ]% t4 J8 E
@.HasOrder := false;0 Z% }" D( w0 |1 i7 v. P; I. Z
@.DrivingHome := true;
6 Y/ ^; U7 a( i rgManager.tryToStartTransOrder;0 p8 V% c* `9 o
if @.Destination = void
" Z2 b8 d" {8 T q6 G then -- no transport order for vehicle @9 y! s- ^" `# \6 \5 @: d
@.Destination :=: S: |. a5 u5 t2 z! O
rgManager.nearestFreeStation(@,track.~);: [* N w5 r( O. |6 |: Q
newDirection(@); $ i5 j4 ?3 P, |. T( @8 A
if @.Destination /= void then
. R9 ]4 ^# T/ `3 j- k; R, j7 ` @.Destination.NumReservation :=1 a/ g, _/ D6 w( `
@.Destination.NumReservation + 1;) C# X; b: D R. o# x( v& y* V3 X
end;
0 S- J8 `4 l2 c2 n6 b: w( z @.CurrIcon := "drivingHome";
: F& T/ ^6 H# r; ^# b0 l7 V @.DrivingHome := true;
3 F- E+ y8 q& J [0 G end;
5 s a- e+ z3 a3 r" x else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! b/ O& q- x$ Q1 U part := @.transpOrder;
6 {2 b$ B% ]1 n8 V9 T+ @ part.move(@);-- load part
5 L9 R$ l: r4 L @.CurrIcon := "load";
: _7 U7 @* N: h+ V9 G1 u7 s2 E7 ~ GlobalDistObj := part.globDestination;2 u. a6 H# a. H, Q, {1 l/ o
assignLObj := rgmanager.rgAssignL;
" M1 z& u: h$ ^$ G6 m G; _' K% E/ ? row := assignLObj.getRowNo(GlobalDistObj);
8 F. ]' L; t) k4 R% g4 Z8 \, V if Row = -1 then -- since 70
3 y* x. ?9 {3 j0 e4 n! k/ f if lan=1 then
4 r: M8 r4 ~1 D8 W' d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: i/ D9 D i2 l0 }- K' L
to_str("in der Andockstation: \"",?.~.name,"\""));- ?/ A1 b) m! }' n& `# b! C
else9 O- o1 o9 ]2 i4 C/ o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 B" y. i7 k. {- s# h& Q7 _
to_str("in docking station: \"",?.~.name,"\""));
6 C, x9 R1 {3 k2 M+ c1 U* Z9 Z+ _) a' w end;4 ?# \/ x* Y4 e0 C% g4 i
else
2 p9 i+ K9 L+ W4 p @.Destination := assignLObj[1,row];9 e+ h+ d, S1 U* ^, E- Z) } W
end; ; a5 @" n) F1 D
newDirection(@);
8 l, G8 |' Z& C" l: n2 M @.HasOrder := true;
2 d0 |: J, m& A' @* @! J" l' I8 j end;: ^$ \9 J0 v3 H+ q$ C3 y
end;
9 T% Y# x) i) N/ l* s7 tend; -- of the method! z8 u9 }1 r5 E R* U
|