/* called by: entrance ctrl of the object 'track'+ o. Z! V! F$ V E& o
*/$ m2 f* W; n& V- D# v: A
is
7 J* `2 P+ o' U: Q; b7 f$ F3 g part, GlobalDistObj, assignLObj:object;row,Lan:integer;% a6 h4 i- D# K" }" }
do5 D& r+ H K! ]6 d
Lan := rootfolder.Internal.Tools.AOLlanguage;, m; g3 \0 V& O& x- i% r
if current = @.Destination -- else return
- s$ P, A8 H5 I; R9 f4 _2 ^ then
1 \8 ]1 y6 @; n @.Destination := void;
* R9 {& V0 u6 z8 \2 m if @.occupied then
3 E- E- N& _7 |9 |/ o1 P part := @.cont; S6 N4 h4 }' g p! P' `
@.transpOrder := void;9 z4 _3 a$ E" q* g$ S. ^/ a' [$ G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! |5 w; @! j. x; r7 ?
@,root.eventcontroller.simTime);+ S) ~& G' ^0 h. s
@.HasOrder := false;
9 I- q- \7 B l/ H' ] @.DrivingHome := true;
& z/ e+ N1 {- t+ ^ rgManager.tryToStartTransOrder;
+ `. j# N+ n4 D" N8 G if @.Destination = void
( |$ A/ H: u9 W7 }( B then -- no transport order for vehicle @, Z4 G( A' e! [" W1 N; C
@.Destination :=
. Z7 Z* x" [* C+ E8 p rgManager.nearestFreeStation(@,track.~);8 J6 x8 T0 v7 Q7 ]
newDirection(@); - {1 E- [4 ~- g8 ?7 C
if @.Destination /= void then$ H$ b6 h& F8 E, T7 H
@.Destination.NumReservation :=! m' b9 h9 L" l0 L+ k: B
@.Destination.NumReservation + 1;1 S. Z2 w$ }2 {0 @3 {" B/ z: X- n
end;0 O. L) h [& n2 G* U2 _' `
@.CurrIcon := "drivingHome";! o( d) H5 ]( l9 k& G$ Q( `3 T7 h
@.DrivingHome := true;
2 y. n% c/ p5 O8 W end;* F( Y# R) Y) c) }% C m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# v8 F1 m6 E3 g! n+ { part := @.transpOrder;
5 h# Z: O( b" E6 Q. O3 p( l4 S part.move(@);-- load part3 l% u1 Q% W7 l, E8 U
@.CurrIcon := "load";
7 f$ ~3 u7 j3 O, k$ I4 J GlobalDistObj := part.globDestination;+ K1 K; p# h8 ~5 N" o/ i- m2 ~5 y
assignLObj := rgmanager.rgAssignL;( ^5 J; X. t9 P- N
row := assignLObj.getRowNo(GlobalDistObj);
- j" w2 O" [: ]9 Y9 ?" } if Row = -1 then -- since 70
. k% j1 ^ O5 m3 h% b6 `0 [ if lan=1 then7 M! \4 m& H0 e- h2 H' m& R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 e* T7 \, J7 ?1 M to_str("in der Andockstation: \"",?.~.name,"\""));) x+ Q7 C) E: P0 Q, r/ Z a
else3 c4 C7 e3 R5 }" Q G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 }0 R2 l- \- N
to_str("in docking station: \"",?.~.name,"\""));
7 p# I$ a5 d: G- m1 B4 H& U end;" V! K. Z. r( |% V# I) W- A
else
1 w% `+ ^7 p. V' t+ q" D @.Destination := assignLObj[1,row];5 r# H. \1 U' |& u' ?% n
end;
5 k/ z) n- B; c& K$ {8 Z6 L, ` newDirection(@);
3 D3 @# b; P$ r, Q$ w @.HasOrder := true;( [+ z @9 _. z1 I6 H; v
end;
7 i+ D; W; m, n* [+ Q end;% [' }) ?! A! t& h7 W% O
end; -- of the method z* {8 T% C* b
|