/* called by: entrance ctrl of the object 'track'
9 L) k# I# N! d ]. }*/
' l7 L! l- t, j! yis+ B( _/ S0 e( n& W. F( f9 o
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ H6 F. B) U: ~4 M3 tdo
, A- H0 u, W$ [" [0 i* l Lan := rootfolder.Internal.Tools.AOLlanguage;
# w& K) ^* M6 x0 _% I4 C! t if current = @.Destination -- else return
6 z" o0 i3 }7 X2 ~# N3 d- T then% T# G5 x% S0 r
@.Destination := void;
" s7 y2 w* n2 c* T- f if @.occupied then h3 k! ]( n, C+ A$ K
part := @.cont;
5 j& w- g0 O2 v+ u @.transpOrder := void;
4 k& m/ D( j+ q: Y! a6 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 p1 r {) l% c' P6 x3 ] @,root.eventcontroller.simTime);, c+ ?3 P( ^" }& c- J! c7 K
@.HasOrder := false;
" b- [8 ]6 e7 x9 r4 b @.DrivingHome := true;
2 E8 I+ f6 H C* o+ G1 p7 J. A9 N! ^ rgManager.tryToStartTransOrder;* t' a$ f1 x( _! x6 j
if @.Destination = void" O& G2 }/ N o
then -- no transport order for vehicle @
. G3 g+ j* U4 `8 j @.Destination :=
, x0 `( M5 A4 Z7 { T% W: y; T rgManager.nearestFreeStation(@,track.~);; T. |# {4 ?8 l9 S
newDirection(@);
! q& y" v) o& G* x, ]' t if @.Destination /= void then2 r# r/ O2 o/ m
@.Destination.NumReservation :=
: X/ Y: w* x( U7 t3 m0 K& e @.Destination.NumReservation + 1;
" P( O5 k; f/ M5 V9 O end;1 B& ~: X* k3 N+ r
@.CurrIcon := "drivingHome";
1 ]& O! `+ E3 y7 }, U @.DrivingHome := true;9 }; u _) R7 \. |0 d
end;
" r8 |: R% p. Y- }# s: f else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 @4 C) n6 `0 h7 Q# `* k part := @.transpOrder;/ j5 P' a7 `2 y8 t9 Z
part.move(@);-- load part( q( [1 M' R: L; ^2 Z3 h- T1 _; m
@.CurrIcon := "load";7 X5 X" C0 k* R1 M
GlobalDistObj := part.globDestination;9 ?$ b8 Z! r I4 @
assignLObj := rgmanager.rgAssignL;( f K$ P; ~# P8 _3 ]3 f
row := assignLObj.getRowNo(GlobalDistObj);0 g& [1 h# n8 _
if Row = -1 then -- since 70
- ]9 b$ t& [& Y" w/ V" Z if lan=1 then
1 e j3 @6 ]: ` promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& f+ z# O2 I8 H8 a
to_str("in der Andockstation: \"",?.~.name,"\""));
H# e) Q7 u( e, j else. o. ~0 b, _: ]4 O; F) x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 m1 f) {6 \* z! g0 k; ~1 D to_str("in docking station: \"",?.~.name,"\"")); 8 `4 z. c( F4 r3 a# V) P
end;4 g9 [; N/ g# `2 U
else; u L3 b- K; h/ R; ?& ]* b. F, ]
@.Destination := assignLObj[1,row];
0 t5 B& S. g: X s# @ end; ^9 M0 s/ s% R8 N0 L9 t
newDirection(@);# _- O# D! p% V/ d4 ]3 z7 M
@.HasOrder := true;
* b1 o g0 j0 T0 _! W; o0 ` end;4 a; j# G v, A
end;
3 j/ _0 l2 F% P0 a4 e+ N7 u2 ]5 {end; -- of the method8 |+ h1 x4 J2 B+ [2 y: V) T( ?
|