/* called by: entrance ctrl of the object 'track'
5 b2 {4 L+ w$ e) \*/, H4 V4 e: y. }. f& Z
is
: O$ R3 p' j5 i part, GlobalDistObj, assignLObj:object;row,Lan:integer;. I1 I* U8 e- l# ^9 a5 F( z& v, v
do8 L0 [3 o$ c9 S! H
Lan := rootfolder.Internal.Tools.AOLlanguage;
7 @+ t$ _! F/ n1 S if current = @.Destination -- else return+ K; ^: v! Z9 [( P {8 o
then
' _: Y B. u. V* s. A+ } @.Destination := void;
) S7 ~. E2 H7 b, z$ w% a2 V( Y if @.occupied then- I3 t- z2 p" t% \% g& P `% e& M* o
part := @.cont;# P3 B5 p8 u3 \4 D# J" z
@.transpOrder := void;
$ D4 w4 P+ u* ? ^7 y" v& S% m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
/ Y. S2 n* \; v; ?* V, ^ @,root.eventcontroller.simTime);' H# C0 ]+ m0 Y l
@.HasOrder := false;
4 k/ }# b) D0 f/ o) L; y) z @.DrivingHome := true;9 D5 I- i6 [/ a6 U
rgManager.tryToStartTransOrder;1 Q- ^( @4 `- a+ i+ o# b) ]
if @.Destination = void; S8 L2 _, m2 s' L' m1 ]
then -- no transport order for vehicle @
1 ^' m _9 H2 a, U& V' G: X5 q @.Destination :=
" s1 V- X8 o( e2 B rgManager.nearestFreeStation(@,track.~);$ `6 \' E8 K4 Z7 j0 T" u8 O
newDirection(@);
, P/ P# a9 u, F/ S# S! _* U# w if @.Destination /= void then
0 W" g! T( i6 l0 Y' n' M! H @.Destination.NumReservation :=
! y! v+ T B8 A: a @.Destination.NumReservation + 1;
7 p* h4 z* ^( S5 ^ end;
2 m. j8 u/ t5 f" k# L @.CurrIcon := "drivingHome"; E; ~: H9 X) `# F6 K* U3 h* z' k! y/ X
@.DrivingHome := true;
* D" A5 T3 Z4 ~: ?) j end;' T8 `, x' @( u+ E4 J
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' z1 p3 N* v% Q5 `: o
part := @.transpOrder; Z* `$ h; \8 p& L
part.move(@);-- load part" @/ y8 y( Z% o9 I {
@.CurrIcon := "load";
4 X0 K Q; i+ Z! M GlobalDistObj := part.globDestination;
4 J! Q& c: A8 n/ Q% D assignLObj := rgmanager.rgAssignL;1 P8 @3 \# ]' ?# P1 z. \) v
row := assignLObj.getRowNo(GlobalDistObj);2 P$ S0 P: }) O; U8 n
if Row = -1 then -- since 703 a0 W$ Q# i G# @- z. M
if lan=1 then$ y) y& {" Q# {9 I! l1 d; Q( a9 C
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 ^# ~# g& R$ c* w( [5 @
to_str("in der Andockstation: \"",?.~.name,"\""));
8 q# Q4 \" W% K+ [' e' w else; N7 k& j W+ R! ]% O- s
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# W# k6 Y8 Z0 c+ p+ G" h
to_str("in docking station: \"",?.~.name,"\"")); 8 c! j* `0 ?+ `2 G# l' p& e* e2 s
end;4 i* }9 D% \! D3 Q( u3 p
else5 e. {$ L3 R& a) V0 Q7 C
@.Destination := assignLObj[1,row];+ y3 B0 e6 q+ o1 ~
end; / L' X% t6 ~+ x
newDirection(@);
. U, m# n" q* p' v) L+ [: M @.HasOrder := true;& ?- n5 B) w: U; I1 \
end;
, H g) c; J$ X end;0 {8 }: j8 ]: l3 R
end; -- of the method
+ ~0 y o: E- o) x |