/* called by: entrance ctrl of the object 'track'% d4 j+ u- B1 t' ?3 [* a, s
*/
1 D( t; \4 E9 eis
r4 x0 u" u0 u/ y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ i, F7 I- i' h, J; [) r* Hdo [% W; J4 h+ K# v5 B
Lan := rootfolder.Internal.Tools.AOLlanguage;
9 ?! v9 s& u/ \ if current = @.Destination -- else return' }9 M$ I2 T R5 V) R1 ^8 U1 b, ?3 u
then
2 ], V) o, e1 c! G @.Destination := void;
6 c2 ~ G" M, ]$ N# m if @.occupied then
+ u# ~7 T1 V9 u. e+ S0 X$ x part := @.cont;5 W2 s' u; A1 z
@.transpOrder := void;
* v. l+ p! {9 a" l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& ?7 ~% [. L3 o$ { @,root.eventcontroller.simTime);
* N" V3 ]8 v$ i8 v8 G6 B" } @.HasOrder := false;
$ }& V7 N' k0 F6 k; J" q* e @.DrivingHome := true;, q" I5 E, [& T: C
rgManager.tryToStartTransOrder;
) z0 Z# `* J o' E5 p8 ? if @.Destination = void) e7 u& n+ ]! Z
then -- no transport order for vehicle @, T! D0 R6 U8 L( U$ d6 S
@.Destination :=( C! p/ `! V0 ?6 e2 D( m& F& |
rgManager.nearestFreeStation(@,track.~);
, I+ n; e# Q; k6 F- A; g newDirection(@);
" M: s! Y4 t0 u* k+ i if @.Destination /= void then0 D8 V$ D+ ]' _0 A$ d6 {
@.Destination.NumReservation :=. [! Q6 J; a0 S3 [- f5 U
@.Destination.NumReservation + 1;" l& `2 i! ]8 C' @ P) t+ I
end;
0 V, t; K% V( ^* R @.CurrIcon := "drivingHome";
. T, S( r7 z! \! k0 A3 a @.DrivingHome := true;" i5 b& [0 p6 F2 j1 [, l
end;
) w! ~4 G$ h/ o, C else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 t# d6 G! T4 ~6 G$ H$ t' u
part := @.transpOrder;; w* D8 z& z, \$ S1 Y# {: e Q4 q
part.move(@);-- load part
2 m; j0 N8 [- Y @.CurrIcon := "load";! O0 B" t3 ?+ F, v6 M
GlobalDistObj := part.globDestination;
0 A. P# R) D2 u7 A* _5 o' Q8 S' z assignLObj := rgmanager.rgAssignL;# d Y+ N$ Y& a; Y& ?$ m2 {# F
row := assignLObj.getRowNo(GlobalDistObj);
+ e( B' t- E& W+ d0 d if Row = -1 then -- since 70
- E6 r0 O A) \- {' M if lan=1 then
4 ]0 S' m# H: D3 h5 {2 n7 r2 W promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),* K" t/ K( E9 f# z
to_str("in der Andockstation: \"",?.~.name,"\""));9 h% a% y& I5 y6 l; U2 s% e9 g
else7 Z. k6 D+ \( U
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; x1 x% a$ x. g# J
to_str("in docking station: \"",?.~.name,"\"")); * k6 ^/ Q! g% E- M" S) U
end;
$ N+ P7 H1 M- X2 R A* ~ else+ Q+ N5 u) G& V; C+ D; a+ V
@.Destination := assignLObj[1,row];% A5 }: T+ X) g
end;
0 b% c$ ?7 h/ P- s1 y4 p3 f newDirection(@);8 M2 q( A/ P e
@.HasOrder := true;9 J5 a; q- Q3 i' D( ^# ]: E" u
end;' j" L6 T9 @) e7 }
end;
* e: t! E" b( Y9 Yend; -- of the method
/ i) X, ~! s, ?4 C5 s- U ]9 r5 A |