/* called by: entrance ctrl of the object 'track'% S; w5 q4 V( E4 ^( Z) `
*/
& o! h( ?0 H8 d+ M' w; y# Ais
! n+ o4 y9 |- F, F part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' b+ u/ e% u) e( Tdo
. `3 b+ A% L: Y i" Y Lan := rootfolder.Internal.Tools.AOLlanguage;
. ~- X. f+ ~: r/ A- E, U5 ? if current = @.Destination -- else return/ W9 v; h x: D% U2 x& ?8 _2 j5 c
then
6 T4 o( ~) O7 L3 V. r2 M @.Destination := void;
7 Q# u% i( D' U" ` if @.occupied then
5 i$ x5 R6 x. ?- x, F part := @.cont;4 r1 J+ x. s# U. A8 \. g( u
@.transpOrder := void;4 H5 U- K2 e6 [3 q/ W0 F8 a. X
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
U( Y" H( p- B @,root.eventcontroller.simTime);1 l$ P& }8 |" }! O3 K
@.HasOrder := false;
- d& W9 _+ D0 ^( X! r) P0 [( o @.DrivingHome := true;) l/ q% N- d5 d
rgManager.tryToStartTransOrder;
5 I) b' x9 s* {. z if @.Destination = void
* S* r" _7 v2 z: |8 C then -- no transport order for vehicle @
- C* U; e# _1 a0 Q) P' E/ o @.Destination :=
2 F# k( _, C9 ^; @0 U# Z3 o0 Z( p rgManager.nearestFreeStation(@,track.~);( u$ q3 e9 s7 a$ p" b+ G2 | G
newDirection(@);
9 H; w4 M4 x0 [0 J if @.Destination /= void then$ o( {. y: J4 o8 t6 q
@.Destination.NumReservation :=
& O7 w$ U! q) x @.Destination.NumReservation + 1;
# @7 q! @) \ Q. P: S end;
- V3 D! D. |6 q @.CurrIcon := "drivingHome";
' w: q( j- `( n9 v6 T( u @.DrivingHome := true;: [1 Z# }* d' d3 {
end;' S, G5 z' n U7 Y. q, H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# _* ]0 a* U8 k" w% z
part := @.transpOrder;
0 e E2 ~5 G, G8 f+ r part.move(@);-- load part5 r2 M% {5 N9 R+ b& K; B
@.CurrIcon := "load";4 M0 L8 U; T2 I7 p. K' u
GlobalDistObj := part.globDestination;' m# {9 C5 {% V- B8 B
assignLObj := rgmanager.rgAssignL;, T- I9 ^1 D( R6 p. o
row := assignLObj.getRowNo(GlobalDistObj);) j7 ]2 y. o% K$ `" e
if Row = -1 then -- since 70
2 @$ V; k, H+ y5 _1 ?( E2 W if lan=1 then$ r# s1 U( {# O: U7 k% |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
# o6 b. ]) {/ n. y3 j to_str("in der Andockstation: \"",?.~.name,"\""));$ l7 Q J/ R+ ?, G1 A( V# E% |
else
5 B! c* K9 `6 t; M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# i, S& c' _/ w to_str("in docking station: \"",?.~.name,"\""));
* P8 B# Y* {9 w, C% C g end;2 ]1 b# j/ ~1 p( W: R2 p5 W, W, f) u
else, n* ^$ H$ u# N- E7 x4 t% V
@.Destination := assignLObj[1,row];
2 c" U& N- u9 Y$ L* N end; ; z. a8 f( q9 z2 _7 {5 S
newDirection(@);
# ?( J! m1 j# F+ B @.HasOrder := true;( g2 U" y3 J# t1 _
end; W; ~" P# z! E9 `
end;$ q9 W( j' v7 x# `1 O. u& P& ~
end; -- of the method
. n3 |' h5 A6 O; k9 i+ \" X3 Y |