/* called by: entrance ctrl of the object 'track'$ e8 U! g! t$ [# ~) N( C+ x
*/
( v' Y9 H1 v8 mis8 U! u+ v8 K: O+ m' V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; ~! f4 K- x& e) x* J: E- `( p5 D
do: B+ m; D$ {9 o
Lan := rootfolder.Internal.Tools.AOLlanguage;6 I- f6 p' z; S
if current = @.Destination -- else return
3 v+ B0 A& O! y& T. Y then
( b5 \5 _) g2 B7 v4 q @.Destination := void;+ H; }6 i" S! @
if @.occupied then, _ Z4 G- @6 }, q& ]; d+ r# P0 r
part := @.cont;3 [% N2 J: j$ Q2 G3 Z+ \& d
@.transpOrder := void;" Y. E0 S7 S3 L, x. c5 j# {' X" U) D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& m/ r7 L3 l" P* D, m @,root.eventcontroller.simTime);* c8 U0 t. F y k w. t; F
@.HasOrder := false;. A3 `1 c% n7 ]; X
@.DrivingHome := true;! r# Q) e8 V5 G0 t8 h, h
rgManager.tryToStartTransOrder;' q- A2 _ w& ~3 [- u
if @.Destination = void4 _) G- W! A5 e7 m7 l
then -- no transport order for vehicle @
3 }, g! h) o* `! H+ |# Q9 E/ } @.Destination :=
) O7 W3 K U- u; S" \ rgManager.nearestFreeStation(@,track.~);
+ m! B$ c5 F9 y5 @! g newDirection(@); + K. {& B h1 z4 w5 a* W* Z
if @.Destination /= void then
1 D( t6 q8 B7 q, i5 O; x$ O1 s4 ` @.Destination.NumReservation :=8 _8 g9 S; H% }- l
@.Destination.NumReservation + 1;
; l( P& n8 g: N3 \! J! G1 z end;: p: P7 w9 }; V( N% {9 [8 v2 M& [. D
@.CurrIcon := "drivingHome";
, N/ y; |) s0 V$ H- t @.DrivingHome := true;/ @% S* {; U7 ?5 \9 D3 t
end;
+ Y# W; s: o5 Y. U6 F, p/ ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ M# X4 I/ u7 d& g9 i$ {2 Z
part := @.transpOrder;
) b9 ^3 T8 G2 s! f' R part.move(@);-- load part# u4 q: e; a' L+ r0 @ N4 f0 T- L
@.CurrIcon := "load";4 n, C# S+ ^% q4 q; |( ^
GlobalDistObj := part.globDestination;
# c% E; U [+ _+ W2 N/ f$ |7 \ assignLObj := rgmanager.rgAssignL;
( i0 b5 h$ d3 ^6 m& O* C4 b row := assignLObj.getRowNo(GlobalDistObj);* R; C: O. o, o O- R
if Row = -1 then -- since 704 Q) d* t2 G5 ]7 d B
if lan=1 then1 u* z! G! _' c1 p- E
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# X& c( J( m" o to_str("in der Andockstation: \"",?.~.name,"\""));) K4 \) A* k; T) J' [5 T
else* m# A! ]! f, p+ B; _% J% h5 b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 K5 h/ W G! S. Q O8 c- s
to_str("in docking station: \"",?.~.name,"\""));
/ Q. K" M! } `1 l/ b0 E; J& \3 R end;: J' G7 V; K% I/ ~( m9 {5 Y% ~9 D
else- }+ Q% X# g; `0 V
@.Destination := assignLObj[1,row];
+ Z& s5 x% N$ W& | end; ! V, }# Z! D2 p) g: o+ k' m. v
newDirection(@);
' {; L9 ~+ f, I6 Q) m @.HasOrder := true;$ }1 N" h4 Z$ B
end;! Y: A8 `3 ?+ ~
end;/ g c G. T$ e0 K0 U" W
end; -- of the method
3 t/ F) B) t5 U% z4 Z( a: P5 c |