/* called by: entrance ctrl of the object 'track') l0 R) L: g6 D
*/
3 G m, [! H* a. A9 mis
; v4 x c! c2 e2 F* @0 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;
, U; U( l f/ [* ldo9 C% O4 L6 K- j' k
Lan := rootfolder.Internal.Tools.AOLlanguage;- l- c) Q5 D# z6 M1 | @3 m
if current = @.Destination -- else return
& ^ k, t% X7 D& i6 ]) T then! x" b( t, ^/ {% s/ [9 u
@.Destination := void;( |6 K" ]( Y& O( a6 n
if @.occupied then
1 L+ H8 A% ?' }( W& r6 N7 u part := @.cont;
( Q- e; v- x+ m4 S0 `6 o4 x @.transpOrder := void;! D) `3 u N8 Z. ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 L; Z( k7 y! p3 Y+ m
@,root.eventcontroller.simTime);) n' D3 o7 T- G8 e* K
@.HasOrder := false;
J' ?/ N. a1 F6 i& R2 I- p @.DrivingHome := true;
& O0 m1 O1 u3 w+ ?- B$ T rgManager.tryToStartTransOrder;) V9 s, J! |! G# S* {3 b( [% v
if @.Destination = void" B& d" B7 u( u' d- s
then -- no transport order for vehicle @
3 s3 Z! X k$ d) }3 ~ @.Destination :=2 x( n. n2 W6 l; {1 j& g- n
rgManager.nearestFreeStation(@,track.~);/ Y% _, X3 n" d9 w4 F# L
newDirection(@);
& F* o* N7 w9 E( Z. X' ?& W if @.Destination /= void then7 O1 L9 q+ ?; M! f! S
@.Destination.NumReservation :=% @& y. y9 ]8 B4 E! a% A9 K
@.Destination.NumReservation + 1;4 I3 J( c( f/ g% d' E4 J
end;
/ r# O6 B$ J: A6 E U @.CurrIcon := "drivingHome";' X. a. a) `: b+ }* S4 c) ~
@.DrivingHome := true;# G' x8 ?% N J& T/ G6 r; ]/ U
end;
1 I( Q7 f* r* N* e+ m5 z) G else -- the vehicle @ is empty, both vehicle and part are in the same dock station- A; Y3 |, l4 C8 u1 x: i) \0 y
part := @.transpOrder;
( J6 P. n; V6 Q* A$ L C part.move(@);-- load part3 F- d5 s+ @; t( |2 N
@.CurrIcon := "load";
. m2 \, Y: G$ M; w2 F L GlobalDistObj := part.globDestination;
1 P& }9 m# ] [0 d: Y1 [ assignLObj := rgmanager.rgAssignL;; M/ U' A$ W) }8 m! s N! K) K
row := assignLObj.getRowNo(GlobalDistObj);
+ [+ q, l" ?: G1 j+ A if Row = -1 then -- since 70
7 ]" _' ~& `' ~* U if lan=1 then
9 l, G- x( @5 D' H7 T/ \- z promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 {/ [+ }6 N/ T8 e
to_str("in der Andockstation: \"",?.~.name,"\""));
+ i2 ^- j3 R: P" ~ else
, ?; |" ~# o' r$ ~( a$ v" R promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),, K, B* a4 {( _+ U# V1 f) Q* t
to_str("in docking station: \"",?.~.name,"\"")); & V' `& c5 b1 C# z9 V
end; n, [# B+ b" M
else
1 z- v I: L N L! x @.Destination := assignLObj[1,row];
6 l$ Y5 l! i k6 K9 ^4 {, N; ~ end; 3 a3 I2 ~; d2 q1 M) B* o/ o
newDirection(@);
" c8 Y% M% D0 U O0 g' Q& f @.HasOrder := true;
% k8 g7 f1 P( S' h( T; \+ A: e# } end;
3 T6 e' v( o* }7 [% n end;
8 s( m& [0 ^" ?: O( A5 ~1 oend; -- of the method) L2 W* l& n9 E( i( p
|