/* called by: entrance ctrl of the object 'track'
+ x% |( q3 T& q*/( G3 g' L+ ]* i$ C7 l
is$ w" D2 j5 t6 R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;/ c0 M8 s, e: `7 n
do
7 X' h; g6 k$ j+ Z Lan := rootfolder.Internal.Tools.AOLlanguage;# s. c$ Y) d2 i+ X S1 ?1 [
if current = @.Destination -- else return/ h, u1 z$ t& t8 A
then; f8 c; @6 k1 V; n" Z* Z
@.Destination := void;
: E: V. w2 E& p if @.occupied then* ?% X. H4 d2 u/ m5 M
part := @.cont;
; S+ o7 d/ k# s* ]$ C! o @.transpOrder := void;* L2 j4 O9 ~# L/ o
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
- w9 o/ |; k9 P' e; N( C @,root.eventcontroller.simTime);
0 D' h: A" b1 }( U7 V7 d$ f2 Q @.HasOrder := false;2 q# F3 M% W' k
@.DrivingHome := true;
0 k) L# |; T- \3 s) D2 C- F) S rgManager.tryToStartTransOrder;
' Y* N$ p6 L" d" G$ ] if @.Destination = void( _' p. ?! M- J/ D: Y7 m
then -- no transport order for vehicle @
7 ~' B$ P( A/ g, X+ ~! D) A% L @.Destination :=
, f" J Q2 q8 {3 C) C6 \ rgManager.nearestFreeStation(@,track.~);
D: m+ n7 r0 O: Y+ S$ E* S newDirection(@);
& P J \* K# l4 W9 B if @.Destination /= void then
2 q# b- U# Y# U0 [3 A @.Destination.NumReservation :=
; n6 \) [2 H$ t2 m/ h8 {6 f @.Destination.NumReservation + 1;
a* ^, C! u2 f" V6 z" ? end;
- ~0 l( l- S5 ]; J3 A c @.CurrIcon := "drivingHome";
4 `6 v6 Z- r! v2 L, ]) X* _9 G @.DrivingHome := true;$ j6 B6 d! M# l
end;
( S$ R2 w: k. M( f: Y+ ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 ]/ p1 O) e+ G1 B! A
part := @.transpOrder;. ~7 R( H& Z2 ]
part.move(@);-- load part
7 v1 g/ [# Z& [+ u& F8 f @.CurrIcon := "load";
8 k0 ~3 i6 v; B9 y8 a8 e& L GlobalDistObj := part.globDestination;
) l. [) x! v" P, Z# l) |1 ~ assignLObj := rgmanager.rgAssignL;
* E Q; M5 Q( z- z row := assignLObj.getRowNo(GlobalDistObj);2 E7 D3 c4 i5 \+ G. o4 c5 f
if Row = -1 then -- since 70) H& f4 K2 ]( J* a T6 p' U7 N
if lan=1 then
! l/ I- c% X3 K _% E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 o; y4 d" P1 ` M- _# q! _" H/ j
to_str("in der Andockstation: \"",?.~.name,"\""));
: `2 c! {/ U5 i3 }! b: Z else
7 G' v t9 f$ t: v/ R* c promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ `2 s2 n3 A8 {, `0 h8 h6 U to_str("in docking station: \"",?.~.name,"\"")); ; {6 v6 F' B, F
end;
" b. Y f7 F' f else
( `, e) L; S/ {% I Y3 { @.Destination := assignLObj[1,row]; n3 w4 l+ c$ Y( l o5 a( S
end;
( t6 K& t( T5 K `1 H( ~5 p# ~, y newDirection(@);0 u" E% \1 z2 X5 P5 ]
@.HasOrder := true;: A$ `3 W. P& g$ ]! h5 z
end;3 Q. E8 K' d* x- R( u3 K1 c
end;9 H# u6 m. c. f# A/ W; V& ?5 S
end; -- of the method5 z! P$ W5 }- N. B% O8 R5 `( y! q
|