/* called by: entrance ctrl of the object 'track'
. U0 @ Y* m. W* g9 O. U*// B$ ^" }9 B9 c! c! f1 B2 R7 x; o
is% t4 b; i7 V" T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;" {/ E' d. X6 c6 Y5 e
do% P" i% ~; j, j* D8 O
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ {- D1 m9 j; G3 l' i1 N7 P if current = @.Destination -- else return
% c4 g q/ V) l- g2 e3 ?* |6 F1 k then
/ Z, ?/ n/ K! s, K. r( S @.Destination := void;" r5 c) t. ?1 S4 Q4 ^$ l
if @.occupied then2 ]) ]! \: U6 \
part := @.cont;1 G7 [( c$ r7 G3 w) b( y
@.transpOrder := void;
$ p" z6 m3 C, ^; p- M part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, W6 N' O/ ~+ F Z4 d7 Y
@,root.eventcontroller.simTime);) {* G: ]: K: A$ F/ v
@.HasOrder := false;
$ t8 b0 x, R5 A2 v; p9 U G @.DrivingHome := true;
! I/ \# ~) a+ S+ x9 Z rgManager.tryToStartTransOrder;! W+ X2 Q/ i% _2 _3 g
if @.Destination = void+ ]& w0 M4 Z: }( r1 p
then -- no transport order for vehicle @$ B! I) R5 ?* M" c4 E F
@.Destination :=
. c1 H: l+ [* K5 c6 c+ I0 C+ ^ rgManager.nearestFreeStation(@,track.~);+ o1 R1 f1 D6 M% ^! I3 P; n3 F
newDirection(@); % K; J# n e- O% k
if @.Destination /= void then# `0 t2 e& h# N6 _- ^1 r, \. }; O
@.Destination.NumReservation :=2 [1 [! y- p" N: j! R
@.Destination.NumReservation + 1;5 I0 T. Q' D# j0 Y
end;( b3 ? W) p* ]7 l7 \8 X! E# w* \8 r
@.CurrIcon := "drivingHome";
+ \/ Y5 X2 P5 Z: |+ t6 m( S( H @.DrivingHome := true;
# y! u# _1 w+ h+ P( q end;
% L5 m* R/ J$ J5 n, T; d% W else -- the vehicle @ is empty, both vehicle and part are in the same dock station* y$ a% D R$ e- c% n
part := @.transpOrder;
# U+ ?+ n. K5 k8 j+ A+ @ part.move(@);-- load part
/ K$ c, P6 J8 u) ]+ a( ^8 K @.CurrIcon := "load";
* F) t% t+ X: P GlobalDistObj := part.globDestination;* O, R5 s. H' B& z+ d/ p8 G6 I
assignLObj := rgmanager.rgAssignL;( @; K& [ q' {0 h
row := assignLObj.getRowNo(GlobalDistObj);
( f2 p' X4 M4 W% J if Row = -1 then -- since 70
9 b7 h4 I# i1 m if lan=1 then
. d) o9 \; |8 V. @ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 ~( I0 n0 c2 _1 E' @8 n: k
to_str("in der Andockstation: \"",?.~.name,"\""));
: j7 L! |5 x" @0 i4 R else, G7 [! \! N. c6 ^2 g. g4 X+ H
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 z7 ^ q. L" ` to_str("in docking station: \"",?.~.name,"\"")); % C- E" t& f0 C: C
end;5 J; i/ p3 w p
else# N$ b+ }! U* i& e
@.Destination := assignLObj[1,row];3 m1 V# l! W5 z" v2 _& z( k
end;
% K/ g2 i% U" k* @9 @9 l newDirection(@);# { W3 T# T, C- z0 [! A; [+ d
@.HasOrder := true;: y% C+ H2 }9 ~, U( n0 p
end;
: p& W; k0 F. E6 |% X7 y end;/ \( o* x) F+ T# z3 R, b
end; -- of the method
8 r4 q6 [0 h; I& | |