/* called by: entrance ctrl of the object 'track'
) Z) c% B: i. }$ `* O E' X% z3 d. P*/4 c; d* ^' |. t8 \! f4 r6 X/ Q
is
0 k1 O/ \7 Z. G) [7 x1 P3 U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 D% d$ Z% Q: _, n2 Q$ edo. y4 j8 I% a% y& o) P( A
Lan := rootfolder.Internal.Tools.AOLlanguage;9 i% l! y) B' G- E' J3 D6 V
if current = @.Destination -- else return
4 `4 _( _! X/ R0 Y; } then
- o4 b$ P& S9 A# R3 b @.Destination := void;
e4 Q1 a# d4 [& Q1 X0 u+ T if @.occupied then
) ]6 b: ?! ^. G, M* \6 h2 p& ` part := @.cont;% D) n5 v- p4 K0 @. n: n
@.transpOrder := void; u) u+ R0 Y2 |7 b0 Y7 w6 S5 f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 c6 I5 x/ u0 h( W @,root.eventcontroller.simTime);$ c" Z: K* }, @7 ~' L+ ?
@.HasOrder := false;
/ i* S$ |# `' u, T @.DrivingHome := true;
X) W3 P0 m4 E% o8 N rgManager.tryToStartTransOrder;" G0 A1 |& h0 g$ H! y/ [# A
if @.Destination = void
/ |4 ?) H9 C3 Y( `# ]4 Q/ G then -- no transport order for vehicle @
; n, [+ j* r# q5 F) { @.Destination :=" S, W+ ~% h. y9 H
rgManager.nearestFreeStation(@,track.~);0 }- {% t' \0 b
newDirection(@); 3 T+ G' r* }) m/ c' v- @2 Z( u
if @.Destination /= void then
5 |- g* v1 Q0 W9 b @.Destination.NumReservation :=
; Z l; O' o- }; a1 t, {# C @.Destination.NumReservation + 1;
5 u' A& l' D* G, e0 u end;' z1 [0 W# `+ l( z# q( H" J
@.CurrIcon := "drivingHome";
* x/ j5 b) f. ^2 d @.DrivingHome := true;' w* L1 |* B& p; N
end;
( ~; ?9 \! n6 S4 I6 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
& U `9 K! v. \1 a part := @.transpOrder;
% b P( v- y0 m. h; K' B part.move(@);-- load part
3 L- a9 n; f! I- O! k2 h, ~ @.CurrIcon := "load";
! H' _; D/ ]! _; R4 u/ p+ h7 F) ~ m GlobalDistObj := part.globDestination;
^8 N' J; Y* i4 _6 m assignLObj := rgmanager.rgAssignL;
1 a9 L, u9 {, I. o! W+ ] row := assignLObj.getRowNo(GlobalDistObj);" E3 B: B3 z# C3 J$ M
if Row = -1 then -- since 701 h, O4 k3 M+ }# o1 B/ O( ?9 n
if lan=1 then
6 a, ^" c3 ]5 Z; o q" Q3 C1 c) v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), s- K" H+ p6 ?
to_str("in der Andockstation: \"",?.~.name,"\""));
' ^! P6 ^% c9 H, v; r else7 {& ?2 o9 u2 K. U7 _
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; A$ v! I ?/ g2 S" e ]% Y/ R0 a to_str("in docking station: \"",?.~.name,"\""));
! E8 E* Y* g6 z r, Z end;
! n, X3 \) H# A4 B. d. Y else$ H- t& R- k2 x3 n) p* N
@.Destination := assignLObj[1,row];
( {- @' |5 T' M1 u end;
7 ]6 X7 w: P- ^ newDirection(@);, S; [7 `9 s" O7 s) l2 d3 x i
@.HasOrder := true;* `* h0 a) L3 d& b2 z4 m' {- U3 `8 F
end;
+ `- f }4 p, o end;
G' E$ c ?6 qend; -- of the method" ?! I" O9 L7 g" K. E, x
|