/* called by: entrance ctrl of the object 'track'
9 ]9 g9 V7 r' l- S$ R; _: |*// Y' }2 v9 |) T0 ^
is
+ ?1 Z$ F2 n% t4 h6 r( ^ part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 a7 k( V9 h* B1 o# ~ D
do
* V" E e9 f' ?% X! O6 T+ b7 ? Lan := rootfolder.Internal.Tools.AOLlanguage;* k0 E9 S- t' p1 m! t8 Y9 c1 [
if current = @.Destination -- else return6 H4 ?* [( C' z/ ~
then
|) E% Q9 X& v3 P) K1 R4 Z( R# B8 j @.Destination := void;3 G+ P6 _/ c) p( w! q/ q
if @.occupied then
1 d- a' q: t; w! l7 R" f. U: P part := @.cont;, X. R2 i8 S, [4 ?" Q
@.transpOrder := void;
% @8 l, A( A8 r/ k/ s9 N# X# j, m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 L2 w; I. \% U/ t# v6 |$ x
@,root.eventcontroller.simTime);
( V# S1 }" d8 I8 X; w/ k: ` @.HasOrder := false;) C: v! A8 l* g8 K
@.DrivingHome := true;# |" t- h+ v' ]- O" K- I: |! M
rgManager.tryToStartTransOrder;
: N3 ~+ w; V; A$ Z0 u. ^6 x% C if @.Destination = void- I! c6 x) C5 _7 ~
then -- no transport order for vehicle @. J: V' F0 S* K
@.Destination :=9 m, `. _; U" D5 Z. V
rgManager.nearestFreeStation(@,track.~);5 C+ o0 j/ d5 F$ t
newDirection(@); ) g6 i2 l9 Q! O0 a+ e3 n0 i
if @.Destination /= void then4 i- d7 H4 T" M) _+ g% E; t
@.Destination.NumReservation :=
0 B# ?! M/ g- Z6 z: r @.Destination.NumReservation + 1;
; V1 D O/ A9 U. y4 y end;
1 \. A1 e/ t' C' `1 W @.CurrIcon := "drivingHome";
. V! r- j* W/ Y7 q! u. K0 D0 S @.DrivingHome := true;7 d$ O) ?# E8 z+ m6 \
end;0 j: o6 ^+ r9 k1 _, G+ V4 t
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 ?( ?5 B$ U7 o9 ]" B, g
part := @.transpOrder;; x& p& c, d5 x3 i
part.move(@);-- load part
; P- @7 z, `& k7 L @.CurrIcon := "load";
3 v8 G/ q$ s9 y GlobalDistObj := part.globDestination;2 t6 x" X! k$ i( K' k* {; w9 A3 y# W
assignLObj := rgmanager.rgAssignL;7 w5 S8 W: A% [6 v& p
row := assignLObj.getRowNo(GlobalDistObj);
: `$ f i" R% V* |& ? if Row = -1 then -- since 70
. T8 n* d4 k* A# b# e) H9 v4 j; Y if lan=1 then3 G; n6 X+ M. z: p) {4 k/ M% G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 l0 `% ~7 s; K8 x# o/ g4 R5 W to_str("in der Andockstation: \"",?.~.name,"\""));) P( P0 C$ m6 K- T7 \0 i
else
1 a; o- S- y, p; t' h8 s/ Z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- o: \) ?0 i5 q* g+ q% k) T
to_str("in docking station: \"",?.~.name,"\""));
9 ~' D$ ~! ^; n4 |7 Q2 r; o6 v end;* Z" p" |4 X; I9 i4 w, z
else
' B) o9 K6 A5 l& ~ @.Destination := assignLObj[1,row];
4 \: ]' a! a( W( o4 M: c6 V end;
, S7 g- Z0 p" ^8 \, |7 O newDirection(@);
6 l, |% R) Q& c- |3 o7 b. \ @.HasOrder := true;
9 C( @* ~* U: u- g) H4 y8 `2 G end;6 U; ]# K/ Q9 J. I" w) Q% e
end;1 Q7 ^# S* y9 B, X; n0 I0 {
end; -- of the method+ u# M& f. S# I$ d# ]6 D
|