/* called by: entrance ctrl of the object 'track'; R2 E( E# v( a3 j
*/( H* Q9 V. d& z' ?
is
& M" f5 x! A- M" Y- U( M, C part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 T: d8 {" n' g$ @
do
- Y# d W( Z% c. u+ l. ] Lan := rootfolder.Internal.Tools.AOLlanguage;& w/ M& y1 K8 Z# @# `( T+ k
if current = @.Destination -- else return3 }" {# K2 r9 i% _' ^, ~) H9 s
then/ f* d0 n% N1 d6 Q
@.Destination := void;
" f1 p6 k; L9 ~. F if @.occupied then
3 m1 W: _* ^% ]0 f5 p$ v! F part := @.cont;4 Q. \" x0 B) A& q6 Y4 I8 R
@.transpOrder := void;8 b6 P9 r5 ?9 |6 Q3 d+ d) T
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! O% F0 J V; K9 G, U @,root.eventcontroller.simTime);$ s" Y, D! A! O" }7 h" L
@.HasOrder := false;
$ B9 W% `1 [/ [ @.DrivingHome := true;
2 ]4 K) b: q% B; ] rgManager.tryToStartTransOrder;1 b3 H0 x$ {& S$ F8 R: a5 M; |5 g
if @.Destination = void
: J$ P7 K' y# [6 d then -- no transport order for vehicle @
0 [: o7 R: t$ R- s- a @.Destination :=
( N' v2 f- s& r* a- C9 c rgManager.nearestFreeStation(@,track.~);
8 }& }, V/ C4 C9 p5 P newDirection(@); % x, E9 t) M5 p8 `3 g' Z( q
if @.Destination /= void then8 G) C/ s5 a) J: Q6 I6 i
@.Destination.NumReservation :=
9 v( a' V& C; m. E! ~0 z @.Destination.NumReservation + 1;# a# P% _( A- \0 {. |7 S+ D
end;
; M% j1 ^# _( o1 T @.CurrIcon := "drivingHome";
% n' Q* v6 I2 m+ F2 j/ c @.DrivingHome := true;
- L' L) m; y" d5 J* t' Z3 X end;
5 C: j6 b5 O4 ~; ^ j' V$ A8 _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 j7 g1 Z4 d9 [2 A# z
part := @.transpOrder;
, ?2 C2 k( H1 j. A8 g- u7 [ o/ Y- N" s. x part.move(@);-- load part. d1 p0 s( Q/ u/ ?" P( }2 z" Z
@.CurrIcon := "load";
2 H0 z& V8 S! N3 y GlobalDistObj := part.globDestination;4 i; }1 j3 r1 q+ R, d
assignLObj := rgmanager.rgAssignL;$ B% R0 T; X$ X& I. M7 q
row := assignLObj.getRowNo(GlobalDistObj);
/ \2 h6 `8 U* Z- O2 e* m; z if Row = -1 then -- since 70
! K3 `% b2 J5 f. ^5 @9 A3 x if lan=1 then
/ m* P6 I2 J$ `2 o; g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 r' s2 \# s* y3 O0 X
to_str("in der Andockstation: \"",?.~.name,"\""));8 c* `, Y, w# N. Z
else5 g! y/ |' ?1 A5 J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 Z/ G( ?2 n4 T* Z0 G3 F: H& j
to_str("in docking station: \"",?.~.name,"\""));
! a1 k) O6 z( r, Z, U% \1 V end;
+ c3 H1 @0 O$ F# f0 n1 ^9 _8 V else, \9 h/ t2 Z( k
@.Destination := assignLObj[1,row];; z! w) l6 q8 \! Q" \
end; / J r' i" g- D: ~
newDirection(@);, ^6 w/ P0 x9 d/ t
@.HasOrder := true;
# W8 R( O$ x+ z. r9 ?2 D! H end;' f: `1 G" Q* n& F$ L4 ] i
end;
7 D+ D/ @# Q- R/ d% ]end; -- of the method
, K3 y& u' H/ { |