/* called by: entrance ctrl of the object 'track'" Z. _/ \! K9 L2 v6 h
*/
+ ]7 O- N6 S# c$ \* cis
% z* R; o+ F% U part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 f! z# C& Q& V0 s! b
do9 @$ J3 N. W8 t
Lan := rootfolder.Internal.Tools.AOLlanguage;
# E. }1 V5 `3 e7 k$ w2 u if current = @.Destination -- else return
3 @4 L9 J( x8 a- P3 L then$ `( S( |% o- B( h. C$ u2 G+ ?
@.Destination := void;
& s, H' Y9 x& |4 v& W# u* M$ S if @.occupied then
" K* G" ~3 T5 M) W part := @.cont;! i( t* ^( d+ j: ?2 i3 G
@.transpOrder := void;9 v% y$ _5 r( n, {
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: O5 h N3 g, @8 o @,root.eventcontroller.simTime);
, ?8 U& t' K# L: v' a @.HasOrder := false;: t' a" ~$ G3 k; \
@.DrivingHome := true;
% h1 S. ]# _) k( \! h. Q rgManager.tryToStartTransOrder;
) l% R* E( q% v! T- w1 M if @.Destination = void
4 E& y7 B, w2 E' }" z% E3 t then -- no transport order for vehicle @
) @6 M9 d# m6 L2 M. g' |3 b( G @.Destination :=" l* J) X0 T) b7 v3 p& i, a6 o
rgManager.nearestFreeStation(@,track.~);8 _1 ~" o7 J6 h6 |
newDirection(@); ; g$ D7 B V& a" L6 j
if @.Destination /= void then
( j; z9 M( M! I @.Destination.NumReservation :=
8 p. U5 K7 N% \ @.Destination.NumReservation + 1;
6 p8 V! M/ g( m- \9 o& R0 U5 |; x end;
, d) q3 }/ y2 v/ m V$ S V @.CurrIcon := "drivingHome";; y. [4 c1 j; }6 s5 n0 J" Q
@.DrivingHome := true;
2 l: g0 k# g8 |" V end;
9 J! ^' [: B0 ?3 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station: }, Y8 f- k v a5 h
part := @.transpOrder;: q% Z4 U: B; h4 {
part.move(@);-- load part7 G. x: E" \6 l0 C$ N0 y# {
@.CurrIcon := "load";
$ i$ A* O4 _6 r8 v6 z3 S( }/ e! c GlobalDistObj := part.globDestination;/ F, p3 } O. z- F3 H9 i1 P& O
assignLObj := rgmanager.rgAssignL;$ q8 ]& _0 E% K% `" J: g7 o7 L
row := assignLObj.getRowNo(GlobalDistObj);
0 _8 n. _! d& C if Row = -1 then -- since 70
1 a. m* J$ [' j$ ^4 p; G; w if lan=1 then7 U/ C7 U. T4 p+ V: _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 t9 B+ N+ X; z5 R, A. C5 [
to_str("in der Andockstation: \"",?.~.name,"\""));+ t5 Y& k N, ?% Z' |5 k2 d" O
else8 g* n, V! B; ?# q9 p
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 I0 U2 M+ l% Z$ O/ M, m
to_str("in docking station: \"",?.~.name,"\"")); 7 k; l+ h; |7 M) D7 x
end;
1 {/ e" h/ F S8 z0 L) U' z' }" ~ else0 t9 V! T Q5 w. }% c+ ]; s
@.Destination := assignLObj[1,row];
" X5 E/ f8 \# N2 ?2 m end;
- y4 M% Q2 W0 t newDirection(@);
9 p- @) n$ m# H O |( S& r @.HasOrder := true;
; ]5 D+ |3 P9 S" G7 H5 M) y! c end;
9 h) h5 b+ \9 g end;5 }7 _0 e# Y9 H4 W0 k
end; -- of the method9 f2 A. V# O6 q, ~
|