/* called by: entrance ctrl of the object 'track'0 }6 @# w6 u; B. z! ^. d* m- t3 U1 h3 D
*/
- }( g" R! h/ c. o. M( ~$ [. Z9 S: P! ois
( G% E1 D# G, P5 L) X' O part, GlobalDistObj, assignLObj:object;row,Lan:integer;. J' I# `" K6 V. W6 m$ _ n
do
! @$ r! q6 k: Y* z' j. m$ r2 O6 X Lan := rootfolder.Internal.Tools.AOLlanguage;
8 a% E9 K3 ]* @9 E" Q- N/ j$ G if current = @.Destination -- else return5 i& M# e' }+ T5 H
then
+ r0 T6 A: C; R Y4 W2 C @.Destination := void;
) i) a0 p) k* a( Y6 U ] if @.occupied then
. w- n. w: U: D$ i) b# X part := @.cont;
( Z- t2 u3 R3 u2 l5 m- f5 ]' W @.transpOrder := void;- c, J& B# ?/ p8 j# n; E9 ?
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& ~& Z1 m( k+ a% |: T
@,root.eventcontroller.simTime);
% {3 L1 H' v- R5 n9 n h q, k+ W @.HasOrder := false;; D: i6 I5 {0 A3 N2 q0 \
@.DrivingHome := true;! g* {% e4 M1 {
rgManager.tryToStartTransOrder;
" W' k; Z4 m0 W4 m Y if @.Destination = void2 @+ e4 B/ M3 v9 k
then -- no transport order for vehicle @ N: d8 `: C E/ r, W
@.Destination :=' l* K, B0 x% Y' G o
rgManager.nearestFreeStation(@,track.~);
- r9 B; L$ o4 { newDirection(@);
) G' U; x- a% t; m# l G if @.Destination /= void then
0 f1 j9 F/ K5 @. j" T2 o @.Destination.NumReservation :=$ c& }. T8 |' R1 @" `
@.Destination.NumReservation + 1; o: Z2 |( u$ u' o: H- k
end;
; m; `. {4 x* A @.CurrIcon := "drivingHome";
8 N9 ]0 Y8 @+ ?/ Q, Y, r! O7 T( P/ n' W @.DrivingHome := true;
/ ]& F: Y% G. W* w8 g, \ O7 E8 M$ { end;
' P0 [% d, M' ~3 x/ l; i( ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station! k$ Q3 f+ n0 n2 A e
part := @.transpOrder;
# F# {( A7 U8 M4 T. \9 |' g0 a, G part.move(@);-- load part
0 H. f: J3 \% h2 Y# X @.CurrIcon := "load";; O/ m1 L; v" N# }5 p2 t' c+ f! ^& U
GlobalDistObj := part.globDestination;: i/ z4 y! i7 U' f
assignLObj := rgmanager.rgAssignL;& [: }* Q) U/ c9 V# A* x4 Q8 H
row := assignLObj.getRowNo(GlobalDistObj);
. w& K% W/ P/ l8 m' o: p* O! i if Row = -1 then -- since 702 z3 }* @! D) c: c& m r
if lan=1 then! x' P4 P- w" O; @4 P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% G5 B- @1 h t, z to_str("in der Andockstation: \"",?.~.name,"\""));" e( h3 J7 C6 D9 l7 i( `
else2 _" f7 B# x5 B5 M) ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: h, g% ?' m. [1 v5 K/ f
to_str("in docking station: \"",?.~.name,"\""));
, T- r6 K. G7 Q0 a# q1 I- `$ D, x end;* ?, m# [. t- V6 m% n- Z2 F- S
else
- w$ B4 B8 i( G* F @.Destination := assignLObj[1,row];- Q. e+ b/ i4 `2 |- v3 T
end;
) K9 Q+ X4 D% x1 u3 c- Z0 q, N newDirection(@);& E+ J" q# I4 f7 J7 W7 N% c
@.HasOrder := true;5 n2 B; ]! T9 C! E l/ v
end;
% p1 `$ R; P% t' Z9 N% D end;
* r' U& u+ b9 w4 Cend; -- of the method8 q9 p3 u7 E" S3 v/ D6 p
|