/* called by: entrance ctrl of the object 'track' J9 ~' q: L z& l" d2 |
*/& Y* A* q+ {4 L3 S( d! V
is
( J. ?5 _3 s; p part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 p. ^8 }! G& P% A4 ?; t, ido6 x2 h; A% r) e; R# i2 u
Lan := rootfolder.Internal.Tools.AOLlanguage;
- [+ V* U) K" J1 K& K" u if current = @.Destination -- else return R7 ~0 F/ o, N- @9 z l
then
/ \# C9 X" k) ?4 e2 n @.Destination := void;, S& o# n$ n$ v5 V
if @.occupied then
6 [6 P1 K% i, g# b! U9 b part := @.cont;
8 U% Q% C0 w8 ]& i @.transpOrder := void;
( V1 {4 Q$ T# N9 j+ x7 l% D5 | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ L0 O$ q0 J; F, {1 I @,root.eventcontroller.simTime);
' I6 J0 ~! E H. @$ G5 c @.HasOrder := false;7 b3 C: @( z* f& a$ K) m8 `0 u) i u
@.DrivingHome := true;
2 i; ]5 r7 {9 t( Q2 N v/ k rgManager.tryToStartTransOrder;) c4 f) C( i7 Z6 U n
if @.Destination = void9 X" v2 c, u. W( E; o6 O2 e
then -- no transport order for vehicle @
, x* C7 L% V; `# { @.Destination :=* Z' ^" V% ?$ @/ S
rgManager.nearestFreeStation(@,track.~);" m$ q1 \. [5 g' u) s* r/ f$ x$ w
newDirection(@);
4 n6 n# w8 m9 ^) a0 ^' ?+ h if @.Destination /= void then; A9 m# x4 @# V0 k
@.Destination.NumReservation :=
) e7 H4 @% [7 C. P9 h! R: Y# J @.Destination.NumReservation + 1;
3 m/ _( s9 S6 t0 i0 {1 x6 { A end;) A3 k4 a7 ^! l; I& @, c6 w3 q, p H
@.CurrIcon := "drivingHome";: j/ G6 Q: L( y2 D- ~* p( m4 M$ g) a
@.DrivingHome := true;! q% [2 v* S# O( r8 B
end;
, C+ A s$ C! c! q( R: c else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 J$ m( f0 S8 {- ?
part := @.transpOrder;
* d8 H4 [1 T) U& x7 ~2 t part.move(@);-- load part
' S; h4 u: N6 l7 h4 X5 Z @.CurrIcon := "load";* l; \3 _8 J$ g! A8 g. c4 C
GlobalDistObj := part.globDestination;
$ A& w7 N- a P; o$ l assignLObj := rgmanager.rgAssignL;. ?1 L8 l% e: ] n
row := assignLObj.getRowNo(GlobalDistObj);" O, k* l0 U. m, B
if Row = -1 then -- since 70. i8 M! O* k/ ~' G* O4 A7 O( h, \$ @- v
if lan=1 then* @& d1 b, I4 O( A
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ D3 z6 d) w3 s" W
to_str("in der Andockstation: \"",?.~.name,"\""));
5 D3 a2 C- `. x- P( J8 S3 ` else
* n4 ^$ [4 O& \1 Q9 x promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) ^, [) q" b$ {% C
to_str("in docking station: \"",?.~.name,"\"")); 6 L$ f8 a$ |% }
end;
, k3 f/ a* _# O6 P else
* \/ P$ @' m0 c @.Destination := assignLObj[1,row];
! i# U( U, l' A end; * t; }2 m* z0 ^
newDirection(@);
4 S: Z3 J% W/ U8 y+ V, [8 O8 } @.HasOrder := true;
- o' B/ z! x; {: F$ M6 G# c end;
% s0 C b8 p1 e- K+ x" s/ }" D end;
% p6 `6 I7 g1 X: D9 a# v1 K. K& c+ aend; -- of the method
% a/ A- P) V0 W5 J4 y4 ^3 l0 { |