/* called by: entrance ctrl of the object 'track'3 R0 ]! Y7 m$ A5 |0 \# t9 q
*/
- C( s+ F' w2 w3 w2 o. u! Ris( @, ~8 R d* w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' s. A X+ ^. c) Z& i# @do
1 ~2 o6 k- N! F5 J! [6 Y Lan := rootfolder.Internal.Tools.AOLlanguage;
2 f# b' n! Y" U$ t4 r) k- m if current = @.Destination -- else return
/ E, l3 C% Z# [ I4 w then! O. L+ U, g$ [
@.Destination := void;3 q7 D. M' [; N+ J1 {7 `# W
if @.occupied then- O+ m( t3 _! c( D6 c
part := @.cont;/ ]) t! L: B2 R L, S. [1 F& a
@.transpOrder := void;2 n! \0 g" Z) Z: J1 c' B
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ H Y- z! V5 Y* k5 N! d
@,root.eventcontroller.simTime);
2 w9 i+ W3 H* t6 ` @.HasOrder := false;4 m: N5 N0 e: b, x* \
@.DrivingHome := true;
1 Z6 A5 B4 K8 } rgManager.tryToStartTransOrder;
0 [% _1 Q+ M$ f. \: N, Z- ^ if @.Destination = void5 _$ Z' T- y; m H/ Y
then -- no transport order for vehicle @
. w9 N$ ^& Q3 w/ e @.Destination :=
- F4 K. X$ _5 L0 v rgManager.nearestFreeStation(@,track.~);3 Q+ Q# B+ H" f% E
newDirection(@); 8 z7 E/ a& J" n7 t. }/ X
if @.Destination /= void then8 I# D% V N% {& g6 B0 F" C
@.Destination.NumReservation :=
+ D( h$ D0 K# _ g6 N: T' C @.Destination.NumReservation + 1;* w8 e- a9 V; a8 [. u! }3 Z! ?
end;2 W5 @3 ?& l, v* J1 Q! g4 O. A
@.CurrIcon := "drivingHome";
, q6 O9 l( O7 v) X, X4 v6 i @.DrivingHome := true;
: w' y$ r9 \+ G8 z9 e7 O7 k9 X" [5 ` end;
2 U, J6 g; W2 g* T( D+ O3 R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ F* E% _* b4 K7 K$ m part := @.transpOrder;0 ]" P6 o; }" X( G# R7 P, ^
part.move(@);-- load part& f* Q/ P T8 ]9 F. v4 r
@.CurrIcon := "load";) o5 n- ?/ U ]: l9 g+ _$ L
GlobalDistObj := part.globDestination;
7 R" r5 S6 X0 W. @; G assignLObj := rgmanager.rgAssignL;, Q' E6 W% ~7 J. [
row := assignLObj.getRowNo(GlobalDistObj);4 _; v( A7 R4 I/ K w) l
if Row = -1 then -- since 70
8 r/ i4 g. L/ O% i, e if lan=1 then% n' g' K8 B- ?* I [+ J8 y" I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 [5 _ @/ p, h6 T. k4 j# U. X; o
to_str("in der Andockstation: \"",?.~.name,"\""));
' D0 j, Z# l( C- r$ J/ y else
6 H& t9 h. L1 P* `3 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( g7 a; a/ }+ a" O3 ?8 E* u to_str("in docking station: \"",?.~.name,"\"")); ; k2 g, j( h9 g" B: R$ j, r
end;/ ]1 B1 L. A* o
else/ ?4 x. J0 r; e J- a; p
@.Destination := assignLObj[1,row];: ^' h( Y$ t' a
end; : H' g$ s5 C# j4 B9 I- @
newDirection(@);. I I) `& g* f- }/ L7 p
@.HasOrder := true;* T9 t$ B4 c# D$ I* H
end;' P* x+ Z' T5 F3 ~! Z
end;
. o; i/ ^# j& f8 uend; -- of the method
1 ^" Q: O4 z7 L% c |