/* called by: entrance ctrl of the object 'track'
' n3 M" s$ u/ O. V7 {*/
6 ^3 l5 U$ _; G$ p5 Iis% F# X& Q+ [/ u E5 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 [: p( L0 r& C# H$ Fdo
' J+ {8 e$ K8 @3 l, l9 Z$ r8 f' ? Lan := rootfolder.Internal.Tools.AOLlanguage;$ B3 u* J# u- V7 V0 J1 m# w+ l: g
if current = @.Destination -- else return$ @+ R( ]- O0 S7 T' H) [' `' t, S
then. Q' E# C3 L( S( K4 X
@.Destination := void;
+ }9 H0 P5 |+ M, }! X if @.occupied then
, x) c o, N" F part := @.cont;
# V9 ]( i. U- I+ }" z1 V) q @.transpOrder := void;- l1 J2 |$ y& p3 k. L( j
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- v3 L. U2 n2 r+ b( I @,root.eventcontroller.simTime);
1 p" z# ~) m0 @, d2 h @.HasOrder := false;
' B+ K- x+ r1 M' d: q: U0 v @.DrivingHome := true;
7 U& _2 N$ O e rgManager.tryToStartTransOrder;9 J) U/ H% @9 J1 a( {8 R0 W- |
if @.Destination = void
1 q/ |6 @- E" Z$ @ W& P then -- no transport order for vehicle @, A& N& I: ^% M7 {7 R4 ^
@.Destination :=
: d0 F# N2 @$ `/ J. {. _+ o rgManager.nearestFreeStation(@,track.~);
( n, e& j/ K0 |" t newDirection(@);
! I! F7 K/ {2 @2 P' Q, J7 G" Z if @.Destination /= void then
, `: ~/ x0 s) ~2 a+ d( _6 m @.Destination.NumReservation :=
1 p1 X& O$ [% j- y# M @.Destination.NumReservation + 1;
" s3 b. X2 A% g7 ]1 p+ {! A$ ~9 D6 b6 r end;
% E! R. P* `. e i; q% Q' S @.CurrIcon := "drivingHome";8 M! ~8 ` ?6 x% ^; ?
@.DrivingHome := true;2 M" w% e( e1 i& Z S/ m9 i( Z: K
end;
$ |* T! w9 t9 p) x' c1 { else -- the vehicle @ is empty, both vehicle and part are in the same dock station7 D' c3 T2 U. M% _& k# h
part := @.transpOrder;
% K$ t2 v5 j* H( l part.move(@);-- load part
) w$ @8 N, |( I$ D5 p+ ?3 w+ v @.CurrIcon := "load";; a, d9 u1 T: Q! f8 C+ l# i
GlobalDistObj := part.globDestination;
% D& }" U( |$ x: p assignLObj := rgmanager.rgAssignL;3 J9 h# z% h5 W, y! w. m1 ?
row := assignLObj.getRowNo(GlobalDistObj);
% ]+ G) W1 G% g7 F K: b; }# w if Row = -1 then -- since 70
8 V, P# ^2 P; y# B. | if lan=1 then
& S& Z3 H' V+ N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," q* I- @: n2 g$ ]' w
to_str("in der Andockstation: \"",?.~.name,"\""));# I3 b. X0 l x: U
else
8 R; p' T3 e, N4 K1 ]% D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- S$ |* x* P5 Y4 |9 e/ E! E
to_str("in docking station: \"",?.~.name,"\"")); ' ]3 C& V. x& b" L& ^
end;4 c: x( }5 d3 {2 Y/ `4 G! q- ~& {
else
* L, J y) N- l @.Destination := assignLObj[1,row];
& \2 N! ^2 q& R% M! E end;
5 G. b; r# p% {6 m( m, F" ] newDirection(@);# R6 T9 ?- D) \: \ a9 }
@.HasOrder := true;6 k8 ~- T! n' z4 v O! L$ J: `0 x
end;7 _* r7 }2 h* z& ?% k
end;& E E2 A# c2 [% O4 t! ~
end; -- of the method
! _7 a2 ?, w, n; i |