/* called by: entrance ctrl of the object 'track'( E* ~% \# P$ L' _5 T7 i7 |
*/
; U- v- m( Y1 Y5 d. @& _( Zis7 p# O) ?8 q. U1 E( [8 u
part, GlobalDistObj, assignLObj:object;row,Lan:integer;4 r+ ?; S8 @- a( B
do
& w9 |( C7 D4 D6 i' y Lan := rootfolder.Internal.Tools.AOLlanguage;
. \& }5 ^; {) l if current = @.Destination -- else return2 u6 O8 `8 m: @$ ^/ `: t
then; L5 _$ D7 h* ^! J% C' g* h
@.Destination := void;
4 q! N4 I: e5 ?7 b& A `; q if @.occupied then! P4 k& Q5 s6 T9 c
part := @.cont;
+ {- L3 n! X- M4 G @.transpOrder := void;" S( D0 n$ ~/ }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; S) ]9 U! R. ]* P P- X( E
@,root.eventcontroller.simTime);
9 c% k, x4 S% Y, r* ` @.HasOrder := false;
! g V/ ?" Q* y: L$ n" _# T! a3 z, L @.DrivingHome := true;( z* G2 t2 [% @: N) N H
rgManager.tryToStartTransOrder;) c& A$ b6 }4 V
if @.Destination = void% V' o& x! M" s4 |1 h% }! `; }
then -- no transport order for vehicle @# X% y, r; ?+ W2 S
@.Destination :=
" o, T: [0 t d8 m8 m& Y rgManager.nearestFreeStation(@,track.~);: a* t" L x4 x! M( X
newDirection(@);
" Q6 I2 G% [) E; R" f( _9 Q+ q5 Q; k. r: { if @.Destination /= void then
! N, n" [ \& I6 t( v! Z; y @.Destination.NumReservation :=) e) U) u+ ^: y; H( f6 t, o
@.Destination.NumReservation + 1;
* }+ V9 g: g8 `6 A8 J/ T' y4 H g4 i end;
6 t' s% Q, [( a* M: j O2 b @.CurrIcon := "drivingHome";
2 Z# \ v6 l4 q* U: K; e @.DrivingHome := true;+ G/ S% B, z9 s5 {
end;
6 K' b4 p) Y) B( Z/ ^8 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station& Z* l* Q0 _- O6 @. w' p
part := @.transpOrder;$ { y" u H- }5 }/ ^
part.move(@);-- load part
- ?+ q9 y q: v6 ^ @.CurrIcon := "load";
* C. y }3 t7 A$ z) j GlobalDistObj := part.globDestination;/ h; b% n& W; k# q. C# ]4 S- j
assignLObj := rgmanager.rgAssignL;* h9 q; |3 z" {* E
row := assignLObj.getRowNo(GlobalDistObj);1 w/ F4 Z% [- q9 z, v0 c
if Row = -1 then -- since 70
) w8 ?" d6 M1 w if lan=1 then
& l7 ]! W7 z g+ a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) O6 y- j9 P/ ^; E0 ~ n- D
to_str("in der Andockstation: \"",?.~.name,"\""));
1 ^ {% z Z9 R5 s, k" I* Y else' V' Y5 a/ Y: {$ V1 r( y
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 J' n0 l$ D- I. K: \+ i$ k
to_str("in docking station: \"",?.~.name,"\"")); , K4 P) j( Y7 L: d# Z/ L
end;
& L: R; I0 G! K* i+ | else; `/ u0 }% f" Z8 @* B
@.Destination := assignLObj[1,row];# S+ P h% e9 j2 d8 \" t$ y i2 P M
end;
6 B/ D3 i! r+ f5 j! M6 A newDirection(@);
% x. R: U& M4 M8 A3 Q$ A @.HasOrder := true;
8 H v, a: G0 a1 r. F6 a0 h end;+ U h- `" z% R% Z
end;8 [: X( h9 O" |; a: U
end; -- of the method
8 r# E& o5 n3 f; h9 x7 b+ D# e |