/* called by: entrance ctrl of the object 'track'1 c& T6 f/ X9 b) l& r
*/
/ T T- j) ]; Y* G" {# E3 bis
# X- y* N* Z6 W7 \9 g. G K part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' X i" ^# b; O/ M p8 vdo
% W3 _, I* Q# v6 K( H& c Lan := rootfolder.Internal.Tools.AOLlanguage;0 m E! F( S) n5 P$ h/ ?/ J
if current = @.Destination -- else return* `0 L2 i4 {4 z5 A$ J
then
% u) x& [. U, v$ s7 c @.Destination := void;* g+ }" s; s, L
if @.occupied then# v3 o: b `1 Q
part := @.cont;
/ U* L. m/ l" G& W, a @.transpOrder := void;
7 V3 F3 H0 r" c9 b part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
7 z+ S3 S9 c3 q0 }6 @9 \$ z5 ? @,root.eventcontroller.simTime);( L/ o$ V2 q8 e( a$ ]; l4 v4 @' M
@.HasOrder := false;
: u8 O9 Z0 l! U$ i( R0 G @.DrivingHome := true;
/ V+ t+ b/ A7 e1 {1 X rgManager.tryToStartTransOrder;* [5 ]) X, k. q- }& R
if @.Destination = void" b! y! ?7 Y9 l1 }* h
then -- no transport order for vehicle @
+ z& C$ ]/ H* {4 R! ~ @.Destination :=: v9 J* j% O2 I; S* j
rgManager.nearestFreeStation(@,track.~);' i' l' i3 G" Z E( e5 b
newDirection(@); 8 m: x O. f& w; e5 p4 A
if @.Destination /= void then
& u! N5 @% `$ T& T5 p @.Destination.NumReservation :=
- p. x2 }% c3 W0 x6 u" o0 h @.Destination.NumReservation + 1;: A3 x/ b+ e v: j8 {$ c( E
end;1 e( V" `. j' u+ D4 w
@.CurrIcon := "drivingHome";
1 f; D& ~# s' k p+ b* e( d- P @.DrivingHome := true; w& A& `& x; S+ U6 ]! s8 |
end;8 Z) h8 @1 c/ Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station# W7 R9 p. r6 ~9 M( d( Q
part := @.transpOrder;
: E) D4 k! T/ T* w# k part.move(@);-- load part! _+ w. L) b4 ^
@.CurrIcon := "load";
* f3 w- U0 c# y GlobalDistObj := part.globDestination;
1 n& Z* P: n1 q- l% N. } assignLObj := rgmanager.rgAssignL;
6 O+ `% x, o( N8 y, K2 Y9 T( @ row := assignLObj.getRowNo(GlobalDistObj);
2 S% G( J3 P0 L2 h* k9 ^9 ` if Row = -1 then -- since 70
; e' L" x% [6 G if lan=1 then
9 K% d: b! K. c& o K/ x R promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' B) h; W' h4 s7 c0 `3 a/ \+ F( x
to_str("in der Andockstation: \"",?.~.name,"\""));& k- [3 Y; p# ]/ ?0 V+ n$ j8 u9 K
else
- A! b6 A! x8 O- J0 q% w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), Q1 R) |9 A6 F- {
to_str("in docking station: \"",?.~.name,"\""));
' S% J8 ^0 u7 A7 I end;% t4 i, ]/ ]5 q6 W" K
else" _8 i5 ?( x1 Z; c _
@.Destination := assignLObj[1,row];
( ^( J- ]# }; V end;
/ h5 H7 F D( Y( C' |( [, N newDirection(@);
L b: d4 H0 M @.HasOrder := true;- a7 L9 z* d" M
end;2 K; {1 O' Q8 M6 U
end;/ I4 W5 C, s- C5 X* r& i/ T4 ?: l- p ^
end; -- of the method
) t) l6 d% A2 K, m0 w |