/* called by: entrance ctrl of the object 'track'5 | k4 [5 x4 f3 h$ Z7 T
*/; Z$ l, u+ f. g( [
is3 F3 y/ m N# ^( V0 T* b1 I) B
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 T! q) v l2 a. T3 f7 ado
, k9 ~: G, S9 k3 z2 E6 w Lan := rootfolder.Internal.Tools.AOLlanguage;. y: B1 }" t7 I# f$ m, K/ Y: N0 H
if current = @.Destination -- else return
. g G$ S) u& k$ U: T0 V then
4 R) ~) u8 j' O8 [1 y @.Destination := void;' ~% W; I" o O' N
if @.occupied then. q2 I2 ?, j7 L8 J- a) g ^( R) m% r
part := @.cont;+ V! z( U$ q- S2 `& y* S
@.transpOrder := void;: B6 q2 u5 \1 N9 W1 i9 C2 E# R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! Z' W+ n9 E" R1 z3 Z
@,root.eventcontroller.simTime);
. y* g0 i0 E6 M6 y7 U" A& c- O @.HasOrder := false;
1 {, ^. @: ?9 b9 P: n @.DrivingHome := true;
L0 ~2 ^5 x3 W/ j- y5 r rgManager.tryToStartTransOrder;& Y- L- p9 M& p& P- @
if @.Destination = void, c% b' I# M6 L# a8 r$ z& u
then -- no transport order for vehicle @1 n+ K8 u% P4 D3 A) K6 R( I
@.Destination :=7 i6 d9 U4 D F3 r; c5 \
rgManager.nearestFreeStation(@,track.~);+ ~" Z8 I, N8 s" f) q" u
newDirection(@);
. W9 z3 g5 p, M8 q if @.Destination /= void then* y$ [' R" Q1 |$ ?" I# D% K1 x
@.Destination.NumReservation :=
" p$ v' _3 y, y/ D& k0 y- t @.Destination.NumReservation + 1;8 K% j* y' _+ |1 h( B( [
end;+ L$ |0 u- _1 \2 ?% N, O3 e2 L, g5 d
@.CurrIcon := "drivingHome";
( ]- b- Q# q( w, H @.DrivingHome := true;0 L+ q" H8 M) e6 i
end;
* @9 F5 k l9 M1 n, ] F0 S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" \+ E& y- `+ i# G" u6 [ part := @.transpOrder;
}3 b8 G1 e2 A part.move(@);-- load part* T' h4 f1 u, l
@.CurrIcon := "load";
c. T8 W1 d% Y" n4 V# b GlobalDistObj := part.globDestination;* r" ]# q" D# V( J
assignLObj := rgmanager.rgAssignL;
$ ^$ `' L$ T) ~8 C0 _( j" \4 Y3 V row := assignLObj.getRowNo(GlobalDistObj);
$ f% k L! h9 a/ Y3 x- e P if Row = -1 then -- since 70
* [$ ?9 S9 {9 y/ s if lan=1 then; }0 _0 g0 i# `+ N3 L; X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
( c# U. M1 Z2 E0 Z# ^; Z to_str("in der Andockstation: \"",?.~.name,"\""));
. \+ p' u! V6 l) @* S2 F else, A% p% z3 M+ F. ^) G, g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 _" q9 P( Z* f+ G to_str("in docking station: \"",?.~.name,"\""));
. R/ B5 {# J4 Q: B$ \ end;
1 t5 M& \8 h& `/ P3 m8 }+ b else8 x" ?2 J( @/ J! I
@.Destination := assignLObj[1,row];4 ?* ? h. y8 J- k
end;
u/ i9 o/ z) C% Q! f9 p newDirection(@);
& [/ E, |" q+ r4 q1 i# }0 f @.HasOrder := true;6 C2 T/ l% z; P8 P" `0 O
end; P" P1 [3 x3 I; G5 A% i
end;
9 j% {; y6 t3 C; Zend; -- of the method7 x: }( X$ i N/ k
|