/* called by: entrance ctrl of the object 'track'
; z1 l4 Z8 T, p2 O4 S*/
( h. I6 P2 _7 B( Kis& D7 } b0 j+ ]) n
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
: O# B! ]* W: |$ F/ [9 s: w/ Ldo2 q8 L {9 e- C/ T- p+ r
Lan := rootfolder.Internal.Tools.AOLlanguage;
# O& Q% w7 M$ B if current = @.Destination -- else return1 n# s1 Q4 C' w F5 G4 A
then% @0 W8 f- u1 w$ n& z
@.Destination := void;
) I; `) T5 D; c if @.occupied then
4 ?5 w5 h: H. E( j% c ^' y part := @.cont;
& ^) Q* E$ `# g9 f: P @.transpOrder := void;
* o1 N: R) I9 K* R+ { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) y7 D( K6 o7 z/ Y
@,root.eventcontroller.simTime);# h- @# ^( L \8 `9 p4 w( ^4 {
@.HasOrder := false;
7 k3 e1 r S: n* f! H# N% B @.DrivingHome := true;
$ `$ D& i9 T) O( B& T1 s/ i rgManager.tryToStartTransOrder;7 u( ^6 r' i7 r3 h B$ N
if @.Destination = void
6 p5 b( {4 `2 h0 y8 h" f( d then -- no transport order for vehicle @ U0 j* e! M- h, ^
@.Destination :=
* k& i7 {' Y# |% Z: V rgManager.nearestFreeStation(@,track.~);
) _' q/ t4 @! }2 W: V newDirection(@);
/ Z8 }+ p6 w5 _$ ?& t$ Y if @.Destination /= void then
- U: @; d6 ?1 j: _ d/ O @.Destination.NumReservation :=
2 L3 ~6 P9 P! H( u! ^ @.Destination.NumReservation + 1;
, \- r( Z2 R1 l end;
; ~! A' I7 n$ v9 w P/ B @.CurrIcon := "drivingHome";' j0 p2 a% i% k
@.DrivingHome := true;
( Q5 T0 q5 t W end;
$ C* r l4 a! |8 N, ?8 h else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 C& Z$ x* r" U( ?# D; q/ a# w
part := @.transpOrder;
( n$ C: q+ Y9 w7 | part.move(@);-- load part& A! A5 C7 C' O _
@.CurrIcon := "load";7 P( T9 I' G6 y! l4 ? m6 k" h
GlobalDistObj := part.globDestination;
6 e3 p6 Y" k( g4 i" \+ o assignLObj := rgmanager.rgAssignL;
; \& i, D, ]* `: m7 V! a8 o7 a7 Q3 M row := assignLObj.getRowNo(GlobalDistObj);6 i, p/ H1 q* z! e1 D& M
if Row = -1 then -- since 70
+ T9 a' k" B4 X F$ v0 u if lan=1 then5 Q W9 V- n: B7 M& X* x. Z) g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 J. T* n( A# X: X% {
to_str("in der Andockstation: \"",?.~.name,"\""));5 D1 D2 D$ |/ a
else
7 x: H2 T( d- k/ a0 a: `6 v, h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 K" }& ^! M* r& E1 G! U
to_str("in docking station: \"",?.~.name,"\""));
! W' T0 q* y# A7 p5 s t0 ^ end;; t# O+ m8 X2 q) }# d' W' `% Z
else2 l" H6 L0 E! i( \. j
@.Destination := assignLObj[1,row];/ Y- Z. q% K9 x1 C2 Y
end; ) a" I: A/ Y$ X5 Y
newDirection(@);
2 n0 b8 r8 d1 }9 D @.HasOrder := true;
X6 H/ V' m Q4 ^; ` end;+ m& J( s: p+ f+ K6 ^, P
end;
" p! Z% F8 u1 t9 e- y0 }+ z+ Bend; -- of the method9 [3 m# X* m$ r. `. y* M
|