/* called by: entrance ctrl of the object 'track'
: R/ h, M3 S& A, {2 p*/
+ F& s, p z* y% ?9 ?- i, b2 Kis
2 z" u4 e* @' M$ _- ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 b# G/ w( ^/ e$ L! r2 k4 ]1 xdo
& ^% r) u Y6 F- ?. Y- j Lan := rootfolder.Internal.Tools.AOLlanguage;9 [2 F* _3 u1 h+ E; ^) @% R
if current = @.Destination -- else return' n, B1 m& v! A6 W
then
) u+ C$ r# O( Z: K$ p( K) Z7 s* q @.Destination := void;' X( J: A, r- I# K+ ^7 b: y' b* p
if @.occupied then! P5 m/ b7 H( N: q
part := @.cont;
6 b4 o2 j8 v3 C @.transpOrder := void;
: b7 v. Z) T! y0 w$ r- c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( w1 v" v( Q3 @, T# | @,root.eventcontroller.simTime);
" T' W/ T* N( x. a @.HasOrder := false;; W0 g; t- n- Q: B5 v
@.DrivingHome := true;; W6 i/ c0 T; j& s6 U5 }
rgManager.tryToStartTransOrder;
- {1 y; S" X) H if @.Destination = void
( F" q2 I- ^. Q P8 K2 q' ` then -- no transport order for vehicle @
# J. Z- s- q# c. a- g @.Destination :=6 ?# i6 @2 g; h; S E- b
rgManager.nearestFreeStation(@,track.~);
9 ^6 l! c0 g# Z. S9 t newDirection(@); # _ s5 J: g/ p
if @.Destination /= void then
3 C; D. J8 G) X' U* P7 r @.Destination.NumReservation :=" H) O4 x- p: v. T F/ d
@.Destination.NumReservation + 1;% B4 `0 q/ p; X; _* ?
end;
( O( R3 P! G2 I9 `9 j: S! S! z @.CurrIcon := "drivingHome";
$ ]( S% C8 z2 V @.DrivingHome := true;' J4 w1 K) m/ m- Y8 E# J
end;
& u0 P6 u6 z8 s6 h; {+ m$ p' T else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ O p( s& ?5 [& k1 f- m
part := @.transpOrder;
0 H- |+ b6 o3 x: B3 S% K part.move(@);-- load part
4 L/ y" j$ ~; O% V6 W S @.CurrIcon := "load";
" [4 k. U2 w* L2 n8 W8 X GlobalDistObj := part.globDestination;
( y: i8 {3 {1 f( L% i assignLObj := rgmanager.rgAssignL;; S5 l* ^: u: a" F3 F
row := assignLObj.getRowNo(GlobalDistObj);
Z% r9 D$ k! y2 | if Row = -1 then -- since 70
& k# W7 W3 S' w# \ if lan=1 then
6 {1 G% z% ]' q1 W! g6 p promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),; z6 {* A- w" [, ~) l4 I
to_str("in der Andockstation: \"",?.~.name,"\""));
7 j+ x! ~/ v5 j else
: L7 P# C! a2 B0 R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ t' J$ e% t8 \( U* |3 A+ i/ ~ to_str("in docking station: \"",?.~.name,"\""));
i. {- {3 W$ a) o end;
, x/ q: H% H7 i( U& {* O; v else. r2 {& T; f( ?" d) R0 `5 G8 V
@.Destination := assignLObj[1,row];
# s# l( |# e& ]2 W6 f end; 0 B! L! s9 H$ k: o
newDirection(@);! b/ f9 d9 l5 ^0 C" b, G: z! Z
@.HasOrder := true;
; D6 d. g5 G2 @/ U0 K end;- I, x! V( v7 P K
end;
' F2 [( b+ u7 Wend; -- of the method1 X$ W! z# I" t
|