/* called by: entrance ctrl of the object 'track'9 p# T5 C8 F4 d2 h$ ]6 q+ J, g; S
*/
9 R9 {& K/ x- M$ p- n3 ?is! k( C; J5 o, A8 X) j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ C' O/ V7 Q8 S+ Z. w1 E4 Mdo( V* q/ t$ c6 M3 S4 U' W) r
Lan := rootfolder.Internal.Tools.AOLlanguage;' J9 R; ^3 k: [' e4 M
if current = @.Destination -- else return
1 g0 ~7 r2 M1 |; j) I& C3 y) _& G b then
# w1 b) T) \- E, @ H @.Destination := void;
3 _9 r; `: G7 w" _$ n* o! X( v5 ~4 c. d if @.occupied then7 ]7 w) ^3 z4 I" l; b- y. r, N
part := @.cont;+ j& |0 M2 ^. X9 u
@.transpOrder := void;
( ^7 m& k, t' g0 k* U part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: c9 J. G& z1 J/ V6 }+ s5 B
@,root.eventcontroller.simTime);5 ]( s0 f9 _) W) V. {/ C
@.HasOrder := false;1 @6 T8 A" z/ A! W% L8 Q1 a* s
@.DrivingHome := true;/ \* F9 {/ g! E. L( Y
rgManager.tryToStartTransOrder;
$ v: w6 o1 d3 G# ] if @.Destination = void, e8 Q0 k9 `9 q3 y5 _
then -- no transport order for vehicle @# e: E5 Z' C' K0 K% Y8 d
@.Destination :=+ P/ k7 R, B0 }$ c- w9 w, l: A
rgManager.nearestFreeStation(@,track.~);
& R7 E) y$ Q7 q; y( c. M/ v newDirection(@); 7 ~9 B6 I: E( H. a; N7 }2 q
if @.Destination /= void then5 H% z, l' J5 p
@.Destination.NumReservation :=1 u7 Y3 _& O4 T1 g/ E" T, I
@.Destination.NumReservation + 1;; X! w2 L4 g$ A2 O$ G$ {7 l3 @7 N
end;0 c1 j) K P& J8 c# f v
@.CurrIcon := "drivingHome";) D( {4 y5 r. j/ n, L, y0 k$ N9 u( I4 t
@.DrivingHome := true;, L( _5 L$ V5 ]- ?/ e0 V
end;
3 m: e6 H' A# ~; t else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; B+ D5 U' P, ~/ x8 Q part := @.transpOrder;
4 J0 o; x0 C' B7 b2 a4 L4 z4 _ part.move(@);-- load part
% n8 ]& e% T& n3 {, X8 q; K @.CurrIcon := "load";
' g7 v K# q) F F; M" _ GlobalDistObj := part.globDestination;1 O" S3 u$ ]& E6 a) t0 e
assignLObj := rgmanager.rgAssignL;
1 c% x c# V- x G6 [ row := assignLObj.getRowNo(GlobalDistObj);
9 c/ ^: K5 Z) A% g" Q" {# X if Row = -1 then -- since 70
9 e! x2 O$ T* p' ]$ \7 @% f if lan=1 then. i, _( X1 G# y. d: j& Z% M7 q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 A4 g7 H2 _3 A! m. E to_str("in der Andockstation: \"",?.~.name,"\""));
5 |+ \4 _" q1 z$ W: Y else
8 k8 S" F+ k3 X% J a' W promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. e4 _9 j* }8 ?0 l' {4 H {3 X
to_str("in docking station: \"",?.~.name,"\""));
' N* S. V3 u1 n. P! ~# { end;
; _0 p2 L9 ]9 v" Z0 g else
) t* I2 j7 q" t1 O @.Destination := assignLObj[1,row];% M" x& t: E- I( E/ ~7 p
end;
$ d5 v: q' P. z' u1 T" x newDirection(@);
. F; Q, K# |* Q/ s1 R9 T- s. g" a @.HasOrder := true;2 T5 o9 o5 @7 {8 [
end;
- B; h1 ?" L2 o, x$ p end;' I& G6 c- h2 e* B! e* H7 z
end; -- of the method
- P+ U. f+ f" N, q; R1 d |