/* called by: entrance ctrl of the object 'track'; e& N m. s: C. G' H
*/
7 M2 Z1 k/ P7 O. Q' ris9 {; t8 y# X# E1 p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! A* n3 O+ `. d/ A: S6 {do: s( l0 n+ o" P/ h3 n& C1 s8 {
Lan := rootfolder.Internal.Tools.AOLlanguage;
" J) {' c0 t5 v+ Y if current = @.Destination -- else return
: C/ o' y5 T! k8 B1 I! t then& @; @3 \6 J3 L$ o/ D
@.Destination := void;
/ T6 R4 d- R }$ j if @.occupied then+ B6 U ?. X9 a- D' F
part := @.cont;. J0 |+ ? x" f/ ?; x$ l, s0 \( C
@.transpOrder := void;
) \1 r' `# l$ K$ o$ [! a% a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! T& ^! _ l2 X, `) N( k
@,root.eventcontroller.simTime);2 @' ~& l9 Y" ?
@.HasOrder := false;7 {7 j- S N6 K `5 o U
@.DrivingHome := true;6 R6 P% u# \- G% i( m& ^
rgManager.tryToStartTransOrder;/ k. h* }) d3 n) U, @* [/ w2 E
if @.Destination = void
! q: A/ B0 J* j& U3 g/ r. T then -- no transport order for vehicle @+ l) g9 ~0 ]+ F, T$ ~
@.Destination :=( L6 V$ _; ]+ P1 R- o- i# D) X
rgManager.nearestFreeStation(@,track.~);/ b5 {& z B* x
newDirection(@);
7 L# j N9 k; c$ ^2 @+ d6 @0 t f$ D& a if @.Destination /= void then
! J6 {6 d$ ~& N1 H# C8 _, D @.Destination.NumReservation :=6 _" l: b9 H. i; l8 A2 G1 `- a( m
@.Destination.NumReservation + 1;, _" q9 ^8 k4 W( _0 [* C
end;4 g: m" L6 c1 f
@.CurrIcon := "drivingHome";5 n% ?9 j4 N0 A! [/ w9 ?
@.DrivingHome := true;3 r& Q: }6 p% O; Y
end;
7 h- O1 h2 @' Q @# i else -- the vehicle @ is empty, both vehicle and part are in the same dock station" h" x& P+ M0 y: q* n! f
part := @.transpOrder;0 V% z4 w: _, d2 q {+ |
part.move(@);-- load part" ?1 f. K+ z0 r
@.CurrIcon := "load";
1 ~7 @) A: V% C GlobalDistObj := part.globDestination;- a* q* K! {% A2 e/ D
assignLObj := rgmanager.rgAssignL;$ M1 y* C" j+ i
row := assignLObj.getRowNo(GlobalDistObj);
% A: n) y: ^. s; w0 g0 @ if Row = -1 then -- since 70
$ X7 L$ O( b O/ B) q& I, H if lan=1 then
( H4 ]+ {: D( u promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ f2 }+ y E3 @4 i to_str("in der Andockstation: \"",?.~.name,"\""));
" {0 Y* i" A& E else
! P0 X& q# A9 P2 r$ i2 H* {! \' T+ F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 Z8 B8 e N0 s# c! k to_str("in docking station: \"",?.~.name,"\"")); + ]" y! b3 K# f" y! D
end;/ X/ L, ^; _0 [$ b
else6 U W7 L& u" I+ N
@.Destination := assignLObj[1,row];
" {: L; o! T0 ~ end; 0 T7 E8 q' P4 a/ G# h# y
newDirection(@);. s0 H$ C. u# e9 U8 s$ [
@.HasOrder := true;7 S# _% y6 j% ^ x
end;+ v9 b' f% E3 x
end;1 j. S; h: l+ N L. e$ N! o
end; -- of the method
- t- g9 T- |) z, D& b2 ~+ @ |