/* called by: entrance ctrl of the object 'track'
5 ?4 k& r# z& a; f* {5 ]- { n*/
& X3 T A% |, i6 kis/ c& t3 O6 z$ P2 E* ~8 f9 w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
9 l) M7 m4 O* bdo5 K6 W9 n8 m! S5 v, C s7 w% _
Lan := rootfolder.Internal.Tools.AOLlanguage;+ L5 x# |9 j3 c+ Z
if current = @.Destination -- else return
# \( w, x( C8 Z8 Q) ]% e then1 E8 m+ N+ S T; _9 f2 [2 E4 C
@.Destination := void;2 s9 h _ l! h" I, m: N8 J9 [5 w
if @.occupied then
# i" B4 N, e2 z6 K8 m6 P1 x part := @.cont;
: K' g8 W$ ?1 g @.transpOrder := void;1 V1 ~- X- h O; o0 _' P% V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," ^3 Y" W# L5 n b8 r
@,root.eventcontroller.simTime);
$ z: O9 @2 c4 u4 g& ? @.HasOrder := false;
( q) q; W* v; M0 t% d" ] @.DrivingHome := true;
8 S& J) F" e' a, A. I. l0 ]! @ rgManager.tryToStartTransOrder;9 T+ ]5 n6 D* D8 w6 }9 C+ K
if @.Destination = void
V, H) s* c- C9 o( T then -- no transport order for vehicle @" h) c" m) Q6 D3 P4 F- b% r
@.Destination :=
* c4 Z& e+ Z- Y# x" Z9 X& d8 M rgManager.nearestFreeStation(@,track.~);
6 X ~. q) W( R2 | newDirection(@);
. ]( H# O; d$ _' l! P if @.Destination /= void then& R; g. t- _! y! F `
@.Destination.NumReservation :=
4 z$ v) d2 B, n! S. t/ d @.Destination.NumReservation + 1;+ i& ~6 W2 Q! L, l/ \: R) D7 W
end;! M6 ~$ I5 x1 h, g N
@.CurrIcon := "drivingHome";3 \# ]9 ]; }" ]; J3 W) W
@.DrivingHome := true;* t7 a9 M B4 x7 k s
end;
+ M5 i3 S! V- W else -- the vehicle @ is empty, both vehicle and part are in the same dock station
1 b3 H6 E, J7 h" a( O7 x, a part := @.transpOrder;
) f3 p3 Y. B- ]6 t part.move(@);-- load part5 ~- k5 ?9 {: I
@.CurrIcon := "load";$ o0 G/ y) u4 U" J
GlobalDistObj := part.globDestination;* p7 [: }. q; \- L$ V$ c1 I0 V
assignLObj := rgmanager.rgAssignL;
, d( [" P, n6 H6 w/ Z row := assignLObj.getRowNo(GlobalDistObj);
4 Q( z. @# S% |. U; T5 D if Row = -1 then -- since 70
/ _% d, Q+ u2 h: u/ o if lan=1 then2 W. D& K6 E' @& f* d4 X8 \. ?
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
9 |) W- ` O. C) x) r8 O to_str("in der Andockstation: \"",?.~.name,"\""));
I' z5 M- b) F2 X else
1 o. H' z! k: f% j5 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),# V( j. l# q; X# V q
to_str("in docking station: \"",?.~.name,"\""));
$ |! m. x9 j" E- C. Y end;
9 Z( @5 ?- C J( B: f else! |5 N! E( i- m9 ~
@.Destination := assignLObj[1,row];
6 K4 T+ E f0 Y; q5 V7 e& z# z end; & q+ [$ }- i4 d1 }7 W% q/ t; c% @1 i
newDirection(@);
7 r: A' u8 D! U; u7 d2 V @.HasOrder := true;; o/ j+ t" W- F7 D5 I1 f
end;
3 t6 i ^( v! z0 ?5 Z. n5 y end;
( X! \4 [5 J. ~! B6 jend; -- of the method
2 P6 @0 z( `% }' [; _/ z |