/* called by: entrance ctrl of the object 'track'8 D6 {4 @' e% r: t$ O5 L# B
*/
& A1 z; \% ?8 U/ ^' K/ U9 Y1 Tis
3 i, B# l0 J! E- @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( r9 P$ t0 J d6 U6 |* odo9 G: z3 Q% }. a+ _
Lan := rootfolder.Internal.Tools.AOLlanguage;) _ {* O* l- j1 h) _
if current = @.Destination -- else return
4 x$ q1 G. I! K then. ^) _% `0 I' M
@.Destination := void;
8 x: F* e5 M: e, |' w+ W; F: y/ H if @.occupied then2 L/ {9 e/ Q0 i2 |
part := @.cont;2 l( Y, w2 R8 S/ o
@.transpOrder := void;
$ S( c8 ]* r' D# R$ u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 S; G1 \1 S G' E @,root.eventcontroller.simTime);
, U6 V3 u4 D1 e L3 a: y @.HasOrder := false;) [& t, a$ a5 p
@.DrivingHome := true;
' T% I+ _5 Q( _& T rgManager.tryToStartTransOrder;
7 K( H1 k# P3 e$ V if @.Destination = void! g: H4 g' f/ @2 F
then -- no transport order for vehicle @0 I, Z5 y, Q* x, A$ L1 w, z
@.Destination :=" H S% R/ F3 G1 s
rgManager.nearestFreeStation(@,track.~);! i5 y: h: v7 {* m
newDirection(@);
+ e; l: T# M/ Q. A. N if @.Destination /= void then
! `* t2 l- G9 a @.Destination.NumReservation :=$ v$ [) {( U! M6 L3 ]5 |. D
@.Destination.NumReservation + 1;. I, ^0 J. m% O1 R$ W9 x% o% P
end;5 U; f3 Q6 k% Q- E5 x. Z
@.CurrIcon := "drivingHome";
8 p5 Y% i) w2 p! Z3 V* _ @.DrivingHome := true;4 l6 ]( y8 x( T# Y' y' ]* g8 a
end;1 Q: p9 B$ z1 Q; m
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ h2 O6 I& j4 P2 b5 W part := @.transpOrder;
, a5 a" B e1 t9 U) s part.move(@);-- load part
4 b% y6 R% k( ]5 T @.CurrIcon := "load";
1 l% r6 U( r/ p& Z7 W GlobalDistObj := part.globDestination;) }9 r( W" {* s8 x+ F8 G
assignLObj := rgmanager.rgAssignL;
7 X p" P1 J2 `; _) {. U row := assignLObj.getRowNo(GlobalDistObj);
3 V2 ~+ X6 v: } if Row = -1 then -- since 70, e& c9 d8 r- ?1 h" X. {, z
if lan=1 then; r& |5 Z ~3 ]9 G; ~# B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
/ j% J- O( ?; r6 o- ~4 J; ~0 J to_str("in der Andockstation: \"",?.~.name,"\""));
' S( j) h& b0 z1 V/ }- W8 {! i else
% F2 K3 n; b' D0 q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ ^( P/ G# ]# v1 }2 L) E( P to_str("in docking station: \"",?.~.name,"\"")); ) M# s6 f/ d. p! e+ G% Z- E9 X$ O8 D
end;
" x! X6 x$ L+ C" L else( b7 ?! v' ]1 N
@.Destination := assignLObj[1,row];
5 U' q) n# Q3 g3 }# P% \ end; % Y- v# W' P; Q3 k# s5 {4 K# e
newDirection(@);& b( K% A% n% j p3 W: o
@.HasOrder := true;; q, F! r+ {6 x7 e
end;
# r ?3 u1 b' s. Z1 x* @ end;# g- e+ e( k5 X6 Y4 _$ l
end; -- of the method" U# R9 n" C( m$ B7 a* t) g* L
|