/* called by: entrance ctrl of the object 'track'/ e7 o6 y c5 \. b9 e g/ \1 C s
*/
i# P K' k. n# P* ]2 gis% k% o: O9 s3 ^+ Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! n, k. E5 f* N- Pdo
% K9 Z4 x* A R- R6 X8 j Lan := rootfolder.Internal.Tools.AOLlanguage;" F1 s7 ^6 D- i) p/ `, J) J
if current = @.Destination -- else return
' N+ `* H. \" C8 Z+ d; K then0 |" e) o6 j8 R6 G5 r
@.Destination := void;, G7 h4 c* ~0 z
if @.occupied then- ]: Y/ m: n$ H+ z* V! F% U
part := @.cont;" G! v: Z6 t5 j1 y" G7 c- F
@.transpOrder := void;
( {: S/ h& ~$ q5 V8 ] d! H part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" X Z% B/ y+ F2 w* Z! j" G @,root.eventcontroller.simTime);
! m( V6 \: |; H! [ @.HasOrder := false;6 G: E4 h# F# p, ]7 I3 e3 E1 `
@.DrivingHome := true;7 @5 Z0 G" C/ P! n0 Y3 v
rgManager.tryToStartTransOrder;3 ^; r0 E, \1 Q/ I7 ]- D1 f
if @.Destination = void
3 @7 v: Z, E5 n g8 ?2 l then -- no transport order for vehicle @
7 R1 @8 J0 P2 d/ K5 P. N2 r @.Destination :=
9 T4 z! S' B4 x5 b, `2 |3 [ rgManager.nearestFreeStation(@,track.~);
% D R) f- d0 p( Q newDirection(@); 3 P% m+ C8 F H3 h& C* b* U, a9 s# d
if @.Destination /= void then: `) i2 `! Z2 m( {- K& U
@.Destination.NumReservation :=
8 S2 ~+ `/ C" p% \" D @.Destination.NumReservation + 1;! S! I( H- n; o
end;
( I E% d, A7 }7 J' B @.CurrIcon := "drivingHome";
/ M6 @2 n' x4 L5 F @.DrivingHome := true;7 z7 ]( C5 E( m$ d2 Z. L
end;4 J* H3 O5 A a; F ^) b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ O& h. U6 ^8 o) I9 N1 H: B
part := @.transpOrder;
* d h# W0 D0 h# w" O part.move(@);-- load part
* l7 W4 N2 S% q" ]3 k( {% u9 Z9 ^9 P1 ] @.CurrIcon := "load";
8 _% p3 o L7 g% s. L GlobalDistObj := part.globDestination;
) D( W) F+ Q* X3 {4 C assignLObj := rgmanager.rgAssignL;! c4 ]* {, A; g( @
row := assignLObj.getRowNo(GlobalDistObj);5 P$ T3 ^# A4 f, q
if Row = -1 then -- since 70
: v1 g& d ~9 E0 ^% G% f+ _ if lan=1 then
5 q" c6 K$ _$ d. D* ~1 M! W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 u* j+ d' s7 e5 f; D8 t
to_str("in der Andockstation: \"",?.~.name,"\""));
: C3 H) Z2 s- e else
/ \' \" f( V0 O" e5 x( j) z) I( E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 I% N2 Q0 j" N# |8 N, [
to_str("in docking station: \"",?.~.name,"\"")); 2 D4 S& E* ]5 r7 c
end;7 R1 C! [: H& V4 J6 O) i* k1 A
else2 w7 f C) Q: d) g, x
@.Destination := assignLObj[1,row];% n: `* }9 O. b1 Y/ } Z7 J: u6 L) b
end; & b, X8 P+ c$ x) ~
newDirection(@);- O+ B, [3 _/ z9 x9 F+ D5 f
@.HasOrder := true;3 R; }0 y6 L w6 J
end;9 {5 f8 E6 f% B
end;
! [2 ~8 H' K7 _8 E' X0 @; Hend; -- of the method
8 k: n) U% b: F2 E* t |