/* called by: entrance ctrl of the object 'track'6 @; W$ g4 ~9 l
*/- P6 e* I* Y# z
is1 d$ U! P% `7 s3 u0 z1 _& C
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% k5 L* \; C1 `8 ~6 ?2 r
do
- E( i2 [, D- `4 d8 V2 l6 R Lan := rootfolder.Internal.Tools.AOLlanguage;
- {6 `' V: v# ^4 {) h! F if current = @.Destination -- else return
5 @; m! O& M$ a' t2 C6 ?$ X7 v then
- p! j# i/ ~7 f/ E+ o @.Destination := void;
v5 j! e6 w5 a7 \$ f0 j4 x if @.occupied then1 Y: a( C6 \0 M0 X* Z( h5 e# t" a( @
part := @.cont;
+ A' B. a- o7 n; \( b1 P @.transpOrder := void;
$ S8 F" V5 k$ V' ?4 i+ `) M, \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 s# J# T& G3 C: ~3 J @,root.eventcontroller.simTime);$ O8 y& O& \2 V+ Y; y6 f. I6 \
@.HasOrder := false;9 G' {& T' E" M6 {: F _
@.DrivingHome := true;3 v/ e7 g; `6 M( c4 [# |
rgManager.tryToStartTransOrder;
2 e3 ]* ^9 A) O, Z1 a) ^3 p1 t4 ` if @.Destination = void, n- t9 O3 ~7 ?. v
then -- no transport order for vehicle @
5 D, `) }: o- T4 W: o @.Destination :=4 U; r: a' h7 S' K2 W8 A
rgManager.nearestFreeStation(@,track.~);! v: d5 T9 i6 ^* c f0 [1 w
newDirection(@);
: _ ]9 r! {9 ]% ]6 q! M' C if @.Destination /= void then4 J& Z a% c5 ~+ Y' [
@.Destination.NumReservation :=" [8 N' E. r$ X
@.Destination.NumReservation + 1;* T* V g; Y. U( M o r
end;; _: a2 T$ h7 H4 b& N0 c; S) X
@.CurrIcon := "drivingHome";
! U6 l; B$ a9 m: ]* j( W. R @.DrivingHome := true; {' c& r) B m% s: k% L8 o9 o+ ~
end;
3 L; I: J; E: C# s5 I8 I$ t9 O else -- the vehicle @ is empty, both vehicle and part are in the same dock station
0 @8 a% Y1 l; r. n; j part := @.transpOrder;! W+ G0 d7 G. {3 N% A5 V, W$ f
part.move(@);-- load part8 b: [ Q* J3 j& |. m9 x' x+ G2 W
@.CurrIcon := "load";0 z7 g( t- o W2 m* F
GlobalDistObj := part.globDestination;
$ c) L/ B o: p& y* n7 ` assignLObj := rgmanager.rgAssignL;6 \+ A7 s. v7 ?* [" ?
row := assignLObj.getRowNo(GlobalDistObj);
) \3 g! _6 e/ ?/ g if Row = -1 then -- since 702 T1 `- g, c( J3 z
if lan=1 then
3 m" t0 G: R: M promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), L) T+ U# p4 V( g. y' H
to_str("in der Andockstation: \"",?.~.name,"\""));
7 T, V( h1 c8 A5 L. Y; w+ A* D else
3 C" y# v# W: t9 k" ?; `4 Y A5 z7 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: Z& c2 J# Z) q9 I E. ~
to_str("in docking station: \"",?.~.name,"\""));
/ [1 r% }! w" J# o9 Q! m& ? end;
4 s3 [. c* V7 d& Y else5 k& l8 V: \6 v: k
@.Destination := assignLObj[1,row];/ P( s9 e9 S! R( y
end; : ^% B- Z+ t/ u y) A! ~3 L
newDirection(@);
) J6 e; s8 C+ k0 P" a @.HasOrder := true;( o5 U9 o* c" r2 I
end;/ ?) f& n* T) H, t5 |5 Q3 z
end;+ } r3 l1 C, c" V+ }3 N1 P- D, `
end; -- of the method
& u/ d0 O2 W, h/ b |