/* called by: entrance ctrl of the object 'track': w: p& ~% z. \7 q& p6 B: h" M9 Y
*/" n- j8 {' J1 j D+ n6 o& o, Z
is; d+ ?, `" N/ m+ Z0 x, q7 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; I) [! L& {. y5 p3 }
do1 B! G2 ~2 H5 s; F
Lan := rootfolder.Internal.Tools.AOLlanguage;; i* K3 m1 Z9 e* U
if current = @.Destination -- else return
) e6 D; Q' P) N* O& V, e( e then3 W1 w3 t6 P N/ i2 c" k4 s) N
@.Destination := void;
) ^/ V( d# Q+ p6 K if @.occupied then5 h$ J# o$ {( Q- {; |$ B
part := @.cont;
3 F: T* ?; B5 \2 F6 \& b @.transpOrder := void;4 \3 j4 X/ [! `* }+ X( e% y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" O# F! z& m' a @,root.eventcontroller.simTime);7 _! Y6 N* B# _( i! w% q* q
@.HasOrder := false;8 K3 V2 D) E. Z0 Y1 Q
@.DrivingHome := true;- C. y: ~' {9 F# Y+ |. W
rgManager.tryToStartTransOrder;# }2 d2 R4 x! c% Z, B/ T0 t
if @.Destination = void$ a- Y j# l$ x h) S
then -- no transport order for vehicle @
8 D% I8 i, e6 k% R0 Q @.Destination :=
" L& e7 G; m' D rgManager.nearestFreeStation(@,track.~);
1 K8 h9 H# k* Q4 [7 P newDirection(@);
9 S/ E$ x; f' ~( ~ if @.Destination /= void then
3 S* O, C# p1 ~- H @.Destination.NumReservation :=
" p8 ]. F- B/ G, f f3 L @.Destination.NumReservation + 1;
" j3 W' g4 j, _; h, T5 N j end;
0 D9 }* U& n/ T0 g; h' U) g: N @.CurrIcon := "drivingHome";
- O/ _1 O* N: J; L% m* {, H @.DrivingHome := true;
) ]3 f* B' }7 X* Z5 _5 a+ ^1 | end;
( j2 g @& y1 t+ e+ F+ K! o3 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station" J! W' X d; N4 Z1 c3 E6 D0 `
part := @.transpOrder;
5 m- r6 q/ T' z part.move(@);-- load part
7 q& T6 A0 Z7 H; g/ v+ U9 H: V @.CurrIcon := "load";6 j* Q S$ e, r3 c
GlobalDistObj := part.globDestination;3 Q0 @4 x( G1 w% B! A. _- u
assignLObj := rgmanager.rgAssignL;, M8 x1 @3 E' {& c L7 d" o
row := assignLObj.getRowNo(GlobalDistObj);
5 }$ D/ [( [( B3 Q; s+ U- m" ^ if Row = -1 then -- since 70* k$ A: z z8 @, f
if lan=1 then- W$ m2 O1 f4 V, V; j9 ^" g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
E8 c3 H' N. ` to_str("in der Andockstation: \"",?.~.name,"\""));' I8 C) u, g; D( X, F9 W( p4 _2 l
else
+ |5 z7 q n/ D. g# \0 D: f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, \2 w G) m" _# C' s0 h to_str("in docking station: \"",?.~.name,"\"")); ( F4 X, O. N5 Z/ f, J
end;0 W* z8 g" h9 T: B6 c) x
else7 k6 u A0 b/ x# O
@.Destination := assignLObj[1,row];
3 I j) ]1 {6 C" v( G7 M8 q end;
3 R2 P) b) m; y; \- z4 ] newDirection(@);
; W; E* O2 P9 z" z; P' p/ Z3 N @.HasOrder := true;! O$ e! Y- e% G* \: J
end;3 V- }1 E7 t' {4 \1 I( n d7 ^9 P
end;
1 c3 {! h8 ?, j$ rend; -- of the method
7 n, \) `! h8 m' X" ]* ~ |