/* called by: entrance ctrl of the object 'track'5 U; V2 v+ ~' U8 N9 Q4 f
*/, i, b( X& ]! a8 k/ W" j3 a! X* E# T& E
is6 ~8 c9 k6 Z/ |- b: _% `
part, GlobalDistObj, assignLObj:object;row,Lan:integer;- S9 ~. A& C$ `5 q# f6 Y
do
( D9 \6 q, g1 x Lan := rootfolder.Internal.Tools.AOLlanguage;
- \5 N, C9 c$ O5 R2 W7 p1 M if current = @.Destination -- else return; ]8 z1 F% j0 Z# B2 }3 F
then
4 g& ?) P1 `5 Q9 u( B5 Y @.Destination := void;) h8 C# i0 K3 f& d
if @.occupied then; Y, S. y: i/ }$ x% \( s, k4 t1 I1 N
part := @.cont;
3 i. w2 U. ^9 b: I @.transpOrder := void;
* x# Z; _1 q/ f) | r5 E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* V/ b: _5 c0 ?. {: D0 i$ u1 x @,root.eventcontroller.simTime);
; h3 x$ }5 j5 o @.HasOrder := false;
7 A6 f- Y0 W8 z; { @.DrivingHome := true;( x1 K' {3 [ }* |" ]- Z
rgManager.tryToStartTransOrder;& W0 \+ H5 S1 r. G) a& e
if @.Destination = void F( x& ^* n& g8 K/ a8 f" D9 x
then -- no transport order for vehicle @( i; A5 J8 u6 z5 t, ?7 p. F) g
@.Destination :=4 i6 d# J& c. ~# q) t" ^$ n
rgManager.nearestFreeStation(@,track.~);
4 p" X5 c: p) k9 S4 x- G newDirection(@); / i* q+ [7 Q( Z: R$ Y# f
if @.Destination /= void then; W' i/ A# g4 G/ m# i6 y) Y
@.Destination.NumReservation :=. D2 U. H9 N$ J% t# C) K' `
@.Destination.NumReservation + 1;; t( @$ R/ l" Y& y0 H
end;
2 Q1 P6 _: Q* ]/ | ^7 M' P @.CurrIcon := "drivingHome";4 e; K3 J3 o, M% S! S9 y5 `+ W
@.DrivingHome := true;5 ~2 D- t% {0 b
end;; R% X7 d7 s" ~& ]8 y4 g! X) }5 v
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& w' v% M2 @, b* V; F3 k
part := @.transpOrder;* k3 V& {$ V M
part.move(@);-- load part+ y. R" ~4 D- ~/ k7 V% i
@.CurrIcon := "load";
! m0 |( S4 K" z GlobalDistObj := part.globDestination;# B; [6 p; p0 Z6 n! S4 w
assignLObj := rgmanager.rgAssignL;0 k1 N+ x5 Z" {+ E7 D
row := assignLObj.getRowNo(GlobalDistObj);
; c$ }; m( ?5 {$ Q if Row = -1 then -- since 706 C; s5 p4 f) a9 i
if lan=1 then. y1 u. p, [& w8 l, n G. o( Y
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 z( p g* J+ w7 m to_str("in der Andockstation: \"",?.~.name,"\""));
, K* c7 l9 _# u3 \8 U else; i% Z4 b5 m4 x9 r& o
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 p/ o1 W" _4 J8 W; J: k8 C6 B
to_str("in docking station: \"",?.~.name,"\""));
) d% C! p3 ]+ n6 z y. Q end;! N# [. ^* i* M. s$ t1 R3 T
else
) o/ ~, O/ |- G J3 K+ B @.Destination := assignLObj[1,row];" x% q% k* c) {* ^7 @
end;
5 r" }$ {- X+ V* } newDirection(@);) f1 w8 \( W7 b( y+ `; L/ D
@.HasOrder := true;- W0 D5 J% {( _! E
end;
0 M- E- {7 }! F; Z* n end;
! p0 l8 J- N/ R5 V. D- {7 i: d3 ~end; -- of the method
, X* ?" s9 h+ @6 y9 l n2 V! r; T |