/* called by: entrance ctrl of the object 'track'; o; s, k# V) b1 d' U S3 E
*/& e1 T3 r4 x0 i G6 M" a5 i. s% a
is
- ~2 I: ~* F# O3 H d4 ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;( _; C9 n- K$ T- r! v
do! U9 _+ G8 A3 k1 E2 z/ u9 R
Lan := rootfolder.Internal.Tools.AOLlanguage;+ r1 H) r+ I8 J% X( v8 i0 ? A
if current = @.Destination -- else return, `8 S5 v! S) u, I+ w, h! X" }
then) t2 ~; n: f) y2 p _
@.Destination := void;% K7 f }! w' r% a2 X9 V+ ^7 v
if @.occupied then
% f( T' w, f. N part := @.cont;# z2 V2 d4 {* |+ m
@.transpOrder := void;
$ i8 B1 l& F8 ~ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 T- C7 U* B4 j! m$ |
@,root.eventcontroller.simTime);/ b- C Y( N0 N- p: x- v6 U
@.HasOrder := false;
/ R$ M6 R. R" d @.DrivingHome := true;% \ ~ G1 z1 m3 H. Z- V, y1 k
rgManager.tryToStartTransOrder;
* C3 } b6 }) F if @.Destination = void, I i9 a. ~ m9 _) b
then -- no transport order for vehicle @0 l8 i4 f4 @3 l8 P9 T' b9 d; {
@.Destination :=0 }+ ^0 D+ b D9 r7 X
rgManager.nearestFreeStation(@,track.~);
- Z0 [6 _* n; q4 l newDirection(@); & } s. h& o' s
if @.Destination /= void then
1 F$ O+ r, f; P( H4 X @.Destination.NumReservation :=( n6 _( ^6 C# y, l7 I
@.Destination.NumReservation + 1;' l$ e: S% Y# }! H
end;+ m) }( e# r/ ?% e
@.CurrIcon := "drivingHome";* n# T2 r3 _) {+ q6 S
@.DrivingHome := true;# |, Z+ C d' B7 J$ N
end;
( ~7 P; M' `4 |" r: x/ U7 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 D! U* c. u( z* S( _- {9 ^
part := @.transpOrder;. P. l ~$ k+ L
part.move(@);-- load part
( W I1 ^7 R! y3 ~" x% v; e( y @.CurrIcon := "load";
# a5 M, u! `$ d$ q4 X! D6 u1 ` GlobalDistObj := part.globDestination;
9 D1 B1 i4 F4 z- r: h, q assignLObj := rgmanager.rgAssignL;
: m) K$ E& G+ D1 d$ ^ row := assignLObj.getRowNo(GlobalDistObj);
8 `9 n/ Y; a/ B( j1 g if Row = -1 then -- since 702 x" F) b+ i5 C/ d
if lan=1 then
! x( s* [( o9 N+ R" z1 ] promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. r* a8 B/ j5 S4 r k7 _3 V2 r" V to_str("in der Andockstation: \"",?.~.name,"\""));" ~/ C' R2 h* a
else3 |- s9 N6 L! F0 N6 j P
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& l" o+ c. m6 y8 |8 S2 N' A, G) I
to_str("in docking station: \"",?.~.name,"\""));
# `* a8 t* P1 y3 N. l end;# `$ h# j, J1 j9 `0 U
else
- F# r; V9 F0 w1 e) q5 s6 \* y @.Destination := assignLObj[1,row];# [: a, _) q3 |. `7 u" l4 x1 t; E1 O5 L
end; ; V; B% A3 r9 _$ t0 g9 R: l
newDirection(@);7 ?, b( P/ t+ F- g9 }) o1 H
@.HasOrder := true;- J0 W2 @0 Z0 B7 u: I
end;
' _& a d4 p1 I2 ~ end;2 I: e, n7 {7 U7 x/ u
end; -- of the method2 U q' p- }( [1 L$ {
|