/* called by: entrance ctrl of the object 'track'
. V" `6 C3 s& J*/3 O$ Y/ c7 q4 _6 K% x
is+ {- I. T8 P( s
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
B D m( `" L; [( qdo
- {, ^/ }* b, y, W9 I Lan := rootfolder.Internal.Tools.AOLlanguage;
3 Y" r! A% ~9 X$ l6 ?% r if current = @.Destination -- else return! b+ }3 g; E, `: o3 a9 z
then [( f* U+ a# Z7 s, h( ~- J
@.Destination := void;9 S! d( |. u& I
if @.occupied then
4 F' E6 _" Z; q part := @.cont;' ]: q; y0 k. _( `, F# R
@.transpOrder := void;
: O+ L I: W6 \( |9 C f7 D part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% s( {* ?4 ^1 y @,root.eventcontroller.simTime);
8 Z/ v5 y! i& J4 K @.HasOrder := false;
# G H+ B+ @$ O @.DrivingHome := true;# \# h0 c/ v4 g
rgManager.tryToStartTransOrder;" q2 I* c; ~( [7 I k+ k9 N Y
if @.Destination = void
. K4 ]+ |- q% r+ L9 U0 l! E8 u then -- no transport order for vehicle @" X j+ t9 Z+ s. n; d. ^( T8 n
@.Destination :=
- C9 \& v( Q( x rgManager.nearestFreeStation(@,track.~);2 Q# d" l$ g* q% U& H
newDirection(@);
% H) `4 `4 A i' s! p. j if @.Destination /= void then
7 l$ H+ i( {# J; i J, c @.Destination.NumReservation :=
" V5 y/ L/ g# S& Q' ]. D' V @.Destination.NumReservation + 1;
* Q! |3 C. K: S end;3 g, u6 O) k2 n3 Q% |
@.CurrIcon := "drivingHome";+ }- C* ]" Q- ]! G+ }# N
@.DrivingHome := true;
8 L5 e0 K4 s" J" d" V2 S end;
# _( {' C, B0 U- q8 u0 k% H else -- the vehicle @ is empty, both vehicle and part are in the same dock station; D- ~$ `9 h- J" G' T" r
part := @.transpOrder;# d1 k% I7 {* A2 Z4 f" W" v
part.move(@);-- load part' K9 H/ p0 }, ]0 d- j9 m6 y6 Q$ B
@.CurrIcon := "load";
4 X, p5 w( t6 Z- l3 |& w" |2 i: ^4 ` GlobalDistObj := part.globDestination;0 Q& k( s j) W* |6 I0 L
assignLObj := rgmanager.rgAssignL;3 X3 O! Y4 f- P# G
row := assignLObj.getRowNo(GlobalDistObj);9 V: S( }$ a" c5 K g- L5 F
if Row = -1 then -- since 70( G# S. }9 W: B$ |4 ?3 U2 f' ]* e
if lan=1 then6 R7 Y9 W6 Q: [8 T
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. V9 c8 ^8 R! T i
to_str("in der Andockstation: \"",?.~.name,"\""));6 Q! ~2 M/ A. g
else
, @, J: m; r* p0 ]) L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* ^! R& H5 s( i. o% b, N! N
to_str("in docking station: \"",?.~.name,"\""));
9 M, X9 t$ k" b, l2 y" i end;
% N, k! b4 [' ]" l" ^ else
0 y! r/ l: |! h% k$ V0 F# D @.Destination := assignLObj[1,row];; E# s% ]1 d- S; T& ~
end;
( b9 \4 K3 S* h) R; `* V0 t newDirection(@);
V+ b3 P, }, Q9 F a: T. G @.HasOrder := true;+ ~# K( C" s, d3 Q8 X7 |
end;4 I& i- M$ |8 F& q
end;
% _7 H/ c: t- q* Q7 v) eend; -- of the method
) m! g/ t1 x1 c4 Q; m4 R/ F* Z |