/* called by: entrance ctrl of the object 'track'
, E# v+ t8 g. q) G) e*/# }8 @& W* B B" V' l( `5 K. u
is
" y6 N, V. p, y" m5 k6 R: ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;' s) S# c. G9 y4 w1 P2 [# F
do
0 M) t) N4 F2 y0 U4 X Lan := rootfolder.Internal.Tools.AOLlanguage;0 d1 b3 Z- Z$ b M) _ y! `
if current = @.Destination -- else return* c2 V: D/ ]5 g7 J
then
7 _, T1 P8 D3 ~3 M) w7 _" s5 E @.Destination := void;
+ U8 O' O @6 `! c* E! U6 b) b1 d if @.occupied then
+ a4 _- q0 H8 A! D3 Z part := @.cont;+ `) l4 `# c3 S4 _$ I# u3 s- T; c/ s
@.transpOrder := void;/ w* @! h/ `" O; G' |% J) K9 Z$ \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ x7 ~4 Q6 q- h9 O5 Y" x
@,root.eventcontroller.simTime);- q. k. B9 `. S. l
@.HasOrder := false;
# a5 ?! T# G/ g7 g1 q @.DrivingHome := true;- f; N2 ^" p N$ w- f: i' V
rgManager.tryToStartTransOrder;
' Q7 C; y- \' [9 I1 T1 p; k if @.Destination = void
) ^3 b; x. R1 \4 q6 b7 Y1 n then -- no transport order for vehicle @8 h/ |0 X) ^8 y5 ~3 h/ }
@.Destination :=
9 z9 L# p4 W2 S- g! H rgManager.nearestFreeStation(@,track.~);6 e; l8 V% [. L) A. x1 k! n! S
newDirection(@);
% E6 O' ~$ ?0 j! k if @.Destination /= void then2 a& c1 T; H; w
@.Destination.NumReservation :=* k/ C# E8 t* |% y
@.Destination.NumReservation + 1;0 {3 X9 f/ ?/ r+ _0 \2 }( u
end;
% T& m, e: |5 m1 @- A! d @.CurrIcon := "drivingHome";
6 n9 u; v k3 p/ o% k @.DrivingHome := true;/ m( V/ [# P/ ]$ N( D; B
end;
9 S2 E; l; k Y6 E7 J, f+ ]' ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 X+ o. t" V: v* m, q" r part := @.transpOrder;
8 s0 a3 P! F# ]- A9 R5 O) v% [ part.move(@);-- load part
" c& w3 [( F+ f! u; ~ @.CurrIcon := "load";, _3 O+ z: w: q" Z
GlobalDistObj := part.globDestination;0 s( m; m: e' D. e; D
assignLObj := rgmanager.rgAssignL;
8 N; N$ _! y F5 T row := assignLObj.getRowNo(GlobalDistObj);1 v+ D# V0 g" u6 M3 k7 }& J i7 |
if Row = -1 then -- since 70- i; }0 M, H$ n6 a( g( N
if lan=1 then
/ Y* O' k; H: [ f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 t4 v% i! Z: |8 z2 ^& Y to_str("in der Andockstation: \"",?.~.name,"\""));
5 Q4 h( d) u' Q1 g1 ~0 v1 ?/ b8 R+ {- H2 [ else
: Q* H9 ?" F8 o4 D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 H5 @$ p$ a, G- x2 ]
to_str("in docking station: \"",?.~.name,"\"")); * l v: E5 B0 \* M$ t; V3 R1 r
end;& |; h' X" t5 |. Z5 W6 y, Z' H
else$ M, a8 u( e) [! M" a4 e1 u8 L
@.Destination := assignLObj[1,row];$ \2 s6 U% H7 Q7 z: i$ Q
end;
9 ?, d' L- t5 I u' o3 M3 ] newDirection(@);
/ |8 i- j0 N; A" b5 Y. h1 ~ @.HasOrder := true;
. ?1 T: f0 g6 h/ G7 I: g end;
0 E7 ^: G; n, K* y/ l end;
3 E& L5 @# m ^8 c: ^end; -- of the method& I" e/ y+ n' |. }
|