/* called by: entrance ctrl of the object 'track'
1 O/ k8 B' d& ^' N+ ^' P% x*/
% k9 U# P0 `% U% Y6 a& ~0 Zis: |, m) p" G1 S/ k9 }7 M+ f* q0 {
part, GlobalDistObj, assignLObj:object;row,Lan:integer;, R# t) k, l& v: D% R+ A& `$ c
do
& C( v6 o" ^) z" H Lan := rootfolder.Internal.Tools.AOLlanguage; j2 g) V* y+ F0 y9 L
if current = @.Destination -- else return4 Q* y( \0 J+ N2 v
then
" ]& o! B* u' A* p" l @.Destination := void;, |3 [# J' K! ?* ^- u
if @.occupied then2 Q+ ^9 E1 n; }1 d) {/ Z6 Y
part := @.cont;" p2 P8 |! t; W8 X
@.transpOrder := void;/ e1 Q v) p) A4 P, Y+ B% p
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# L+ L% M/ D4 X/ b: L' h: t6 E
@,root.eventcontroller.simTime);% G( o" @$ u% V
@.HasOrder := false;
) r7 b7 I3 W& \6 |5 k @.DrivingHome := true;) W! @# R0 {$ j5 L
rgManager.tryToStartTransOrder;' T2 Q8 p" y! [+ Q. i' L
if @.Destination = void7 r' H2 u+ U9 w6 D @ o B
then -- no transport order for vehicle @
# e! A2 u9 j" [$ L( H @.Destination :=0 E& Z4 p" ]2 Q+ ^& K# @) E
rgManager.nearestFreeStation(@,track.~);& B, u8 V M( I* Q
newDirection(@); 9 K) b: q4 O1 p
if @.Destination /= void then
2 Y7 c H% o- o6 p" [% { @.Destination.NumReservation :=% q$ }$ l I- k
@.Destination.NumReservation + 1;
+ O7 C8 {. R8 W! H end;
, ?2 a# Z, q& {% H: r1 o' J @.CurrIcon := "drivingHome";3 n! i. G" }2 L& B$ J- n, U/ ?
@.DrivingHome := true;
3 }6 l" V( b# u. B. q; w end;
' x9 j2 |& Z# n8 w else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 _2 e9 N8 G+ ?
part := @.transpOrder;
) | ]8 e) r# K; n part.move(@);-- load part7 |- K e; d% l$ A8 {/ ]8 J. f+ ^
@.CurrIcon := "load";
5 g) W- u2 J1 I% \* ]. g GlobalDistObj := part.globDestination;
) Q8 C. j- R& U assignLObj := rgmanager.rgAssignL;/ O3 ]+ g2 d* J0 \/ R# T
row := assignLObj.getRowNo(GlobalDistObj);
( o: l- n: ^ B# ` if Row = -1 then -- since 70/ m& x7 H" E' w. u
if lan=1 then
0 J$ T; |/ f- t9 y/ w( o$ ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), Q- T# e1 u" }) F* l7 A
to_str("in der Andockstation: \"",?.~.name,"\"")); K" x5 A" \0 S& Z5 C
else
5 u& H6 Q$ F# f9 Z7 a promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
* v4 L0 {: c) i* `, f" Z3 o) l to_str("in docking station: \"",?.~.name,"\"")); ( ^! a8 l* @- G* K# z
end;
$ C; L. u2 j3 [/ C else) f( ]& w0 q: [7 t0 r3 Z! ~: ]
@.Destination := assignLObj[1,row];
2 e' ~7 \$ k5 U0 H end; $ z4 Z6 a& ~& B' C; X
newDirection(@);
) P. Q" @# s* Y8 ~9 ` @.HasOrder := true;
$ x% D2 D' p( m) i8 H end;
0 b- I3 t% F7 `2 h- R5 `1 x end;
1 P. w: u: U5 Xend; -- of the method+ t' E5 ]- R3 Q6 D
|