/* called by: entrance ctrl of the object 'track'# ]- v+ O0 Y4 Q
*/
! W; h& F4 F2 j8 a6 S8 ]2 c% L3 his
6 z8 y( f0 T2 p1 U; V4 I3 E5 S8 F: {5 K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, J* T: I6 n9 _+ [ L1 j Udo
i+ N2 g6 L' t9 a$ {) V Lan := rootfolder.Internal.Tools.AOLlanguage;
" n+ A8 P% o1 z/ Q if current = @.Destination -- else return" U, @8 P' z+ d3 ?7 b
then
; r; q+ r" u9 U1 r @.Destination := void;
% _# ~' J; h/ r2 I2 o2 `/ x: Z: V z if @.occupied then1 F1 }4 Y- D* Q6 J+ W
part := @.cont;0 J2 `' g5 m3 h; W9 i
@.transpOrder := void;
% c/ K" Q' e4 n+ j part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( F. f/ k0 }% z0 r6 v7 j) W
@,root.eventcontroller.simTime);
$ E5 i$ M- R- i9 X; F* o: a @.HasOrder := false;& F, l4 ~# y* T; j
@.DrivingHome := true;! `6 M/ b$ \3 F
rgManager.tryToStartTransOrder;
2 g1 G4 d8 S% |0 m1 c0 Y if @.Destination = void
* T6 y# o0 [. b! @ then -- no transport order for vehicle @
3 z" r9 l# r# W @.Destination :=
1 y5 d8 k5 z4 G4 ]* ~ rgManager.nearestFreeStation(@,track.~);* s" R: X7 g# g/ {# a) T
newDirection(@); # _% M$ g, s9 Q- `. d3 R. R& @; c
if @.Destination /= void then
, _5 I+ O* f2 t. C @.Destination.NumReservation := t+ z. ~) T* q+ ^/ p* r. y% \5 y
@.Destination.NumReservation + 1;8 A W* D3 G( k( V6 L- x I
end; c& v/ v5 ?% z/ m, w& Q& U/ X
@.CurrIcon := "drivingHome";2 t4 K. r% O- O X% S: n
@.DrivingHome := true;* }) j; z$ z4 L
end;
# y9 H( N/ X1 d. z, |! x* @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 b9 [1 k3 Q* ^3 T5 [
part := @.transpOrder;3 r \: Y6 T% `$ K2 g& ^4 _
part.move(@);-- load part
0 |# E0 r: A. l" I/ x' Y" F @.CurrIcon := "load";
3 ~$ K& G7 V" o- [, {6 E8 b$ U GlobalDistObj := part.globDestination;
/ s* n) j5 F; k assignLObj := rgmanager.rgAssignL;
) Y! Q/ C0 L W% d4 p8 G( e row := assignLObj.getRowNo(GlobalDistObj);
8 ^ F: I0 v- M& H( | if Row = -1 then -- since 700 `4 ~) R0 g* s
if lan=1 then. m3 X1 H+ F) K2 O7 i& F" E$ ]
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
' ^8 C! X3 e; X) ` to_str("in der Andockstation: \"",?.~.name,"\""));/ t# o3 R: A& a$ O5 W5 _
else# c7 q2 W, G3 X u3 A/ q8 T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 f! r m" ~# ]5 t to_str("in docking station: \"",?.~.name,"\"")); 8 E0 G/ @8 X W. R, r( ]; B1 N
end;" i9 g! j& E+ ^% Z: E
else
9 P( a: L* F" m6 q/ ^. q- c @.Destination := assignLObj[1,row];
0 Y- l& S. u( `0 O6 |' i end; " ^' ^$ N+ g: q" m* i5 n
newDirection(@);
8 i! f2 P5 C }8 K1 g% p# D! f. r# L @.HasOrder := true;& c2 ^% t. ^1 L) U0 M) ?
end;
% \8 R! ?0 b1 G' ?2 G end;5 v4 N+ G6 t/ m* B9 n
end; -- of the method3 ^4 ?1 d# g* A7 ^# \9 ]
|