/* called by: entrance ctrl of the object 'track'
h7 V, J( D& l1 _" L/ j*/# v- E. l% T, q" v, _% k
is
% k5 M* [4 k! Z part, GlobalDistObj, assignLObj:object;row,Lan:integer;# }; V) z5 F; [$ w/ d- e4 O
do
% W0 l6 K+ i" v2 Z( o Lan := rootfolder.Internal.Tools.AOLlanguage;7 W$ \* D8 y4 M+ J1 m H
if current = @.Destination -- else return
% {- Y- O8 O' S3 M- I/ d8 ~# ?) l1 M then
0 B9 B% R9 n5 \ [- t) i% }- F9 c! l: K @.Destination := void;( `3 a- @0 l" {4 f
if @.occupied then
: o+ v7 R, ^* _+ @/ J) Q/ t8 |8 v part := @.cont;
3 [! n4 c$ B$ b* @; _9 q2 j @.transpOrder := void;2 z# i+ b3 P, ^+ l# p& h+ C ?" f
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) B& H. ~8 E- z" B3 e6 q! J, L
@,root.eventcontroller.simTime); C. h6 [$ c/ B _# i
@.HasOrder := false;
6 M8 X( ~* y9 B) B! R! z @.DrivingHome := true;
: Q+ s* `. ^* P. Q6 H rgManager.tryToStartTransOrder; L- S2 C! V6 J$ w4 y) I7 {
if @.Destination = void# F/ ^, {. m: g" K3 @& C$ o: ?
then -- no transport order for vehicle @
& L+ I: N# I( D1 z- J @.Destination :=
) y& `6 c) u9 n9 Q* ~6 q2 L6 W2 i rgManager.nearestFreeStation(@,track.~);% ]8 V F. n/ Z( Z1 }1 g% |
newDirection(@);
* W- Y% N$ |% _1 R) b% i1 p if @.Destination /= void then3 W4 R# x6 D! ^" K4 r8 t: n
@.Destination.NumReservation :=
2 s( i" L6 W6 {1 ^- F/ j( T @.Destination.NumReservation + 1;; _2 w' E C6 g
end;
+ o2 v4 Y' w$ f @.CurrIcon := "drivingHome";4 ]0 R* \1 J" e
@.DrivingHome := true;
8 J; g! d: t! r! y end;
+ j$ q3 ]! N+ j( O2 l! e else -- the vehicle @ is empty, both vehicle and part are in the same dock station! `, m' c' S8 S: ?% O$ m
part := @.transpOrder;; a, x; ]2 e$ ^2 Y6 ^8 K5 M( m y
part.move(@);-- load part w' B" M5 Q4 B$ I
@.CurrIcon := "load";1 e U1 g, x6 r- ?. R
GlobalDistObj := part.globDestination;
, ^' w. D3 e& Z assignLObj := rgmanager.rgAssignL;0 Z5 C4 G& |$ R4 j" `7 P8 b' ]8 n
row := assignLObj.getRowNo(GlobalDistObj);& F' w. F2 }+ V
if Row = -1 then -- since 705 ]3 ^: |6 I* l! J' @: Q: s# k
if lan=1 then0 t9 S' d* i: U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# a( T9 p% D3 o: l# {
to_str("in der Andockstation: \"",?.~.name,"\""));
, V" h1 o: [8 @9 k6 t else
1 n2 v7 p, x2 T2 I3 D6 Q$ X promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 q+ e. n. L! P! _" X% S0 H+ V to_str("in docking station: \"",?.~.name,"\"")); 1 V( O4 V, H8 c6 P
end; D W- c W- J2 `" W! D
else
" j% ]1 _ w& B* s" t# T @.Destination := assignLObj[1,row];
* t r) h% c6 [( L4 F9 M% b0 h end; ) r* X+ ^, h/ _6 [- x+ M! _
newDirection(@);$ M) U' b& O# m0 x7 P0 o
@.HasOrder := true;
7 m- w% `3 J1 Z: X8 H end;2 _% |+ i2 f F+ U y) }: ]
end;
: r% f( e( y, vend; -- of the method
n! d b8 e0 p5 I! j$ B7 \ |