/* called by: entrance ctrl of the object 'track'$ X. b+ U2 l6 H' c" Z
*/8 }1 U" y) T: y8 n3 c7 P
is
: q% R$ |" V* K) I. ] a0 [9 @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# `/ E* P: f, k/ j& d; ydo
" v" a6 ^% |$ `$ E: y Lan := rootfolder.Internal.Tools.AOLlanguage;
/ p5 T& R) d. U- d& z! ?6 Z0 o% v if current = @.Destination -- else return
! ?2 N: ] }' i$ {4 u, b then0 z% n6 P5 P$ ~8 T
@.Destination := void;
. n9 f( \& _, o6 h) ~, C- ? if @.occupied then. V+ K" B9 P0 Z; o3 r3 A
part := @.cont;: E6 e2 k5 s5 W$ }5 A7 q4 e2 H+ X
@.transpOrder := void;3 ]9 l% f2 w( }& ~% m
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( B8 {% s( e( k
@,root.eventcontroller.simTime);
2 L% _4 E4 j, I7 a# J @.HasOrder := false;6 w" {9 j4 X" M
@.DrivingHome := true;9 U7 x& l/ o2 ^! K1 N( w2 ^) l) U
rgManager.tryToStartTransOrder;
/ @- x3 {: a; e" H if @.Destination = void e/ M/ v) o4 ?3 i1 k% z9 t9 `" M
then -- no transport order for vehicle @/ O0 b; p0 T! d7 z. ?
@.Destination :=
! c' V) j0 I- s0 Z rgManager.nearestFreeStation(@,track.~);
2 A. R9 i, f# E* ]" G5 q E newDirection(@); ) G) l9 z* w B8 t0 h! P' @: W
if @.Destination /= void then
" n2 ~+ ]+ \" {% T+ S' X @.Destination.NumReservation :=& A' |+ S) e' H0 S. o
@.Destination.NumReservation + 1;
' E- F' [0 c. Q% ]% o end;
: h* n1 k+ D% g) c0 u! M/ B @.CurrIcon := "drivingHome";$ q4 K, t) n7 Y0 V4 s% O
@.DrivingHome := true;/ B$ \3 z s8 c+ c N& S
end;! w; c' W5 l+ k% H( b
else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 L" d. {+ X- P% q
part := @.transpOrder;
9 g& E% k1 m4 L# H* ^/ o, } part.move(@);-- load part
2 A2 r5 M' k9 R8 z! ~ @.CurrIcon := "load";- I' x6 S9 `1 K( c3 K1 R
GlobalDistObj := part.globDestination;
3 K' D0 d q0 j' n% T assignLObj := rgmanager.rgAssignL;) N* w; R \8 \- k6 I
row := assignLObj.getRowNo(GlobalDistObj);# n6 ?4 D. L& U9 E+ p' c4 M
if Row = -1 then -- since 70
. D @ N& ?5 \8 d$ }; c, i if lan=1 then, \8 I0 [5 k: A' z/ L( d, N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),2 w! O1 E. H' {6 ?# r8 ~) T- t
to_str("in der Andockstation: \"",?.~.name,"\""));5 Q5 i: b8 Q: }% ~ n2 }
else
# k4 K: S) e, N) D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ \ v& z6 Y' E" j0 ]6 J' l+ ]4 Z" E
to_str("in docking station: \"",?.~.name,"\"")); ' {; }5 s( j+ D B! S( [& a6 [# C$ n
end;- w, g/ Z- I8 s# y# i
else
e( c6 n+ k, ~0 x( o0 D* q4 d" [ @.Destination := assignLObj[1,row];
6 U0 G; u% l3 H+ r# m* r" \8 R end; ' e8 _2 W1 f6 P, V: d
newDirection(@);
2 O4 d3 W& I8 |( b5 f @.HasOrder := true;
* \& z- k6 p) i8 C9 s1 m0 D: K end;1 Z6 s" c' J8 l2 j; s
end;
. ^3 s1 R0 l7 X( Q$ I* p1 Y- P$ r& U- kend; -- of the method
" z4 }' m5 D2 H; }3 \: v) E: Q: ^ |