/* called by: entrance ctrl of the object 'track'; M& |% G. d3 F; H: c- A, c
*/) T5 k& q1 J5 [0 ~$ R/ E
is
- M) \. [7 E' o' F/ V9 Z! F* F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 W4 F) B! R& }% T$ }do
+ ? W, L/ t/ N4 }. X8 D$ L Lan := rootfolder.Internal.Tools.AOLlanguage;( u4 ]8 k0 [8 x( ^; e0 C
if current = @.Destination -- else return6 D7 ^1 W) H ~1 M& Y
then, Y9 S! r8 M, e' c N2 M6 Y
@.Destination := void;
5 h& X( q# W$ R3 @6 o" h if @.occupied then5 \2 V6 |/ G+ i. n7 ^
part := @.cont;$ H. o+ N- f0 D; n
@.transpOrder := void;
. @ m' Y4 @1 \8 ?+ C& A0 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ Q8 j* ~2 X' B# y! N
@,root.eventcontroller.simTime);; T6 i- |! q, E* l4 M
@.HasOrder := false;
6 T! o7 F+ o2 x' }! D2 j+ o2 ]+ p% z @.DrivingHome := true;
' j" y( h0 W1 Y j3 I3 H rgManager.tryToStartTransOrder;
+ y0 y0 Q& j, D7 T if @.Destination = void2 n1 U" j) X7 u0 H9 N
then -- no transport order for vehicle @
* B n2 x/ e* b+ J, a* y, \0 ~ @.Destination :=( p# q5 R4 @9 N
rgManager.nearestFreeStation(@,track.~);
6 F) u6 o% u, v# c2 U5 e0 @ newDirection(@);
3 d! _3 K) X( T7 ~9 q; L% z$ d B# ] if @.Destination /= void then U2 D9 a$ @' l1 R
@.Destination.NumReservation :=1 V2 x$ e, z8 J
@.Destination.NumReservation + 1;
. f, y v4 M9 u3 K- \& ? end;
/ N7 c% w8 p1 M' T! H# d @.CurrIcon := "drivingHome";
$ l. A; E9 c4 `* B/ ?" C @.DrivingHome := true;
_+ S4 D4 a; x5 a& U8 \ end;
4 z' U4 P- y2 S: L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 I- @6 G+ F* q4 X% O part := @.transpOrder;
8 @ f, ?: a5 C0 g A part.move(@);-- load part
3 `, Q' s) L6 ]& x6 G& V+ R$ ^8 e8 r @.CurrIcon := "load";
0 R% _5 |' f F8 |' C0 s GlobalDistObj := part.globDestination;; c: M" a* N7 R9 L
assignLObj := rgmanager.rgAssignL;
/ e) `- [: q3 L: o; {1 D row := assignLObj.getRowNo(GlobalDistObj);+ j4 R+ K T4 u6 E7 }& z; W
if Row = -1 then -- since 70
& y% A0 N# t$ X m _ if lan=1 then
, n6 @( A$ i1 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* G' d4 w ^9 q! g( {9 @ to_str("in der Andockstation: \"",?.~.name,"\""));4 |" I7 O& J- s* F% d2 K
else# N( Z& I# Y- Q/ V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) a6 [+ K+ Y" @
to_str("in docking station: \"",?.~.name,"\""));
) [" O* Y1 }1 w end;9 G9 i, Z2 u) c6 B% j8 t& v7 O
else+ M3 P3 u/ k; ^4 Q* a( X
@.Destination := assignLObj[1,row];
4 {: }% ^9 p) f) m; V/ q& g5 ` end; * z: i& `3 ?3 B$ N
newDirection(@);/ [$ ^7 k% X6 H: h/ }* R
@.HasOrder := true;
( S; _8 `7 L6 q: D% T+ r end;: _! X1 H3 F2 O
end;
! m) e& P* P" p2 ]- T6 oend; -- of the method$ y1 @% k k! |" d
|