/* called by: entrance ctrl of the object 'track'
; L# }& Q" y% @% ?9 Z*/
& G2 P+ C/ t5 S8 `is3 ?4 S* E. j; }8 H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
x% L3 R7 q# |5 X9 e) b2 [do* d8 y1 H( x7 ]
Lan := rootfolder.Internal.Tools.AOLlanguage;, D) c {* ~3 |9 K
if current = @.Destination -- else return, q- W; r2 A- A: y
then% B# k7 k% y) l) _& V
@.Destination := void;
2 h( f4 Y5 |( l, d& }8 q! X if @.occupied then
: I- x/ Q1 ?+ i2 F: s z) I" u! n part := @.cont;. Q) `1 `( A A. W4 B
@.transpOrder := void;2 m' m- f( f0 y" p( i4 g
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 l" m; n! t3 \' X- F6 k
@,root.eventcontroller.simTime);, f0 b$ q6 H) u6 j
@.HasOrder := false;4 S8 l8 r- X5 ~3 u( k9 K
@.DrivingHome := true;
9 y0 r) P$ j I( _8 K6 j9 t$ E rgManager.tryToStartTransOrder;; T; E5 E& e' F* L: C- t& R1 a W
if @.Destination = void$ v. U! t0 Y v* \# P! y) p2 r
then -- no transport order for vehicle @7 s& n; _3 C$ { W+ ^( f- [/ s5 x! x
@.Destination :=" v1 j0 ^* ~* T1 M( L
rgManager.nearestFreeStation(@,track.~);
# o. R9 @" Z6 o+ \, m newDirection(@); 4 ?: T* M% N m, i- W8 j% g T, M6 Z
if @.Destination /= void then
/ _. u' R$ Z+ B8 p, ^) l: J- x @.Destination.NumReservation :=
$ _; b% U6 A2 k1 ?8 u* r- t1 u. Q @.Destination.NumReservation + 1;7 e* }* E6 K+ R5 p, U! g* K8 O
end;
# f, k$ b! O* k& s7 y1 R @.CurrIcon := "drivingHome";8 l2 Z: a0 M1 v: _1 s
@.DrivingHome := true;8 ?8 h5 V0 e9 ?
end;
& n$ s1 O9 {( N8 E1 V$ S else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 [8 ]; h& L4 k4 A- P1 m, H part := @.transpOrder;/ d! L4 |* _: a- W6 o
part.move(@);-- load part
) @1 S3 c5 J# c$ _! A" r0 E2 p @.CurrIcon := "load";
' f- D; l3 w3 \% V GlobalDistObj := part.globDestination;% M2 v& A/ Y2 ~
assignLObj := rgmanager.rgAssignL;$ x" P% B# n8 ?" X) j, n
row := assignLObj.getRowNo(GlobalDistObj);
: Y/ b% g) {: i. Q if Row = -1 then -- since 70
$ U; K8 {; X0 d% k if lan=1 then0 X3 N- ]. N% G3 ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Y- ~; |3 `' _8 \) p N7 C) { to_str("in der Andockstation: \"",?.~.name,"\""));1 [ U0 w1 T- S+ ^+ Q* `) [
else
& x% M" @3 ] }; \ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
5 H7 n) Z$ p. A0 ? to_str("in docking station: \"",?.~.name,"\"")); 7 I& Z# l2 L6 V
end;
+ c- x9 z' E. ^* x0 x: M4 ? else
U% f+ ~: q+ [6 F. @% K @.Destination := assignLObj[1,row];
5 t" S5 i0 O0 r+ N: i- d end;
+ }8 w' K& M/ Q" x$ Q! F newDirection(@);: b+ x0 ^1 v3 F, T/ N2 {
@.HasOrder := true;+ Z( t2 x) e2 N% c, x. ~. H1 ~" t
end;
6 c( s: r% y3 N9 X end;
/ O4 }2 h0 d4 n# n2 I7 t, W% yend; -- of the method- g0 k: T7 b) b6 s1 W! a/ v! d. X
|