/* called by: entrance ctrl of the object 'track'
- H6 t0 l9 t( t6 ]*/
! U+ v! g+ @# r2 C& _8 F1 B, L0 lis
5 m" u/ W L7 d k part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 q& x/ \# W; M* d" @2 J% i
do
; F( t' q; }! h. Q8 Q Lan := rootfolder.Internal.Tools.AOLlanguage;
: u2 C4 ]! ?' |1 T% r if current = @.Destination -- else return
& |7 y8 L7 C* s4 i5 i6 ` then
3 }% E( O6 k* [0 t; z @.Destination := void;
/ l* w3 T! _. W6 o0 D if @.occupied then
# z2 B* ~7 H% B! H2 L part := @.cont;
5 Z3 n3 C' ]. b @.transpOrder := void;; S) B0 q$ Y- h0 T; W+ [
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 V) L7 ?; F5 y/ Y) h, M/ Y2 j
@,root.eventcontroller.simTime);( }! x. y# P6 { a
@.HasOrder := false;
9 e" E7 m" z, o& `2 f @.DrivingHome := true;0 ~( X3 b# g! m0 f' @
rgManager.tryToStartTransOrder;
9 S9 D3 l8 r1 I% P7 K$ e# C if @.Destination = void
# w# Y* k: H' H8 b* _! y then -- no transport order for vehicle @3 q1 M! ?; J, x
@.Destination :=4 A/ s$ _# K- B
rgManager.nearestFreeStation(@,track.~);
4 r2 V. Z- C: U2 J( I newDirection(@);
; u0 Z. g: |# S# r3 ?: g5 J2 g9 M if @.Destination /= void then3 S, B7 `/ r3 y3 D& v# f) [/ }- v
@.Destination.NumReservation :=
, [5 c0 E2 m9 k2 c5 ^, p$ Y @.Destination.NumReservation + 1;# R( z8 K% @5 F( R, h1 j
end;+ m0 J! f0 l5 R
@.CurrIcon := "drivingHome";
! y, T X- O s7 k3 C @.DrivingHome := true;, Q* i# r( N v
end;
C! S" R u# Z3 o2 a else -- the vehicle @ is empty, both vehicle and part are in the same dock station! L. z! R/ Q! a7 F
part := @.transpOrder;
/ v% i9 Y& ?7 A, O/ S' A. Q" t; b D5 S part.move(@);-- load part
0 `, ]( m( d8 g3 j2 I# S/ k! w! u @.CurrIcon := "load";1 O. S: b3 m, P; @
GlobalDistObj := part.globDestination;
# o+ X6 M9 E: {% T: h3 M4 G M assignLObj := rgmanager.rgAssignL;; K& \# w2 |! Q$ P6 z2 @' A3 K
row := assignLObj.getRowNo(GlobalDistObj);, d7 {$ N2 [* d8 N) h. R
if Row = -1 then -- since 70# ~- Y. x! d2 M* k4 L
if lan=1 then
7 @! u% T: p" P+ }+ D, D promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 C+ I5 @ z! Y `0 d to_str("in der Andockstation: \"",?.~.name,"\""));
* V/ V* y @/ {; V) `$ N! G8 h5 K else
0 F. a, K2 \" m8 m) J! S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* D. ?# p+ b( A0 h) j/ a' C2 i
to_str("in docking station: \"",?.~.name,"\"")); 2 ~+ W V a" m* X7 T" G
end;2 B4 \2 ~" a8 E! ^5 L: V% F
else* ?' P. L! y3 R. ^8 C
@.Destination := assignLObj[1,row];7 @0 N4 o) k) n; X& Q+ P% s
end;
4 E( ~3 k" E# F+ G$ f% ] newDirection(@);7 f, R3 q( ~6 M, S% f1 I0 _2 g
@.HasOrder := true;
+ j0 {, f7 ~8 d2 F end;8 m8 Y9 q4 j7 q) a$ h7 G, a
end;
1 O, J) P' U0 J* T+ @end; -- of the method
3 P5 A* G: p$ { |