/* called by: entrance ctrl of the object 'track'
, h2 u" B: U6 P1 R" G# _' A5 ^*/8 A2 L6 F1 a7 E2 H2 J' R7 V1 Q5 B
is
- c* U' {% a' }2 J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
t9 N- ?( h K4 P. L" ]- ~$ u Rdo
4 h3 c8 z0 V( l- r; C& i8 i$ x Lan := rootfolder.Internal.Tools.AOLlanguage;
, b- c% r U. O, t if current = @.Destination -- else return, W! W) x/ h: p4 l, Q5 C
then
) Q# A) S- T; B8 Y1 g- n8 l g: w+ N @.Destination := void;5 B0 [0 @% _+ d' U
if @.occupied then
$ i) q7 t/ ^3 X3 F3 B# U part := @.cont;* i2 Z: S0 U* h) `$ w6 ]2 x
@.transpOrder := void;4 t/ c q1 O1 E. I1 G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,: Q+ Y. B/ Q5 J. |. m# y0 x
@,root.eventcontroller.simTime);* y" u- N2 u' J8 F3 i
@.HasOrder := false;
2 ^4 J n+ R; j! ~: C @.DrivingHome := true;
$ j) S/ e8 @' P rgManager.tryToStartTransOrder;
- ?. J- b! I$ `) N+ ^, y$ ] if @.Destination = void
4 K! A. b1 g) [0 r then -- no transport order for vehicle @7 b# S( W+ G8 W4 o
@.Destination :=
% T6 @! x+ J) ?0 v- I8 G! K rgManager.nearestFreeStation(@,track.~);- D1 R# N" d' R7 K9 D5 b
newDirection(@); ) O6 B, { \6 C
if @.Destination /= void then# Z. W$ W$ w( f, N) g
@.Destination.NumReservation :=
. Q" r/ G- k' n! O! @! H @.Destination.NumReservation + 1;* A; b. I( K' V+ B1 `1 C3 C9 b
end;
_! t, G4 x9 O: T- h4 v+ _; n& P @.CurrIcon := "drivingHome";
* j7 S+ R# J8 a( R @.DrivingHome := true;; t+ ~ Q- _) ^9 C6 L3 u- R# ^; J5 {
end;$ S( K" W4 [; g$ i: n: V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ i0 n9 f. M* k- w7 b w( J
part := @.transpOrder;
; ^& Y$ c! w7 Q3 P! c! x part.move(@);-- load part1 o' E2 i, k$ ?. t
@.CurrIcon := "load";. p8 c7 G7 T2 W6 }1 y
GlobalDistObj := part.globDestination;2 o* f, x- F+ U* X* e
assignLObj := rgmanager.rgAssignL;
! h( l8 {) F- x2 s- l* X) W row := assignLObj.getRowNo(GlobalDistObj);, r3 q7 T9 T* p
if Row = -1 then -- since 702 A, }/ c( _6 O! ?. J5 J# H
if lan=1 then
0 u" h/ L0 d4 z ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
2 A" z' Q' p4 R4 @& R to_str("in der Andockstation: \"",?.~.name,"\""));
* {3 p" ?. B$ D/ n5 ~* n7 ^& D) v3 ~ else
) k: u: U3 u1 y \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),: H# f3 ^+ p2 c* n, T+ N$ P
to_str("in docking station: \"",?.~.name,"\""));
, }0 U2 M; Y! g. p7 v9 f& P end;
5 t% X9 L1 p0 O else3 U8 b1 r4 K' p. }4 k* c" X) \& u2 P
@.Destination := assignLObj[1,row];
( D4 |7 v' ]* ^# `) v4 I end; ( c$ w S' g- W1 ?9 S
newDirection(@);3 B: n- O! f4 K
@.HasOrder := true;
+ j+ o, F3 D5 u; A6 `& e7 q' @ end;
1 g: H% \: O- r0 {9 n3 B) o end;5 q' |9 k, D5 V7 f, z2 n
end; -- of the method% y: w+ O- P" G: _7 R
|