/* called by: entrance ctrl of the object 'track'7 q, r3 A# S8 c/ e, m, f: z- F9 F
*/; S. ]7 r4 N# G9 r& ]5 R; r, N6 @
is' M; }8 R2 r( z& @" K. q' @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( ~: y X. r% V1 Q* O
do0 p* V) ^+ t: F, X5 Z P$ \. r
Lan := rootfolder.Internal.Tools.AOLlanguage;
5 a. S, u+ E9 Y: G ? if current = @.Destination -- else return$ t) X" [1 D. T4 h1 W0 _% a
then. w8 ^) y8 n( Q' B: T
@.Destination := void;
+ t6 q3 A* I- \, Z if @.occupied then
, [( k0 ]4 F$ T9 ]" T, c part := @.cont;
+ H+ [; v: q- n5 B @.transpOrder := void;& H5 W" }4 h F4 ^3 j5 a/ u
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
' ?0 [/ d+ l. P3 r) J @,root.eventcontroller.simTime);
X; ?6 ] |& ~9 o9 o @.HasOrder := false;4 E. z3 r0 i7 y$ u6 G1 A
@.DrivingHome := true;4 n! p- `" |9 p% D
rgManager.tryToStartTransOrder;
, F- V' J" e7 z2 e, i! z if @.Destination = void
* v. b( A: Y* V; l- Z% W7 [% o$ Y then -- no transport order for vehicle @
0 Z! D+ f. M/ v' k1 o @.Destination :=( ]4 C2 g' S) z- ?# ?* u
rgManager.nearestFreeStation(@,track.~);
: C1 S. T% B3 c g0 { newDirection(@);
5 ^/ [2 f$ L5 e% t7 F' S7 ~; r if @.Destination /= void then+ w( G8 a4 B5 R! ]) Q6 i1 B4 p
@.Destination.NumReservation :=
4 |4 I( J+ C: }: p( f+ {+ L/ B( M @.Destination.NumReservation + 1;
0 G p- E' N! P* Y5 D end;) i! q9 q- U5 o* x
@.CurrIcon := "drivingHome";
; M' f, g( s0 S, x( G @.DrivingHome := true;
5 O Y7 A @2 ]7 c end;
# ]" h, D, T7 G: |7 @ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ w/ q! R$ j" o% f6 x, D$ [3 c part := @.transpOrder;* g8 f7 Z" A0 ?" { [
part.move(@);-- load part
% n- Y# w, L5 c- m0 q! E @.CurrIcon := "load";
/ p3 q) v( n( b0 U" N4 b2 j8 i" Q GlobalDistObj := part.globDestination;. S1 o- R+ x7 q- c* i7 j Q0 e! A% z
assignLObj := rgmanager.rgAssignL;% z' d) @6 v$ c2 o$ Z/ |
row := assignLObj.getRowNo(GlobalDistObj);. u3 a b* e% k$ `' U$ K) O
if Row = -1 then -- since 70
4 `3 d2 p$ V& s) I1 J9 V8 ~0 t if lan=1 then
9 p2 u9 E0 I4 z0 N+ p( x3 I+ K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, f6 e1 A2 t' r6 P, {; p5 n2 {
to_str("in der Andockstation: \"",?.~.name,"\""));
, c. C, B$ _( b9 H else
: I5 z7 U+ c3 t( V" l8 } promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 K6 u- z+ t. {/ y9 N& J
to_str("in docking station: \"",?.~.name,"\"")); J U) R2 @1 y
end;0 a8 c* h1 ?1 k1 s
else2 Q( {: t" |; {+ g
@.Destination := assignLObj[1,row];( S4 ]7 k7 R( U7 `5 e
end; ; f) c. D$ r2 ?4 t
newDirection(@);. n! D' e+ ?" I
@.HasOrder := true;
$ F0 e B5 |) z" x end;. {; ^0 x2 M: j" M
end;; Q/ Z# A/ B( O
end; -- of the method6 g+ U$ A+ k- W: ~; Q4 n* T7 T: X
|