/* called by: entrance ctrl of the object 'track'1 ~! n6 k( |! c" R. s) a
*/
- \% A# m9 Z: [; T4 H+ F; Q8 K. Pis0 y( }# g( s& e9 Q, X
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ p6 r% {" {+ q% Q4 k" d
do2 I! P$ G5 ?, C3 a0 I5 W
Lan := rootfolder.Internal.Tools.AOLlanguage;
2 N, A# Y/ {3 F' r if current = @.Destination -- else return
5 w2 ?% z2 t7 j1 y$ P; ? then* m, _2 g3 M: T9 Z
@.Destination := void;
+ l$ o2 V' a! q7 g1 I1 { o if @.occupied then7 J9 Q' i# D2 q: P b% @
part := @.cont;( W$ L+ ?. d; t
@.transpOrder := void;- F; S3 @, z% z. z, f5 B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,6 j' I2 Q0 } x' P; Q, P" d4 E
@,root.eventcontroller.simTime);2 J `( Y$ [9 w" h$ _3 a. \
@.HasOrder := false;1 r5 Q/ H# M# e
@.DrivingHome := true;. q! h. u5 |- L, b$ |' h( T
rgManager.tryToStartTransOrder;
% E% g3 z: l) f8 e( t if @.Destination = void
; ]) J- b8 j$ R' F% l5 h! K% P then -- no transport order for vehicle @; s- D3 ?8 z7 N. c' N1 V+ X- w& y
@.Destination :=7 c0 W x4 p* m5 P/ b5 g4 S. H
rgManager.nearestFreeStation(@,track.~);
0 ]( B- J* u: |* ? newDirection(@); . {# g8 O) {5 m* o0 k7 w" h5 @. _% v
if @.Destination /= void then! i: Z& Z0 I9 x; Q/ e% O' V6 ^
@.Destination.NumReservation :=* T7 ~# p& P5 _
@.Destination.NumReservation + 1;6 z5 `) F4 n7 ~) }5 V
end;
, I5 r% F7 o4 d- z9 Q) _/ W5 x7 r @.CurrIcon := "drivingHome";+ ]" C" Z, C2 r' r! L3 L
@.DrivingHome := true;
) i! T5 M1 I: J/ F, ~$ c end;$ O$ j z( [3 B0 E; O7 f1 Q, l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 P' e" [9 G, G( h1 l part := @.transpOrder;
2 Q4 @' L% j- n7 W' L part.move(@);-- load part9 d+ c" b9 |/ E0 \/ X7 F4 \
@.CurrIcon := "load";
0 \" h1 P- Q, X0 `2 B8 U GlobalDistObj := part.globDestination;; A( F0 w3 J3 J* C- `' O( ?
assignLObj := rgmanager.rgAssignL;
% J% D$ P# b, n2 ^: k row := assignLObj.getRowNo(GlobalDistObj);) m, z8 K9 z+ o/ v
if Row = -1 then -- since 70. L6 i* F" n; X+ {2 Y
if lan=1 then
: N; t6 |8 }% G, T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# `5 q2 D- D* i$ f3 T! w to_str("in der Andockstation: \"",?.~.name,"\""));. V5 p9 C9 ]3 E/ i- u
else# x& q2 k) q @/ k$ I' f3 i! @& b' f
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' c1 [! K' ^& E to_str("in docking station: \"",?.~.name,"\""));
, i( @( N* h% T9 H" z! Y7 W end;( O) ~; s2 a ` e: a7 ?; l
else& \/ b4 U) i- \$ l7 o: v
@.Destination := assignLObj[1,row];( v+ {9 r5 T/ w2 Y
end;
- }, q* O6 j, p6 S, H newDirection(@);
2 E' X; A4 C) B1 q$ x2 L( \+ b @.HasOrder := true;' C9 D _& p- M! f& `
end;
# a1 y) ]) Y J6 b& Q- ` end;
# ^. ]; @) v" M) F* T- a% a1 iend; -- of the method9 a: R. j R% h5 o$ h
|