/* called by: entrance ctrl of the object 'track'
6 w" C5 ]. \/ i4 s# e3 d5 y*/3 @& J: d/ A3 f: ]% A; Y
is
. C6 I8 A4 N O- y; Y, F- t. ? part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 ?; |9 t! P# b/ ~5 n& M5 B$ i. O8 q Q
do' _1 P- T! m8 F# |( I
Lan := rootfolder.Internal.Tools.AOLlanguage;" o$ P& P7 C# }( a4 F
if current = @.Destination -- else return: j' t8 y5 F* N/ E$ T
then' \" o# `5 {) ?, a% ?: J5 }) d+ A
@.Destination := void;
4 ]8 X9 a: t; z# E: v if @.occupied then- k8 e- Q2 z; ^. p& A; S
part := @.cont;& F* H- H6 \! }; j
@.transpOrder := void; I5 m" d* y7 {7 _* B* {* I! y' F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,& L+ Y, I; Q3 |& R8 H X
@,root.eventcontroller.simTime);
1 ?7 S% S. x0 D y @.HasOrder := false;# F/ S7 e; [) z# R. T( x, d& o
@.DrivingHome := true;8 X- d6 ]; C1 A& f0 ?3 J, Q
rgManager.tryToStartTransOrder;) m1 o0 N! o. O6 I; G0 ]
if @.Destination = void) F, H) c( y; ]. [/ `
then -- no transport order for vehicle @1 l! z- |$ n9 Z/ L$ n* _
@.Destination :=9 u5 T! e, a s1 U/ O
rgManager.nearestFreeStation(@,track.~);( i$ [# K: |+ Y1 A, T$ k) T; w) s
newDirection(@); 1 V5 p8 ]8 ]7 T7 ~$ l
if @.Destination /= void then. K; s) D- n' H" k' U
@.Destination.NumReservation :=
# |0 J% T# b; E8 |, B7 Y, d @.Destination.NumReservation + 1;
7 }4 ~+ K9 [3 S- R+ ?& O end;
4 W1 B3 O# {6 e3 X" B @.CurrIcon := "drivingHome";7 U0 ?# ~2 J& p3 W, {
@.DrivingHome := true;. m I' j7 |& i5 t
end;. J: `+ \# Y) C- c; r/ P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) d1 W# C7 R! \$ z, ^+ y# l7 V7 T" _
part := @.transpOrder;
0 ]& @" R/ c4 g7 Z7 f# t# Y+ l part.move(@);-- load part; ?6 \7 E' h! y
@.CurrIcon := "load";/ r7 M L9 _9 X8 W5 s
GlobalDistObj := part.globDestination;, V% [$ f' z2 c |1 x4 G) H
assignLObj := rgmanager.rgAssignL;
! O* G) t# v4 z3 G# O+ s" w row := assignLObj.getRowNo(GlobalDistObj);
( @" b+ W' |, a) M3 n# h' U if Row = -1 then -- since 70: N+ y# O% o* |3 g* ~% r4 Y2 w
if lan=1 then- E6 D2 e9 b' u, {
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
7 E: Y9 [/ h" O to_str("in der Andockstation: \"",?.~.name,"\""));
! d$ V A# n q$ w8 c- }: l, f& A else# P* w6 P2 A( j2 m- z% F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' M& g# ~# F: ^7 Y$ l! V# u to_str("in docking station: \"",?.~.name,"\"")); " ~2 Z: U& B( R# q \0 ^/ c* e
end;3 L+ S# t t- p; K7 A/ o: J
else3 w, d- ]9 \: h1 r* K4 I
@.Destination := assignLObj[1,row];; {" V) H) I" N( O
end;
1 B% b( ~4 E/ H newDirection(@);
) ~4 [+ I1 v: T @.HasOrder := true;6 Y# X7 A2 U; _3 v* k( V9 g
end;
6 `& u. f) k! j% r" P& g$ n end;( x! K$ g2 M4 {% c7 v1 F' X% J% j
end; -- of the method
% z$ i3 p1 }: u% k5 z$ q |