/* called by: entrance ctrl of the object 'track'( n% b4 _: ~# F8 `+ u
*/% B/ h; X6 G6 d* e9 h
is
2 i4 K, q) O4 [3 E+ T: q/ g part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 v$ X2 A/ {# I9 k& Q0 b& J
do+ E, M! I/ V& B4 P
Lan := rootfolder.Internal.Tools.AOLlanguage;- v; k0 ?$ z4 W6 s$ @: `/ A$ W6 P& z
if current = @.Destination -- else return
9 V8 }: D3 c/ U2 J then8 d5 Q8 P2 I: Y. D3 x% Z4 @1 Z
@.Destination := void;
( n$ e4 P2 U5 y. R/ U) n if @.occupied then/ F6 ~4 p/ E- L( c, V3 V; f% U
part := @.cont;
- C. {* j2 e$ | @.transpOrder := void;
: k% [% L2 Y7 [$ w% f4 n E$ ] part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. J; w0 X" B& p' g @,root.eventcontroller.simTime);9 \$ C. `1 Z- {& _9 y+ M
@.HasOrder := false;
; W8 D2 f; o& m @.DrivingHome := true;* |# ^+ v {8 w
rgManager.tryToStartTransOrder;1 c9 W% n& ^1 N/ {& u
if @.Destination = void
$ M: v7 K- x7 p0 l* X1 d then -- no transport order for vehicle @
# g6 C% E" r9 v @.Destination :=: }6 ~+ r% `& M! A
rgManager.nearestFreeStation(@,track.~);
3 f; b) e, j7 H; U; ~2 k newDirection(@); : r/ X! Y! q- [9 X# E$ x
if @.Destination /= void then( O; H: X! q1 |8 `$ |" n( Y1 @
@.Destination.NumReservation :=
; N! \2 C( M: A+ s% a/ \ @.Destination.NumReservation + 1;( y2 C' F! V. o6 j
end;
1 F' K [ Q+ }2 b, Y @.CurrIcon := "drivingHome";( _/ h2 i; y) ]0 _
@.DrivingHome := true;+ ^4 {( S: x6 Z7 }
end;
+ l. J# v8 S6 ?9 C+ v; I else -- the vehicle @ is empty, both vehicle and part are in the same dock station( P2 q8 D* C2 O8 Z6 x
part := @.transpOrder;
0 Q) |; I& C8 W% d/ y1 Z part.move(@);-- load part
* B: o- E. Y5 S' R" V @.CurrIcon := "load";
$ _+ E# U2 N# ?* k# j8 N GlobalDistObj := part.globDestination;
- c- J1 n- x7 A& w' h$ l assignLObj := rgmanager.rgAssignL;. z1 t1 L# `9 l% S+ y. _" Q. Q! _
row := assignLObj.getRowNo(GlobalDistObj); L* n: `, D/ r6 ~- r3 D
if Row = -1 then -- since 70
: \) r" g. {; B( b0 T2 }' t if lan=1 then
2 ^6 y: F! l2 j( J promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! z/ ]; _6 T& \, a2 J% V. ?3 e" O
to_str("in der Andockstation: \"",?.~.name,"\""));
+ q0 ^1 m- ?* @/ Z else7 G* ^& r# S7 _6 [1 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
6 A0 T" E4 ?* J9 L8 y to_str("in docking station: \"",?.~.name,"\""));
6 D# P6 i B8 O p3 _6 k- \ end;
. D/ l* W+ H, F$ ^# f3 e/ v else M; Q- u3 I/ i% V/ g
@.Destination := assignLObj[1,row];
2 J7 l9 l: G& f$ Z% F end;
! m/ {% b+ ^9 h% p9 `' j& m newDirection(@);& l' C7 f. U2 l+ c3 V) e& K3 j. N
@.HasOrder := true; x0 Z R2 X/ f, _1 w
end;
4 M/ G. k g! q end;
, f! R' Y9 [8 J1 }3 o" D: f0 ~5 Cend; -- of the method! w7 P/ t& x0 w- ~0 x" d" y
|