/* called by: entrance ctrl of the object 'track'- E+ b5 x! Q5 Q! R
*/
0 D! K& t8 U' U/ e7 X& J, |* n6 Vis
+ a. q3 W4 k, {" D% i: x part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ s! a! F5 T( i: W
do8 |; V+ M, M* u2 }
Lan := rootfolder.Internal.Tools.AOLlanguage;. {! ]) c3 e$ s9 Z1 E4 z& I. q% f
if current = @.Destination -- else return1 A- G9 o6 \0 L: L# P; W# g
then
" s" s; b) Y- w1 t1 u% |, }5 ? @.Destination := void;$ B Y4 e C' j, G, }
if @.occupied then
7 V$ C* i, [6 i' x9 ] part := @.cont;9 t# @! ^8 }) p8 g( K# D* D# N
@.transpOrder := void;
5 x9 x9 G9 s# T6 Y' x/ w9 J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 y* S, c1 ^& j* D4 n+ `- d0 p4 ? @,root.eventcontroller.simTime);/ T5 m* i: I/ G% C" j D( F( R
@.HasOrder := false;
( d4 H9 _# K% j1 b _ @.DrivingHome := true;
5 c! _5 k% B8 A: k/ h9 _% G rgManager.tryToStartTransOrder;$ N/ I' ^3 ^6 S5 a
if @.Destination = void7 m/ g, w4 W! z+ U
then -- no transport order for vehicle @& w9 A+ ~- c D0 ]
@.Destination :=
6 {; x4 }% O4 G( I rgManager.nearestFreeStation(@,track.~);
! a: M/ g" ~5 `) z4 H- r newDirection(@);
' H/ w/ ^7 ]* ` if @.Destination /= void then
3 {9 y' h4 w. i* K- O @.Destination.NumReservation :=
: {& H9 J( R* o7 Y9 V& Q @.Destination.NumReservation + 1;$ V4 X5 N$ L' I! E6 k
end;& `! S2 m4 J. F, b; M5 O5 I# _5 g
@.CurrIcon := "drivingHome"; R- k7 I* d+ d& u- I& q2 s/ a
@.DrivingHome := true;
C7 P p0 G5 Z0 O8 x) |: t/ \ end;
' {& C8 m) c$ d2 E3 W+ c9 ` else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ t; z; i! _2 b4 e' c* K/ n2 Z
part := @.transpOrder;) P9 y& a1 W! s' p
part.move(@);-- load part' l# E2 j2 T8 m! `& x0 v* X
@.CurrIcon := "load";
3 Z: Y2 A9 [7 a$ r, B8 N GlobalDistObj := part.globDestination;
$ r) Y# }4 x) f) Q2 Z1 F: w assignLObj := rgmanager.rgAssignL;
* x$ F A( k7 V: U7 S5 j5 B" P% m* c6 q row := assignLObj.getRowNo(GlobalDistObj);
/ Q' W; C z# h8 @1 h8 y1 N5 Z/ Q if Row = -1 then -- since 707 P! f1 v$ C( v8 Q: x2 x
if lan=1 then' ]5 V; F: U+ \0 M' y( d& M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& r8 }5 `& I) S3 p1 `2 ^8 X
to_str("in der Andockstation: \"",?.~.name,"\""));
% R; m3 b% X$ N9 v1 o else
0 Y# r) w; `. @' v6 P+ W8 u promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 ?! e9 H* q- U
to_str("in docking station: \"",?.~.name,"\""));
( [8 y+ q: }: L8 z- N% A% | end;0 Z4 H# f+ U# }" X) n
else
7 f: g1 m+ v4 {$ J3 `" O# @ @.Destination := assignLObj[1,row];
: ~% U% v6 R1 A" O8 \ end;
3 X2 j. P* s0 t' T& {/ C# L newDirection(@);
* a- @+ U7 B, x2 h& V) f5 o @.HasOrder := true;
. r" a; A q% t5 E end;
5 P0 n; i( O! @# C2 ?8 z( g2 L- \ end;! o; u& a5 S2 b5 T
end; -- of the method0 Z: C6 j! B7 {/ y( {; x% n U1 Z D
|