/* called by: entrance ctrl of the object 'track'
( L. e- h, W* }8 ~2 B' y& o*/$ K6 J4 s6 ~, _+ Y6 S
is. r) [3 u6 |% \! E9 j
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. C$ j9 r6 ~5 X
do# ^" d& n0 i" _' T% H
Lan := rootfolder.Internal.Tools.AOLlanguage;- W$ z B0 k; V# }0 l& T) U1 S
if current = @.Destination -- else return
( H& q. }% }+ w1 I @4 Z, b then2 F% X% w2 J* }: d8 ^/ D
@.Destination := void;
3 b6 }* K( ~( U& L; g( T if @.occupied then
0 [. D9 A3 _7 C& f2 g6 a part := @.cont;
0 s( Y( o# L1 d" H( } @.transpOrder := void;, s3 K S6 d. ?4 p2 R
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: l8 ] V6 A3 E, O' i8 v @,root.eventcontroller.simTime);4 A6 w) g$ e) G" V9 q) P
@.HasOrder := false;
7 y0 i; u0 f+ J. w* l" i @.DrivingHome := true;8 g: O/ z ` d& W2 A: e
rgManager.tryToStartTransOrder;* }: X1 J+ n6 y d) G8 B
if @.Destination = void B# V Z8 p7 h: R/ u; ~
then -- no transport order for vehicle @
, A2 g2 K5 w( z% H: \/ X. L @.Destination :=3 B9 ?9 {4 K1 x3 l i' v
rgManager.nearestFreeStation(@,track.~); H# _3 Y$ D% H; O% i' a
newDirection(@);
% x2 m7 F$ N4 E4 @& ~* W/ j0 \, ^ if @.Destination /= void then
& ?" k# Q# j4 o @6 D @.Destination.NumReservation :=# Y7 q8 P7 }9 |4 ]4 W' T/ m0 R
@.Destination.NumReservation + 1;
" B8 j/ X% `- S; q2 z! E( {, o end;
, m" h: i; z' }# a H) g4 B8 E @.CurrIcon := "drivingHome";
) ^" }7 |6 L4 P8 M2 H5 H @.DrivingHome := true;
K5 o& R, S: I* j end;5 Y& G9 h6 E5 V) W" b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station1 |: F: R# z1 U% G3 ]+ Y1 U
part := @.transpOrder;
, V. l$ n5 ?* W# _8 p! I/ c9 a$ H part.move(@);-- load part: v! f% m; _8 _! l
@.CurrIcon := "load";. a# W- v- l/ ^! D8 ~& r
GlobalDistObj := part.globDestination;
( W7 A1 ?# Z! h" `5 u: B assignLObj := rgmanager.rgAssignL;
( J* {4 O$ U/ t1 V+ c, [5 \7 o row := assignLObj.getRowNo(GlobalDistObj);, q0 s' d0 }; H) ^: ]/ F
if Row = -1 then -- since 703 Z Y, x& H' ?5 v' X, ]: I
if lan=1 then
) k' V$ {9 }4 i# R# Q" @3 T promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ ^+ E. H5 q7 F1 z3 O! O3 Z4 M8 E8 h
to_str("in der Andockstation: \"",?.~.name,"\""));
, T t& E. o% e# n3 s( Q/ {8 r S else
/ k4 T% c2 k+ P( B5 f c z promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 Q5 z" H" Z5 \" o/ }; \0 j7 A
to_str("in docking station: \"",?.~.name,"\"")); * F. ~) ]* K( H# v4 z
end;; m1 ?7 h1 T, [7 E- R, \$ T
else
3 ]( e% H6 k# f) b( q P/ x, G @.Destination := assignLObj[1,row];
$ h% u$ ~# D# F3 p& g; N+ t) [ end;
b- @2 |) Y6 l2 j newDirection(@);
0 o0 \& d" ~( W& u @.HasOrder := true;
- o, A) V* K C end;
' Y* H$ m8 p$ {: f. ^! c3 C end; _6 t! V7 f+ V
end; -- of the method
4 ], S: I8 i" C3 }' k |