/* called by: entrance ctrl of the object 'track'
3 M+ | b' b7 p8 W& z! y+ B*/0 `7 l& m# J6 R, L
is2 ]4 W: x! Y! U' v. G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) Q3 P8 n9 S }) |1 N, Q1 J
do5 r6 }: z/ a+ B/ y# O' ]
Lan := rootfolder.Internal.Tools.AOLlanguage;, g7 y' R2 f' X% c. K
if current = @.Destination -- else return
% T+ x. E g' [. Z then
9 u4 ~7 A: b( w8 k* h: M- B @.Destination := void;% A, r% r3 C2 ? f- y4 p2 j+ R
if @.occupied then
5 B3 h" v' Z* D- A6 F6 ?1 d part := @.cont;
; J/ h, x* ?& Z @.transpOrder := void;
/ }& G5 m+ y* o- g) d1 M1 m. [. f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 a7 y* v' s1 C
@,root.eventcontroller.simTime);$ Z" N. ?& A; t& P$ A/ ^$ C
@.HasOrder := false;& z0 N% g9 V% V. D) L! O
@.DrivingHome := true;2 Q3 s4 D2 Y, ]2 Z, O
rgManager.tryToStartTransOrder;
1 A, t6 p) T5 ^* c+ e if @.Destination = void, }+ R5 s; M) E K' n$ \* J$ i
then -- no transport order for vehicle @
' h( J$ J- Q( J1 W7 j; O% `: d0 Z @.Destination :=
7 Z* D/ |. P( }1 g) N) l+ C rgManager.nearestFreeStation(@,track.~);% L6 Z) G: }9 [) j$ u* f/ \
newDirection(@); % m, O$ f; r% P
if @.Destination /= void then" B6 A: u/ b9 {2 j$ C6 g7 `
@.Destination.NumReservation :=! W" Q2 C% W# l4 O2 u
@.Destination.NumReservation + 1; D% _9 F2 ?; F2 {" U+ |
end;/ v; d0 N' G) E; ^3 P1 j( W- f0 |
@.CurrIcon := "drivingHome";
+ p( f% Z6 N3 A% O% J9 s @.DrivingHome := true;, q& q8 r( X* j# A. Z2 t9 u9 w7 W
end;
6 @2 g* o' {* U3 o' ?; a else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 z) A6 G3 D) l( c/ q3 P part := @.transpOrder;6 M5 @+ V2 K" n1 |0 {
part.move(@);-- load part5 |, I2 d2 P, o* J
@.CurrIcon := "load";
* o& \* Y8 G4 g; [9 D GlobalDistObj := part.globDestination;4 ]/ [/ U+ l j8 s
assignLObj := rgmanager.rgAssignL;
! F( h. ^) n% a' V7 a% Y# h+ X row := assignLObj.getRowNo(GlobalDistObj);
* Y6 a* z, v- C: C) h& k. C if Row = -1 then -- since 70; ^9 J0 p8 ]7 g7 l. J: I4 z, x2 m) p4 {
if lan=1 then
/ Z- l+ u3 R9 h; i! j% Q `6 Q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 {4 k4 x. n. ^+ L/ V+ }( v to_str("in der Andockstation: \"",?.~.name,"\""));" x- V/ c; S2 X% Z! m- i
else
. f/ E, `( d( b# Y3 L9 j, J! E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 ?8 f {/ b9 Y9 w- n. E* }- H; ?( | to_str("in docking station: \"",?.~.name,"\"")); - v0 q$ x( y1 A' ]! ]5 S, B) @) D
end;1 q" T- E& e$ p) g. T
else
9 Y* h N# X. G6 u8 k9 o9 G @.Destination := assignLObj[1,row];
" {0 l; _' E; i2 J7 |, G end; 6 @# G0 r* b9 a/ G# k
newDirection(@);
0 E3 y& Z" @; }1 t9 P, o. S @.HasOrder := true;
. Y* _* ^6 T( L; t a end;
) y1 V3 B6 }2 k: E end;5 ~$ L7 C( P, B' K
end; -- of the method
/ u; q* y5 |7 \# q9 T8 ~ |