/* called by: entrance ctrl of the object 'track'6 E) B4 N# @+ p/ A5 C( U' q
*/- q; t1 p6 a& }7 k* Y# l: J Z0 X
is- s% o. w% S4 ]
part, GlobalDistObj, assignLObj:object;row,Lan:integer;' q. s( B1 Z( r, R$ Y
do
+ H# ]* y/ L" V! }8 v1 E Lan := rootfolder.Internal.Tools.AOLlanguage;' \* E5 q! E; o- r+ @
if current = @.Destination -- else return
0 _' x( J5 p0 y7 d then: ]& J, T X) L5 @
@.Destination := void;7 r" \3 r, Q8 q) f
if @.occupied then& U5 N/ z! h" y' r8 P6 T; @
part := @.cont;
% S" s; C+ S* }( P# S v7 Y @.transpOrder := void;0 M- p+ M2 g: K) C1 p" N0 A
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( _# A. a( P- E# X! ~ @,root.eventcontroller.simTime);0 E3 d7 F8 E& N; _7 w
@.HasOrder := false;$ B2 W9 z( k \. {
@.DrivingHome := true;. p% x& T0 h _0 Z Z
rgManager.tryToStartTransOrder;" \& W {7 L" O1 n& T
if @.Destination = void8 a' ]( |" [" o0 X4 ^+ k5 Q
then -- no transport order for vehicle @; q, H0 x( ?. [; ?6 `" Z3 C
@.Destination :=
9 n, F w( ~0 u. b5 f' _- W rgManager.nearestFreeStation(@,track.~);
! s0 q) g" H3 H) H% L8 ] newDirection(@);
5 ^4 R4 D& I5 L! S4 { if @.Destination /= void then, `. ?+ h3 s% o9 {6 T1 U: ^
@.Destination.NumReservation :=0 P1 _5 }, f8 z# Y! ?. t
@.Destination.NumReservation + 1;
, Y8 i6 `* Q8 T" G1 V* }2 F3 i end;3 d1 D4 I( ?1 E$ q) X% K% _
@.CurrIcon := "drivingHome";$ l' Z5 U: }* ]0 G- y9 c1 `4 r
@.DrivingHome := true;
% g5 v0 |0 W2 s end;
H, {% W- E+ H2 ]3 B' O' H1 @8 N else -- the vehicle @ is empty, both vehicle and part are in the same dock station
! d/ E$ P9 f! R, q part := @.transpOrder;
$ a( w8 |1 A8 ]6 G part.move(@);-- load part
" S/ m( ~- e- L) W( k5 ?' ~4 \ @.CurrIcon := "load";& B+ S h. i; h3 N
GlobalDistObj := part.globDestination;0 O7 z" {/ _) V, k$ R6 }
assignLObj := rgmanager.rgAssignL;* N$ K5 t) ^$ e' ?& ?
row := assignLObj.getRowNo(GlobalDistObj);
( V! R4 w ~* G5 i8 X5 k5 {' M if Row = -1 then -- since 703 @( Q$ s3 b8 _, s6 y0 f1 e! H8 V
if lan=1 then, O# ]0 ~' o2 @! y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' }0 M6 D- k" l# y
to_str("in der Andockstation: \"",?.~.name,"\""));7 S: T9 t9 l. z6 [$ e7 S
else
/ m: s( R( |0 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: X- C# F6 ^ y% C9 F8 R
to_str("in docking station: \"",?.~.name,"\""));
! Y% u0 v6 h2 p+ V3 q9 V end;
4 r1 q; C6 R8 [! ]% f7 D else
2 Q/ A' {) `4 c. O O5 e @.Destination := assignLObj[1,row];, T( D- N0 X$ Z3 a i$ A- L5 I) M
end; * W n' k5 R9 z, O, p- q/ _
newDirection(@);
' v: j0 S! x1 f; `( a1 N6 q2 R @.HasOrder := true;
1 R2 p! v: e, ?: N9 A9 R end;1 \7 j' K' T" S. _/ K8 p* |
end;8 |/ u$ j b* _8 \$ N, @5 ^7 Z
end; -- of the method6 w% R( Q$ E$ g1 ^5 J4 }2 x
|