/* called by: entrance ctrl of the object 'track'
, u2 R) e3 {$ x5 @*/9 \4 |' `5 y" y4 o( W/ k9 M3 h
is
+ W+ o; j0 p! ]6 S5 X0 K" v9 C9 h& { part, GlobalDistObj, assignLObj:object;row,Lan:integer;" s% e4 |! k) o3 D* {' k% `
do, ]) r l% t. T& {# d( o" c$ ^0 c
Lan := rootfolder.Internal.Tools.AOLlanguage;
. \# ^1 B% O' \, L1 S0 D; h if current = @.Destination -- else return/ `( K5 s1 l5 B3 J" m
then
+ r' R( f. J1 O9 D @.Destination := void;3 M, g- E, V! y6 B
if @.occupied then
4 J" I- f- k' Y- K part := @.cont;
1 H3 e H: v2 a$ A @.transpOrder := void;; l B, _0 H, ^6 Z) W! |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
) s/ `. {0 h' J1 k7 \: A @,root.eventcontroller.simTime);" T) q' r4 f& V- A) u3 M7 k8 w3 {
@.HasOrder := false;
+ `0 M7 Y, I) v' _! I( Q! f @.DrivingHome := true;# }) d8 M# C/ V# G4 g z
rgManager.tryToStartTransOrder;
6 t# V, @; X. L; C, y6 u/ g* B if @.Destination = void9 k; a a |: Y) z# M. W
then -- no transport order for vehicle @
! l) r: ^* v- E @.Destination :=
" t( v$ {& w( p1 w6 @0 p rgManager.nearestFreeStation(@,track.~);9 c( S; Q. p) f4 F, z7 p# t8 e( x
newDirection(@); ' ~4 K6 \ q$ v# Q
if @.Destination /= void then# ?2 w( p* O$ j4 U/ I" f
@.Destination.NumReservation :=9 f9 ]. v4 }- r# f* L* v
@.Destination.NumReservation + 1;" w" u/ d* d2 c, z4 J* b" }
end;
5 x% l/ o1 m7 w9 h. `* @ @.CurrIcon := "drivingHome";3 f8 c, A& Z4 x0 m2 F
@.DrivingHome := true;
" V: Q5 ^8 g L% R) o* F end;
+ L3 W% Y* L$ k J: S9 b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ O, P6 M" U3 `. L1 I1 c2 g part := @.transpOrder;
4 {2 C e) P# f' D' s* Q part.move(@);-- load part
2 P& R: {4 v. o1 T @.CurrIcon := "load";
( Q# d$ T H3 w! ~( }1 Q" H GlobalDistObj := part.globDestination;
' C, C$ D" q0 i$ z4 Q7 n0 h assignLObj := rgmanager.rgAssignL;% X0 @- L! @6 Q0 k5 \( O
row := assignLObj.getRowNo(GlobalDistObj);
" ~( G$ }- W5 Z& w+ m+ W if Row = -1 then -- since 70
) i0 ]8 ]- ]& m if lan=1 then
" ?) j9 c# X( R- U" C% z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, s& H' Q$ }- f
to_str("in der Andockstation: \"",?.~.name,"\""));3 _/ |4 }; ]+ `4 b+ i. Y: \3 ^5 c
else' |- \& p. G- x: {' Y$ f3 u
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ |$ N9 w; \9 G' }, Y to_str("in docking station: \"",?.~.name,"\"")); 4 k2 E' J) P- w
end;
$ F! v2 V$ t9 J) i* a5 a O else
( z. B: u2 s- R1 H1 N @.Destination := assignLObj[1,row];
4 Q; [: F4 i, o7 s5 X/ @ end;
: Q4 ^2 P. z6 N, [0 p% Q newDirection(@);+ W3 m( m u- h9 [* u2 b0 ~
@.HasOrder := true;" S8 m4 `$ H9 U' O- C
end;2 _$ y4 T1 ^4 q. P, W3 B6 L
end;7 c- Z: B3 m/ ?5 H3 K0 _ n. v* a. f
end; -- of the method
3 `' k8 `* H; S: h( f |