/* called by: entrance ctrl of the object 'track'& |- P4 Y- M s( Q% U8 E/ G
*/+ Y+ \" |3 S# Q j* K$ I" O w& o6 E
is
* o% m: F2 d: d$ F, f3 t part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% l2 k) W/ R0 j: v+ G. F8 wdo. ~0 E r% V7 d }$ P( ]5 r
Lan := rootfolder.Internal.Tools.AOLlanguage;* A7 @. l: V1 Z4 g; X7 T: r+ ]
if current = @.Destination -- else return6 q/ M3 o. b6 g/ R9 |+ S; s! l
then
, s( w5 b/ P) z+ U& Q* P6 s @.Destination := void;
9 e8 m* N% k7 u0 W; ?' D if @.occupied then
4 S5 Z! d5 v6 D0 a part := @.cont;
F7 ^ x7 l( m9 j* P @.transpOrder := void;
9 E% z4 w4 h2 s5 t2 l# R | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,+ @, L# p% t7 ~
@,root.eventcontroller.simTime);2 L4 }# \9 x P5 K1 o9 ^
@.HasOrder := false;" _+ O9 N. g6 o( ]& }
@.DrivingHome := true;) \9 F* ~; E. A- S8 u
rgManager.tryToStartTransOrder;
7 _& m/ r/ L; x( ], v- _ B if @.Destination = void
% y8 }* t: d6 R6 w' U( E then -- no transport order for vehicle @- |, n, f' M* n7 ]" B; R
@.Destination :=5 g- n' `1 X# Z5 a7 L
rgManager.nearestFreeStation(@,track.~);
% J: [% g: }; y& u3 `* G newDirection(@); 6 G! m2 [! ?* j F3 r' n9 r$ X
if @.Destination /= void then2 h1 |" h* H0 p# ]! b
@.Destination.NumReservation :=
. t0 [8 M6 a2 v7 q" ~+ a @.Destination.NumReservation + 1;: W/ {4 F; g9 a9 E- ?* K3 j9 v
end;
% x1 Q8 D1 s D5 g! X9 m @.CurrIcon := "drivingHome";
8 c7 O: I* B$ ?+ q: q$ Q8 l @.DrivingHome := true;
) z/ c( h0 S+ i1 j% W2 o) D end;
' b! _. G, Z/ k/ T: c0 S. q else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 V8 ^$ C# M( w! \! [; T
part := @.transpOrder;
5 `* C: f* C8 C! j part.move(@);-- load part
( q+ w1 ^9 U( T @.CurrIcon := "load";
+ l- u6 D t# i; `. s GlobalDistObj := part.globDestination;% x5 m7 Y5 z! N8 g$ P, }0 K5 ~
assignLObj := rgmanager.rgAssignL;3 y/ z& |% Q' F( C/ H* s
row := assignLObj.getRowNo(GlobalDistObj);
6 B6 Z7 [+ Z5 {* u: M if Row = -1 then -- since 70
) F Z p J& ]' R# S if lan=1 then
8 C W& Z1 U, c) j) M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ \! l d' S2 O, e; X2 l to_str("in der Andockstation: \"",?.~.name,"\""));
2 X S# N `' y" L& Q else
* }6 j3 X" `" Z' Q( d! Y7 T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' u1 f, l- a, U) K0 p2 u to_str("in docking station: \"",?.~.name,"\"")); ( i) \3 H- X; Q Z A
end;( k" w! n8 I/ P: ?0 U4 U
else
* Q; `5 E$ F6 p7 `; ~ @.Destination := assignLObj[1,row];
. E: n& m) p9 {( p d8 O8 s end;
, J8 @( [. A" i. g1 n, h newDirection(@);
, W0 ?! ?: [& T% f) \4 O @.HasOrder := true;
2 q9 B6 i) `+ K7 q end;% j# ?$ F" z- w S
end;
6 N# O8 H- K8 o: f$ g# Zend; -- of the method. U O" K* s$ J% n2 B, k+ R' q
|