/* called by: entrance ctrl of the object 'track'
) e$ `3 Q/ K0 w2 W$ e*/- C+ }9 f1 @( N/ _$ ~
is
7 x! v# A$ B: S3 M4 j$ ^6 G part, GlobalDistObj, assignLObj:object;row,Lan:integer;
3 U T& U- Z2 b" S7 Q- Ydo
9 N" V8 `3 Y8 _ Lan := rootfolder.Internal.Tools.AOLlanguage;! I* ^% k+ r& [+ u R0 i. Y
if current = @.Destination -- else return1 E0 E& `% y. H7 T: G. {( E
then
, u* m' j+ h2 {8 L. s2 ?$ W" N @.Destination := void;
: z6 L& D- F& z" x. }; \3 n/ p if @.occupied then+ Y1 ~, s, z3 K
part := @.cont;' x* M' \( j( N. B( A+ r
@.transpOrder := void;2 e4 E9 F; r. w( j0 F W4 `2 ^3 S
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 [% u0 X8 x l/ f7 w
@,root.eventcontroller.simTime);' b9 F+ T+ Z) Z/ E2 A
@.HasOrder := false;
! O4 S- L$ q6 b, ^ l5 \ @.DrivingHome := true;) a4 y+ N/ L' d6 h# T4 [
rgManager.tryToStartTransOrder;
" W0 ^4 i, o( P, A# K if @.Destination = void
6 B, m7 |$ K% [( C. _ then -- no transport order for vehicle @
7 ^# G! g! G6 V' l2 U @.Destination :=
9 o4 {; Y% P' z+ l6 A# P rgManager.nearestFreeStation(@,track.~);. ` W {& x. U @. [1 v# I. ^9 Z" @
newDirection(@); 4 C; a3 [1 N$ u7 d& ]+ n3 C) M( o
if @.Destination /= void then, |, |, b7 B! a% q! T3 \
@.Destination.NumReservation :=: R* T* l/ P! U1 w5 H+ v. m
@.Destination.NumReservation + 1;
/ B1 X2 a5 H8 b( l; m end;
* J: y8 N1 g4 s, j& G, E1 q @.CurrIcon := "drivingHome";+ d3 J& V% L$ E% _ v0 M
@.DrivingHome := true;! \$ R0 T: N8 M2 X' v5 Z0 I
end;, ]* [/ F4 }* [2 B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: u9 U! I2 {6 a+ A% G- t$ C
part := @.transpOrder;
r, G0 p* y) ]3 G part.move(@);-- load part% _: k. h) q; Y* z- g1 ~
@.CurrIcon := "load";
$ ~$ a0 R- J7 }. f GlobalDistObj := part.globDestination;
5 i' z6 j* ]0 W. p+ ]4 q. H assignLObj := rgmanager.rgAssignL; [3 ?% I4 n, R" b0 C, `! f2 a
row := assignLObj.getRowNo(GlobalDistObj);
& y4 O* \% ~$ N9 c. Y9 C if Row = -1 then -- since 705 W$ u4 t3 V, C1 O; r3 U
if lan=1 then6 x0 L4 M8 L% F& ^+ b) L
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* t# }0 B1 U% D% a" O8 o m/ h8 A- C
to_str("in der Andockstation: \"",?.~.name,"\""));+ `( g: x7 Y* M% N+ A! p
else
8 q) b( d0 Y7 ~ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),9 P! Z5 M" I2 t, w( K
to_str("in docking station: \"",?.~.name,"\""));
. O, S( o/ r6 S5 s1 g( k* u end;
0 }& V: g) y, z9 D0 ~+ F7 m else
8 y; l$ q. f: r+ w @.Destination := assignLObj[1,row];
# P f- O0 T& O) L8 o end;
$ x& Y! j! H) ?: C newDirection(@);: ^" s4 O* h( T$ ]9 H1 ~/ K
@.HasOrder := true;
+ I. O) r; s( o! n7 a, Z! ?3 X end;
. W# _- c9 h6 A' Y! p end;
- P- v' o3 C4 w1 |end; -- of the method) I( N, r! E/ f) V$ d6 H$ S
|