/* called by: entrance ctrl of the object 'track'
3 g: M( O; j: J, j: b& G* O*/
% c% z, n. p1 b" k& M7 c9 Y1 i- `is# z/ J! f4 S$ v; o6 a: v6 {9 n& f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( Z4 l) T! x! w, N. Cdo
1 O# L1 Q% p( V) z# I" u b Lan := rootfolder.Internal.Tools.AOLlanguage;
* M4 R, C, J- C if current = @.Destination -- else return
( ]$ @9 J' {5 L" Z5 E then
* m, n( @" }2 G @.Destination := void;' V4 J) o9 r1 |1 N n# W4 y/ u' {
if @.occupied then
% [, C+ Z- Q, {3 f. W& X3 \% C part := @.cont;
5 k, V! J: g+ m, e3 @( o$ F @.transpOrder := void;" k3 [8 O: G6 a* ^) |- D' n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) h1 T" c' J8 H
@,root.eventcontroller.simTime);
2 j$ a R/ Y8 z5 j$ o" s- i9 V @.HasOrder := false;
k T% ?5 ~1 D# ^5 Z N @.DrivingHome := true;
2 K) w+ W1 k2 o0 ], p rgManager.tryToStartTransOrder;
0 p4 q% g1 k# m! M% f& l if @.Destination = void" \& W9 ]: p6 i, H
then -- no transport order for vehicle @( u( D+ [; m" [9 Q3 n
@.Destination :=" \0 E# H5 J1 X; x* n% j' h* |
rgManager.nearestFreeStation(@,track.~);4 v' a9 i+ y& x. Q& v, T; ^' W- K
newDirection(@); $ v9 u* l+ m: e, o2 j7 o7 j
if @.Destination /= void then
/ `3 Q8 g- t; s @.Destination.NumReservation :=
t+ |. ]1 J: n3 q5 l7 T/ I2 v& W$ X @.Destination.NumReservation + 1;# b( q+ ~) A% B2 a% H& q
end;
- }7 G; S) ~3 h Z0 g& d7 z) f7 C @.CurrIcon := "drivingHome";
2 C$ d3 \( F+ g0 ]2 S @.DrivingHome := true;! F- A+ ~$ h* ?* }9 @5 P
end;
+ F8 n6 j' }- s/ }8 c! k1 \ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. l6 q( x4 g1 D3 h; q part := @.transpOrder;
. O4 r: K- Q0 n* g- J part.move(@);-- load part) v4 u$ ^3 h/ s& k# }0 Q; n4 o
@.CurrIcon := "load";
1 h( r. z, f" \ GlobalDistObj := part.globDestination;2 i; Z) K( M$ s( T9 `! H$ V
assignLObj := rgmanager.rgAssignL;* C* T! P# C9 U6 A) L) ~$ m
row := assignLObj.getRowNo(GlobalDistObj);
/ E: m/ R* N# q9 j$ S9 s/ S if Row = -1 then -- since 70
+ K" C, x6 ~# M- e4 F6 j) B. A% `5 i if lan=1 then" ~6 y' y0 q8 y% }% g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. W# v. q* t O$ I to_str("in der Andockstation: \"",?.~.name,"\""));
2 i, f6 S0 n; {0 a8 G& K8 X else. y$ E! n8 h9 Z) `+ l( f0 q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 q/ z) l+ g) |& p1 ? to_str("in docking station: \"",?.~.name,"\""));
I" K( g: ~4 O3 H1 D. t8 W end;
' b7 m, S/ z; a else
0 W# u- H5 o. b+ t0 E9 F3 C2 x+ | @.Destination := assignLObj[1,row];
) M/ x! r$ ~3 f2 H. m1 L end; . m9 u6 s- O |* i5 A
newDirection(@);
" r3 b* E0 W9 ^2 j& g% y Y, ~ @.HasOrder := true;
1 |( d1 b7 H% v* h& d end;1 K9 N* {4 D5 p: u! D
end;$ V6 o" s0 y5 e- ^8 B' M- D
end; -- of the method) R( n& z8 l, E% v; [
|