/* called by: entrance ctrl of the object 'track'
4 Q% \& h0 Q4 o4 E( z) z2 S*/
! {1 {, d* f. Ris3 E) y2 @& ^3 P$ r( U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 H. S0 L c6 z% p
do
; ?- g) |0 A9 _ Lan := rootfolder.Internal.Tools.AOLlanguage;
6 U6 _1 B1 [9 y) z: x+ f if current = @.Destination -- else return
7 |! [: K, v- [% p: n then* W% T+ E3 F% H3 x4 T9 \4 D% a
@.Destination := void;
3 E: c4 ^/ w z# V if @.occupied then
# H: h0 H/ `! x1 D; J m2 a part := @.cont;
! N) W1 r; x) b2 J: e9 X @.transpOrder := void;- ~- I) l0 B8 A! [" A; r! ~4 \3 q9 N
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( N7 \6 [0 ^ J9 k1 E @,root.eventcontroller.simTime);; y, i* e6 g& v9 r* E2 Z
@.HasOrder := false;: E. j0 o2 W4 S- |& N, p1 j: `4 t
@.DrivingHome := true;
' D4 V! {# N" A- ~1 [6 O, ? rgManager.tryToStartTransOrder;* y9 ^ J: q% J9 p
if @.Destination = void8 x" G5 T& N9 t* m' E
then -- no transport order for vehicle @
2 E% [6 o, k6 i, ] c. q8 w; c @.Destination :=0 \( H+ ?9 V4 E4 j6 I' o7 j
rgManager.nearestFreeStation(@,track.~);
: ^" E6 t" Q) [% B newDirection(@);
/ h4 B( p8 ^7 i4 v) j if @.Destination /= void then& _) G* q5 w# G V$ M, Y7 K
@.Destination.NumReservation :=+ j- n, |& E I2 B a
@.Destination.NumReservation + 1;: z5 x7 \$ G# P- ~8 r) L& H
end;
7 {/ Z2 Z( |) ` R& S( w t @.CurrIcon := "drivingHome";. e1 S3 ?- U' q+ `$ @2 i
@.DrivingHome := true;
3 \/ b. }* c, `- B9 v3 f, R end;$ Z+ Q$ l5 j+ R- D7 _* {! \4 E
else -- the vehicle @ is empty, both vehicle and part are in the same dock station+ N' F' g& T; J1 Y/ u+ u+ h
part := @.transpOrder;. ]. `, k2 w+ M J( A" b$ x+ @
part.move(@);-- load part6 |- b8 H+ ~* _: _ l. Z
@.CurrIcon := "load"; y' h; e8 m% t& @1 S
GlobalDistObj := part.globDestination; ~9 O, Z" }/ i3 R! O1 v
assignLObj := rgmanager.rgAssignL;3 e8 a/ P& u8 Z) S6 |& ~
row := assignLObj.getRowNo(GlobalDistObj);
2 ]$ k" \( @- | if Row = -1 then -- since 70
! q) W4 z% [- D5 {7 z if lan=1 then
" J v% l$ ?. d# k# C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: O# f, e, ?3 O2 Z$ t; T
to_str("in der Andockstation: \"",?.~.name,"\""));
7 d6 r' Q) k" T# h! ^ else L6 M$ B% K R3 _6 t
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ N, X- D/ i6 U7 a; i6 M to_str("in docking station: \"",?.~.name,"\"")); 7 K" b6 Q8 ^; y1 z; `( c
end;
2 c- t/ O5 Q& w3 [) o! V else: Q( |* L: R# O" U
@.Destination := assignLObj[1,row];
6 N- I' ?* e; V" C# K0 w, i$ L, ` end;
7 n! D z8 h9 n [1 j newDirection(@);
- q; j1 R, K0 m% ]; A% r% o @.HasOrder := true;
1 Z8 W- Q$ a& p0 k3 V end;
9 t0 U' S) L0 m' N9 T* p4 B% ` end;
% D- @4 l6 f* ]8 d9 H; \end; -- of the method( f! \3 q, S9 C# X3 A
|