/* called by: entrance ctrl of the object 'track'7 R% o; I; G" I4 o; V
*/7 l/ l0 t+ H1 H* e* X; k$ b' d
is" s0 J3 _( g% f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* N; q, q0 r+ z3 O9 B' [
do
7 G4 E+ z/ e5 c! r5 d$ X Lan := rootfolder.Internal.Tools.AOLlanguage;
+ A1 r- \0 D$ V8 \ if current = @.Destination -- else return+ q* _$ ?/ i4 T' X* f
then+ _# |# Z' ^, A& y) W
@.Destination := void;
& O# c M0 w0 n7 b; t if @.occupied then
+ L6 S( H' x/ c" e. V4 Z& B' f part := @.cont;
" K% {" [; X5 V9 W* }) y5 G3 F+ d @.transpOrder := void;7 h: W% ^4 \8 ]5 X1 I$ X# ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ k3 j& V8 {! }3 f8 a @,root.eventcontroller.simTime);, M( b# l& U7 M2 _: r1 h
@.HasOrder := false;
! @4 ]( d% L' c @.DrivingHome := true;! [% W- @8 I; a+ c+ j; x5 h
rgManager.tryToStartTransOrder;
: }! Y4 e. i( S3 [ if @.Destination = void* {% H% @* N' X: D9 G9 x8 q
then -- no transport order for vehicle @9 \( u1 y- a" l6 \9 E' s
@.Destination :=% [& U, p0 Y: c+ x
rgManager.nearestFreeStation(@,track.~);
1 C6 P& O G$ g; Z7 z8 K) l( A4 I3 E0 A, H newDirection(@); , H" f( q, K6 T) Z! @4 I( D7 _
if @.Destination /= void then
) o4 u7 t/ m7 | @.Destination.NumReservation :=
( n6 X% [, l. q& H* o @.Destination.NumReservation + 1;
7 I* D% E, b" A9 I end;$ d5 k! W. h7 J2 W
@.CurrIcon := "drivingHome";
2 b% F. R& b2 o- V0 }7 {& c @.DrivingHome := true;
$ n* z! I0 } T, F* d# c end;8 u0 C( T0 J9 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 I4 k3 r, J; }+ K( S
part := @.transpOrder;. O M6 [7 {/ w. f# q; i' I. p- H, T
part.move(@);-- load part$ F4 [! ^- |, l" k
@.CurrIcon := "load";
5 b- D, q8 X7 e6 C7 A GlobalDistObj := part.globDestination;: k4 Y2 U1 p9 ~: j! y/ Y& c
assignLObj := rgmanager.rgAssignL;1 \# Z8 M3 K8 f* c" ~- P
row := assignLObj.getRowNo(GlobalDistObj);
+ l4 S4 v8 @& _, r3 r# m if Row = -1 then -- since 70
: ?& t- k) e3 |3 k1 @) Y if lan=1 then
9 p4 i' t* R* H. i/ v( Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# l, U8 u, D- {$ o) ?* o" F to_str("in der Andockstation: \"",?.~.name,"\""));3 o" n3 E# \9 Y1 F4 u+ u
else! Z+ _$ m* `5 v0 k! z3 [, B* ~* G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 u6 w+ m) C2 {- M to_str("in docking station: \"",?.~.name,"\"")); : c( q5 v* R, J$ V" d2 k" [: N- W7 T
end;9 M+ b8 U/ a1 {! h9 g3 r9 W
else
( G( @0 `0 ^% m) G @.Destination := assignLObj[1,row];
- s0 z8 K4 ?7 H1 _% h end;
6 n+ Q0 [7 |+ T" R newDirection(@);
& Q; b1 ~ ~5 L @.HasOrder := true;
8 Z6 P- ~: }2 W end;6 {! Q+ U0 m8 t# J
end;
9 n% Z6 p$ l7 b2 `* nend; -- of the method2 b- c5 O" |, _+ [
|