/* called by: entrance ctrl of the object 'track'8 G2 C) S% M% Y; R; A
*/" Y0 }( j& o! n3 Y/ f
is6 m( b. z5 _4 O# K6 \
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 F1 v' w T3 N/ V7 O
do* g. \ z3 B% \
Lan := rootfolder.Internal.Tools.AOLlanguage;, d7 b" u, p4 a
if current = @.Destination -- else return( {' W# g! ^4 N( R! c8 A5 Q
then
+ @# t2 M' o- q1 S& r @.Destination := void;
3 y _% X6 L; B, M& Z0 V# h if @.occupied then8 C+ J) t" B9 l4 A4 y- r2 p, n
part := @.cont;8 U+ A1 S0 g& q4 r! I3 p
@.transpOrder := void;
( }" n# u1 D$ u2 ^' ^4 X part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
3 {) J/ N" U- o1 \& \3 V { @,root.eventcontroller.simTime);
% M w" f( H/ L* Y! | @.HasOrder := false;
& d4 `) R' z5 s7 U6 s: ^8 K @.DrivingHome := true;" d' w F( |- h* Z) U
rgManager.tryToStartTransOrder;
+ ]3 h; N s& i& w' c# k if @.Destination = void
5 W: t% B. ^! K: L' A then -- no transport order for vehicle @1 `* a( _$ v6 Z9 v3 q$ T
@.Destination :=
5 ~5 Q$ U9 f: _- e+ Q4 X4 Y0 m$ @ rgManager.nearestFreeStation(@,track.~);! n. O) Q- P! ?# `$ A g; `
newDirection(@); # }9 g1 p' b3 b& |" P8 N
if @.Destination /= void then1 S, ~' D9 D0 E2 K+ H: I
@.Destination.NumReservation :=
/ ^) D; W) F* g% f1 f @.Destination.NumReservation + 1;
/ Q+ q, n9 P4 |- b4 n end;
4 o }( C/ a( W( H4 k8 t7 r' B4 b @.CurrIcon := "drivingHome";8 K& Y- i% c0 G9 B! {
@.DrivingHome := true;
@6 f' N. P* T end;/ C! @: g8 F4 l7 A2 |9 _+ A7 Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) w3 i; ~# O! u5 M
part := @.transpOrder;1 M( u6 _# P: Z2 H! E' W# k; M
part.move(@);-- load part- P7 G1 ?8 |# K$ {4 t( h& L' O
@.CurrIcon := "load";' B4 g3 M S: U2 e( _% D2 Z2 I
GlobalDistObj := part.globDestination;
/ V7 s* V6 [* [' a assignLObj := rgmanager.rgAssignL; S9 m) a& c0 a8 t+ O
row := assignLObj.getRowNo(GlobalDistObj);3 W7 W3 ?3 i0 P3 p: k
if Row = -1 then -- since 70+ y; a4 e5 Z+ D5 {3 h: \: ^8 w
if lan=1 then9 H! t- {& n, T* o' U
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 e# I2 |( D! @5 |4 D8 R' ^* [/ u to_str("in der Andockstation: \"",?.~.name,"\""));
, k) D0 K( s( j& m else
" Z9 q8 F8 [$ T5 v promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# i2 o5 G& c W, _1 J4 O2 r8 q to_str("in docking station: \"",?.~.name,"\""));
; z4 i% Q' `: I2 {4 D end;) E; j# E0 m7 f; Z# S4 T$ _
else* w: s+ h. h, s1 i/ r7 Z$ O
@.Destination := assignLObj[1,row];
2 i6 X* ]3 m+ [ end; ! [+ }. a, ?7 f; ?* D V: Q9 N
newDirection(@);
6 g# a+ M' X, H% m @.HasOrder := true;
" V, ~* T& w2 p# s# z- d end;
9 k. J/ j0 d* R; K5 ~# j" ], F; I end;$ l/ d: h6 @: p0 w8 m7 S* D" d
end; -- of the method- y N1 ~- s% `, r
|