/* called by: entrance ctrl of the object 'track'
3 i4 x4 u4 I% S' M* w6 Q" `2 [% i; h, E*/
( t. M) Q) @3 [& G% Dis/ e! F* x9 F4 A9 x! N4 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;; n: [* q( B( Q0 N
do
; F B' a# m/ y" Z0 w Lan := rootfolder.Internal.Tools.AOLlanguage;5 a3 g2 o! \8 t! K% O4 G% O
if current = @.Destination -- else return/ R5 R' C' L" c: U! |! x
then
( l4 E1 q* H) j' N% C' F! k E @.Destination := void;" m b: h- X8 i: _
if @.occupied then
* l& p B' \! v* Q part := @.cont;9 b6 N. h4 f l3 m# V
@.transpOrder := void;
1 l. C# G2 a& r* e( A; a# a: b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 j# M8 [7 l* |2 K* b Y
@,root.eventcontroller.simTime);
' h/ ?3 H8 g. s, @/ n. F# r @.HasOrder := false;
9 C( j, l/ o5 W# e3 Y# y! D: q @.DrivingHome := true;
& ~! b; Z; \! k7 \, r0 b rgManager.tryToStartTransOrder;9 q) }5 \1 u4 @# [+ q: G
if @.Destination = void+ A7 l/ M& f9 K8 o6 s! f
then -- no transport order for vehicle @. {3 y0 |) K) Z% K8 p
@.Destination :=' D6 x, H0 X) b7 Y8 u1 \
rgManager.nearestFreeStation(@,track.~);
$ I1 O- k. V/ @) p. e newDirection(@);
3 ~$ A( O5 F+ c5 {! @) t2 U j if @.Destination /= void then: u O" Z2 n# l* Q& C
@.Destination.NumReservation :=
7 N2 j$ O( \8 X/ @: x @.Destination.NumReservation + 1;
" @! c* Y; X* i6 _! ]4 _ end;9 C8 S3 {( u, i- i/ M
@.CurrIcon := "drivingHome";
$ [* X8 p" E5 d @.DrivingHome := true;
( L$ W5 e+ Y. H' a& N! h, @0 `7 E end;
2 X: g9 M. Q- W' r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# f1 o, O5 `7 c/ e# d part := @.transpOrder;
8 Y4 L4 r! }3 `% E part.move(@);-- load part
6 W9 t( m( }5 J& g+ n @.CurrIcon := "load";; I* t5 e) G Y/ e8 @4 F6 X4 l
GlobalDistObj := part.globDestination;
% e: h& u- Z. t- f" ? assignLObj := rgmanager.rgAssignL;9 e- s0 {0 v, M2 A7 D
row := assignLObj.getRowNo(GlobalDistObj);
7 x' T9 b8 j1 t* p1 h5 x if Row = -1 then -- since 70. W* _" J, T* L6 Y
if lan=1 then
. D* a4 d; i6 m promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& h, K! N7 k3 k# |$ J to_str("in der Andockstation: \"",?.~.name,"\""));" \8 O$ P+ _+ p1 h
else9 D. O- r; H- X1 H* O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ q- E" W- L) Y2 U3 }, v" u to_str("in docking station: \"",?.~.name,"\"")); 8 L! Q, W" w9 T9 K
end;
; G! Q4 s }: n; L5 {% } else
c" r: `6 u3 u: f% }: G @.Destination := assignLObj[1,row];
+ @; U: c; p4 |( V! b$ l end;
6 G A8 U; w" p newDirection(@);; q1 D0 Z: {& c5 N0 B6 ~3 i" f8 i
@.HasOrder := true;
$ X2 k* H& j9 y: i end;
' k0 {: |% x# G' |- K* o' p3 a end;0 t1 w& D5 ?1 @9 c) Z w" O- {
end; -- of the method
" u3 a5 H Q' U3 w |