/* called by: entrance ctrl of the object 'track'
. ]! b8 _% |) A: l- C) s# W*/
: R- G) _4 G9 a) ]" i$ Z% u7 Y" ris' p1 p! B; }, l& c5 r$ ^2 a- T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' Z( C9 O3 A7 v* l8 W! P% _1 ?. @do, j2 f. u: \) P6 }
Lan := rootfolder.Internal.Tools.AOLlanguage;
" W, Q" R s2 S5 S$ d n if current = @.Destination -- else return" p" a- G6 P. _* ~ C2 Z
then y. j9 D: P4 u* f8 Z
@.Destination := void;; {9 S9 o8 G" x8 B C% z+ }
if @.occupied then; \5 k* U* Q- j2 i" ]) x; Y
part := @.cont;9 ]9 A% b- `9 E
@.transpOrder := void;
$ O/ C h6 V" I part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,. _$ P2 d& M7 ?1 j3 t$ i
@,root.eventcontroller.simTime);! h6 C( ]! r8 c: ?% B
@.HasOrder := false;4 S* s" U- [! X9 _4 y% z( Z5 X3 t
@.DrivingHome := true;
: S0 m3 r/ d: T" o/ W$ w rgManager.tryToStartTransOrder; W" i' I& h! Y# E; p
if @.Destination = void9 n5 C3 O# @3 W( H4 Y# O+ k/ v- H
then -- no transport order for vehicle @2 I% r1 [( H( c4 k' v
@.Destination := B; G' ]! ] \* Y7 M
rgManager.nearestFreeStation(@,track.~);: W. _- S" Y% x/ t% _
newDirection(@);
8 e2 t7 K2 N7 p* K; b) ` if @.Destination /= void then
# J6 x8 f# V: h0 c0 H' Q @.Destination.NumReservation :=
2 C, l, f, _4 w2 m @.Destination.NumReservation + 1;9 j# k7 m& _; z0 Z: Q
end;
; I3 u3 B6 t# Q& w& i) @6 w8 o4 _# w @.CurrIcon := "drivingHome";
2 ?3 K0 V; q" E+ [ @.DrivingHome := true;
" ]$ X) |0 q, g3 e end;
) V' F1 l( |- |, Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station) t5 D9 i. g6 N4 O
part := @.transpOrder;
% C$ H9 p% Q& b2 m6 W part.move(@);-- load part% V \2 S0 [; M# ]& a! @% N" t) W
@.CurrIcon := "load";
0 f) f2 u2 G! t( `# \; y4 z GlobalDistObj := part.globDestination;
* u$ W6 B# j) E* e assignLObj := rgmanager.rgAssignL;
% u3 j3 M. q4 b# d0 R row := assignLObj.getRowNo(GlobalDistObj);) Y$ S" w# E0 g
if Row = -1 then -- since 70+ v% u" i, S9 S: z3 W; z
if lan=1 then
+ G( j7 e0 N; V0 r0 H7 _/ P) \0 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. @ l3 h5 I8 ^6 f2 P, W; N3 u
to_str("in der Andockstation: \"",?.~.name,"\""));8 ` s% r% L1 h
else
8 t# j. o" n$ D7 [ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 z& m* t- p( G$ m/ ^% m* x* z to_str("in docking station: \"",?.~.name,"\""));
; P" E! a9 F$ V1 _% H8 }7 W+ S end;3 U1 u: i; S+ p7 g; Q0 c
else$ T8 ]! w$ _; K) m; W o) |5 P( e6 B
@.Destination := assignLObj[1,row];
1 U1 R4 m: b, W2 M end;
/ x) d; X' R7 K4 q3 m* _9 R newDirection(@);
: |4 Z; m/ ?# f1 Z @.HasOrder := true;& M, o4 H5 E W# ~! T2 Z
end;+ q8 L- l0 d% F' ]
end;
; K H1 t m5 h( iend; -- of the method" N" g. R: x# n
|