/* called by: entrance ctrl of the object 'track'
* b1 F0 e" d; i+ I) D P*/& _/ n: k+ @0 Z$ v" n9 L
is
$ a. Z+ l5 d8 {: ^& M' p6 e, _ part, GlobalDistObj, assignLObj:object;row,Lan:integer;- z) P: [2 A+ T) M% D3 D! T& G) R
do
2 w+ \+ I7 d: g7 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
, ?. \. f/ e' E if current = @.Destination -- else return- @7 M. R* w/ E. [% `% p
then7 m# g7 {! V W, G; P& t4 A" _0 A6 J
@.Destination := void;
O" d2 g& B- P: {, i if @.occupied then: i$ F7 Q% \- y6 e
part := @.cont;( j2 g5 G: _8 \9 m
@.transpOrder := void;3 Y$ R2 c X w
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,* F: ~3 Y' t2 R' j
@,root.eventcontroller.simTime);, y0 B4 U% Y, l) w% ^( p8 H
@.HasOrder := false;
, \0 q4 d; b* [5 U0 }5 s, x" ` @.DrivingHome := true;2 N6 N' ]6 _) L/ E f3 Z& ~" Q( a
rgManager.tryToStartTransOrder;, Y0 I9 X* p' E: [0 ~0 @
if @.Destination = void
6 L) E* y8 B8 | then -- no transport order for vehicle @
" X& t% J* a3 B9 X; d2 Q @.Destination :=) r% j6 l; p& E: f; t l. d6 g* g5 E
rgManager.nearestFreeStation(@,track.~);1 }8 |( G' v3 _5 V, M0 E
newDirection(@); ) F3 y0 Z+ Y/ Y* U! G5 o6 ?
if @.Destination /= void then
" p% r% H& Q9 O @.Destination.NumReservation :=! O- X. L/ t" W3 R2 l- ^1 ~
@.Destination.NumReservation + 1;
3 @) L5 `) `, |) z end;
, e# C7 P, l" e @.CurrIcon := "drivingHome";
2 `- H+ G! _/ @" P% c @.DrivingHome := true;
5 w( n# ~; J1 T* G1 w9 L" y: l end;& E' v7 h1 j8 R* p8 ]; N+ a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 z- Y; ~# q. @" M5 X8 d# q
part := @.transpOrder;' T0 R$ m. i; y& {- T
part.move(@);-- load part
1 K/ ?9 p* j: Z' e0 ?3 S* y) X @.CurrIcon := "load";+ O+ x$ V4 z0 N0 c3 {$ ?/ j% p
GlobalDistObj := part.globDestination;4 [2 e4 p6 e- J/ c
assignLObj := rgmanager.rgAssignL;
/ s% ?/ g a) I! Y* f row := assignLObj.getRowNo(GlobalDistObj);
" e1 }9 ~! \/ M, `% e* D/ h if Row = -1 then -- since 70
9 @% w5 [: ^3 z* @4 i2 e if lan=1 then
: d' p& l* _/ d& u# I* m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% S; G' L! N) u, _' U to_str("in der Andockstation: \"",?.~.name,"\""));* ~. ] J) B9 s6 v* e9 x- m
else
/ N3 S. ^% X+ P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 a5 ] P$ }6 E6 E# ~3 ^0 O$ K9 e
to_str("in docking station: \"",?.~.name,"\""));
) C! u# }5 H5 t3 n1 h end;
1 n9 C7 S1 ^) J' x else
2 F" x% k) Q9 i8 j @.Destination := assignLObj[1,row];
7 @" _: t4 G3 R# p end;
{5 o$ p' ?) j: S newDirection(@);$ }) V0 @. A! o+ r2 Z+ {0 X8 f `
@.HasOrder := true;$ m0 l6 {' n: X, e
end;( O- G) h6 r8 z) f5 z% s3 d
end;
" T, A2 e. o$ D( S* Mend; -- of the method
5 @8 ~2 h- n2 x. J |