/* called by: entrance ctrl of the object 'track'
$ X% B0 W8 s5 a+ {*/
8 V2 I# K8 B3 k4 `7 Sis! y0 c8 }0 A- H* t; R2 n, j1 s: p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 g( C1 ~7 A+ Y4 T9 [
do8 I# s* e I. N; R+ }- a& y9 i
Lan := rootfolder.Internal.Tools.AOLlanguage;! n$ Y- ^) G- T) N2 j, M
if current = @.Destination -- else return
2 l7 \+ w+ C$ Y! ^ then/ ]( t/ S8 K2 v6 C
@.Destination := void;
' M4 j$ K* R% M9 o if @.occupied then- e b" X: e7 z+ O m+ d" j- Q. V3 H
part := @.cont;
9 I/ i3 W. A* `; |5 k @.transpOrder := void;% U! @" F p4 }2 q8 B+ {4 k$ T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 o: w% p) S8 p' p1 Q5 Y2 }0 V @,root.eventcontroller.simTime);
. b( w& G& \3 b4 f; ^1 h4 |* v2 u @.HasOrder := false;
2 U K+ _$ V0 K, c" V @.DrivingHome := true;- T' O5 f* z9 d: ` ?& `
rgManager.tryToStartTransOrder;
0 n: J/ c4 D! e, q$ n; F7 u# T if @.Destination = void
# l3 K A! @: c+ e6 H3 {+ C( a then -- no transport order for vehicle @9 X: c5 m& ^. K3 L' e k
@.Destination :=
6 q/ w2 |7 V- f6 v3 H4 ^ rgManager.nearestFreeStation(@,track.~);" c- Z- |/ [1 \
newDirection(@); 2 j' K* |' t+ k
if @.Destination /= void then: ?$ z4 a( D5 B" O$ v q
@.Destination.NumReservation :=
- U# ?! ]6 s8 q+ Z3 u k @.Destination.NumReservation + 1;
! z& [3 n0 E* s: @' y$ ^9 ] end;
4 D9 N. ^' D8 N: U3 c0 t @.CurrIcon := "drivingHome";
8 M2 {2 }/ Y# w5 A1 j U8 c @.DrivingHome := true;
/ @% h1 ]0 f+ _" O4 @6 f end;
7 s" T: y; {% l$ u3 A" Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 g" x# N$ m7 m; O9 ]' g part := @.transpOrder;( D' j4 J6 g6 ?7 P' ]
part.move(@);-- load part
) s4 E- E2 f1 ~; O. L$ N! T @.CurrIcon := "load";
/ e8 P. w1 W# z9 \ GlobalDistObj := part.globDestination;2 T- M1 X! \ @) T4 ~
assignLObj := rgmanager.rgAssignL;0 f5 R9 `# g# q2 N! u# s8 Y
row := assignLObj.getRowNo(GlobalDistObj);
- O% q5 B, n# \3 b) L; e: ]0 X8 k if Row = -1 then -- since 70
$ K9 \1 c: m- O$ {6 j" H if lan=1 then4 y {# U' Q ?. d' A3 m
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: {0 D# i4 L; b
to_str("in der Andockstation: \"",?.~.name,"\""));4 v/ Y( y9 P% N7 v
else; k, U9 W3 P; v/ U9 v- r% Y6 U7 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 n1 K8 `+ J/ w, r. _+ l+ D2 j to_str("in docking station: \"",?.~.name,"\""));
- c! {! B. ^- b/ X% {9 ^1 ^: C end;5 Q5 h2 a* ~; Z# d
else6 M3 N/ h2 _* r( _/ ~6 I# u4 `, D
@.Destination := assignLObj[1,row];
. V3 T; I2 k- m \% G end;
' `$ i4 j3 `6 f# Z) W+ p! T newDirection(@);! I. i( q: Y4 ?' F
@.HasOrder := true;
& X7 ]* X" N+ |5 k9 v& m( R end;: @6 k- ^ I7 n9 c( g7 _
end;
' S( d- o8 k, _+ Q, ?end; -- of the method
" y6 a, ~. k/ D) ~4 x$ g" s* s |