/* called by: entrance ctrl of the object 'track'# d4 i8 q& \# A
*/
4 \2 E& h. B) q$ s$ Cis1 x b' r" |# f/ x) x4 p N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 s- K- F7 z) Jdo5 S: M2 F3 F" s+ P3 ]& W) e* a
Lan := rootfolder.Internal.Tools.AOLlanguage;/ Y) ]# d) p0 R0 M# C* z
if current = @.Destination -- else return6 _9 f# D1 F8 y3 j1 x
then
]; v9 e1 Z0 W' W0 l @.Destination := void;
5 o5 ~) `0 C1 f( y6 p9 q if @.occupied then
0 ?* {/ m4 z% L2 ?; K part := @.cont;/ {1 G" L2 T; L# C' T
@.transpOrder := void;+ n9 w$ S" P" ?: C; {$ R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 D( P) ^$ ^3 x$ T
@,root.eventcontroller.simTime);
9 W# l5 ?! f7 z$ t @.HasOrder := false;
# B7 w+ e7 y: s7 x @.DrivingHome := true;! O% ` c( t. g# m
rgManager.tryToStartTransOrder;
3 I* Z4 x! R$ j h7 N if @.Destination = void' w+ [4 n( ?- Q1 `- A
then -- no transport order for vehicle @
( y( A. [' N# W3 }2 y @.Destination :=6 `# l e& j) l6 b: C: I% R
rgManager.nearestFreeStation(@,track.~);
: V+ L" s6 x' R1 I5 F' C. e newDirection(@); ! K0 Z( r, t0 {
if @.Destination /= void then
y" n3 L( U, j R @.Destination.NumReservation :=, q$ [" |9 `( b) k( m' I
@.Destination.NumReservation + 1;
+ e- c) ?# b9 P5 k9 `6 V end;
( \5 n# {+ Q) I$ z" e& k @.CurrIcon := "drivingHome";0 |8 l7 [; m+ a! G' `
@.DrivingHome := true;7 r% {% n" i" S& t9 z
end;
' L$ b: g1 ~+ H8 [6 k1 E7 M" S2 [" D' I else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 H7 g+ V! a0 ^% {& o# y
part := @.transpOrder;
$ P7 M1 C3 S, N- j4 ? N! H0 B1 d6 u part.move(@);-- load part8 T' V4 W3 F6 z; O/ W( _
@.CurrIcon := "load";
+ M9 D3 X- y! q5 R! }/ w: }. | GlobalDistObj := part.globDestination;
/ ]$ g/ N* s4 x assignLObj := rgmanager.rgAssignL;- z! ]8 ?# i, Y- w$ W: {: _4 j
row := assignLObj.getRowNo(GlobalDistObj);
/ j; O* n" C8 ~7 I if Row = -1 then -- since 70+ r# q5 D+ K8 J4 C/ |
if lan=1 then/ g- V0 T& a/ q; H: [: q' Y/ z' P, Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* H- R8 J1 ~% e& Q. b( D; E7 P to_str("in der Andockstation: \"",?.~.name,"\""));0 O! z/ J7 p& h0 {0 @, L& O& i1 q9 Y
else2 I0 b9 [; \ v9 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
c& X% Q, R' w3 s: R, B to_str("in docking station: \"",?.~.name,"\"")); 8 D: {; Q0 o7 j. T) k
end; K2 A5 d A5 ^
else
+ D' C0 O" K0 k @.Destination := assignLObj[1,row];- I$ r5 B; G7 u2 B
end; & {3 v4 o( h: B' l- Z
newDirection(@);
9 Z, k. `3 L: X, i @.HasOrder := true;: G5 e, B2 B. l7 K
end;
" P5 A j8 Q6 Z: a: ]0 B; }* A+ a end;1 J* a6 [7 H/ K- M! F/ b) f
end; -- of the method& H. H/ w& n/ b2 I8 c3 {
|