/* called by: entrance ctrl of the object 'track'
% g1 G7 h$ X- h0 v7 K*/
& g v& i: b) J" o! z- Y0 Gis
9 z* r u: O4 \+ Z" U, g& B ~ part, GlobalDistObj, assignLObj:object;row,Lan:integer;: V4 z. g+ ?8 y- S) r8 N
do
) J5 k6 p: ?+ ]' L) |7 n4 H. Q; l6 J Lan := rootfolder.Internal.Tools.AOLlanguage;
5 L; T* D3 M3 \ B if current = @.Destination -- else return. c( J! Z3 H$ F" G
then( [* L; A6 g% ?6 R
@.Destination := void;) j$ a" N; Z, T% ]6 E J5 q9 J
if @.occupied then
' E+ p! z2 D2 |0 i4 K part := @.cont;. u; B) M* T$ X$ x
@.transpOrder := void;
' B8 S( ~& X3 |! e. f* F8 u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" v0 Z" X: U4 m @,root.eventcontroller.simTime);
3 @, U5 S7 o0 N6 T8 X0 l$ W+ k6 y @.HasOrder := false;
* s0 i. o0 A7 I: h. i @.DrivingHome := true;
: p o& p- w7 n rgManager.tryToStartTransOrder;
" K' i6 @0 L3 G' M if @.Destination = void f) O: y5 h, H( ` l I4 ^
then -- no transport order for vehicle @
' @) S! v4 W- P8 }* ~3 a# W$ V; m @.Destination :=+ i; O# `8 r6 q
rgManager.nearestFreeStation(@,track.~);
5 Z# w3 B2 Z; R8 P, E4 \. D t newDirection(@); % Z7 }) t" ~1 e8 q, ~7 A2 f! `
if @.Destination /= void then
9 g, r1 D8 Y' Y: y3 u/ w* q% \4 ?! _ @.Destination.NumReservation :=5 D6 K8 x5 H7 f/ q3 u
@.Destination.NumReservation + 1;8 ]' X* x7 R6 h9 k, @8 N* Q8 ~
end;
" n$ T% |, [) c! f @.CurrIcon := "drivingHome";. c: z/ j1 d- G; {# P
@.DrivingHome := true;
# K( u6 e6 q; @ Q* J end;. |1 L9 H; Y& Y6 M# n5 D
else -- the vehicle @ is empty, both vehicle and part are in the same dock station0 Q6 l/ I9 y# M
part := @.transpOrder;
5 Z/ ~2 [* w3 I part.move(@);-- load part
% d6 f0 g: e" {- y( f1 U @.CurrIcon := "load";
/ J: L+ D9 l+ j; _0 t# i GlobalDistObj := part.globDestination;4 v, y; ]) j; c- N- m, S+ g/ z( K
assignLObj := rgmanager.rgAssignL;% D0 f2 _/ i+ g1 M, T& Q2 Y9 \, e3 g3 `
row := assignLObj.getRowNo(GlobalDistObj);
+ M# |9 B3 v& f: [+ ^; E# r5 W if Row = -1 then -- since 70
1 N. m( L, ^% t& k if lan=1 then* e# D r5 N' ?6 l! c
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ ~* U3 k8 A, H9 G7 Y+ |% k to_str("in der Andockstation: \"",?.~.name,"\""));
% Y) N! ?" P) G else8 d# K) A/ l) w! y/ b5 D4 O' d
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 u$ H' H& ], A- n! c to_str("in docking station: \"",?.~.name,"\""));
7 D+ u* Z" @, t end;; p- V& l, v+ z& ?$ I: `) `
else! H$ X* j) P4 ~3 w, Y
@.Destination := assignLObj[1,row];# U X7 `0 B& G
end;
5 @& k* k2 H( ~ newDirection(@);) h0 o$ v. y8 b8 v8 `( O( y
@.HasOrder := true;
4 s0 P: e7 d O$ g( m- F6 k& O% c* j end;
|. O2 B5 e, k0 g& D end;# o9 r, l$ q' v
end; -- of the method* l2 i4 a" m/ _6 C8 v
|