/* called by: entrance ctrl of the object 'track'
+ a4 k0 c- \, ~5 y$ f7 B0 Q! ^! t*// a8 A ^3 [- m. s3 x
is( l4 q. B) y4 _3 j+ z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 l( p% L9 [: h# k1 |7 R0 Ido
$ j7 C ^# I* m6 n0 E Lan := rootfolder.Internal.Tools.AOLlanguage;
9 {# g$ j. {* R6 D- u if current = @.Destination -- else return
% p) O3 V- A" i, I8 e9 } then
+ E& s I+ `- g. g @.Destination := void;0 c! K! |7 w% `7 o) f L+ `( p# ^
if @.occupied then
& w. I# c }/ g* \: e part := @.cont;
8 O: M0 x7 F. `9 E" ?" w0 V3 M+ \ @.transpOrder := void;( i: E+ q( [9 @+ X9 u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1, i5 v3 `% Z2 i
@,root.eventcontroller.simTime);
' c) t; @, f" M3 A2 [/ H S/ A7 m @.HasOrder := false;
7 \2 L( i% u7 j F0 t* v7 R @.DrivingHome := true;
1 @3 D" E3 ]* e# Y6 K& n rgManager.tryToStartTransOrder;
% ]# {! N* q$ {6 }6 X if @.Destination = void. ? J8 P7 u. F4 | p
then -- no transport order for vehicle @
7 l- q; Y% T- V( Z( x+ e6 t! K0 X' z @.Destination :=
. u% y9 c. Q. o1 k5 [ rgManager.nearestFreeStation(@,track.~);, ^/ J8 q$ r8 J& g
newDirection(@); ) J1 r; n. U5 c6 D) H( N
if @.Destination /= void then' e4 P( j' o; U, Z
@.Destination.NumReservation :=, ~/ g2 x1 G8 V/ t
@.Destination.NumReservation + 1;
2 Q% M, L& z- }* W end;
% X6 L" m; _/ C- J: M @.CurrIcon := "drivingHome";0 }9 I) E) h& m* o( K
@.DrivingHome := true;
' E. a% O' P' Y! r end;
8 u5 B. M6 o) V( z/ l# [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* I; p$ R8 M1 I& W: J part := @.transpOrder;
2 A- y/ c2 M4 C% { part.move(@);-- load part
1 ~2 W8 e: ?2 q0 s2 j: ` @.CurrIcon := "load";, b. [: A/ C! g. ]% @9 V- F
GlobalDistObj := part.globDestination;+ s, a& Q3 l" W0 o7 d
assignLObj := rgmanager.rgAssignL;2 C$ _% x% q* Y0 c% C& Y
row := assignLObj.getRowNo(GlobalDistObj);
9 T7 b. ]# r- p" q& M if Row = -1 then -- since 70
2 x6 @8 _+ d+ \ if lan=1 then
4 z( n. j ~( ]3 d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 |7 |: N# e# _: p/ d1 I
to_str("in der Andockstation: \"",?.~.name,"\""));
" C5 p5 b% S0 M( @/ [+ _ else5 z9 m3 W% l( w1 n6 z% c: o9 }" C
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ E/ A% d3 G& ?% m Q: r/ a4 H
to_str("in docking station: \"",?.~.name,"\"")); ) N6 Y# C/ z$ S( `- Y7 t1 v
end;
1 ^: S7 w8 }5 k else. ~ c) S! p+ Q( L
@.Destination := assignLObj[1,row];
) P/ {$ g6 Z y1 c+ ` end; % i6 i! m0 ?7 S1 v
newDirection(@);
' K5 w- A- M# x @.HasOrder := true;
5 L' Z2 O4 V/ N/ k5 O$ k end;
Z5 r$ _% W$ b' T* @# G) \0 S end;/ c+ E' x' f E+ Z, n; F
end; -- of the method
D& a% y4 D, Q3 k; }0 r- e |