/* called by: entrance ctrl of the object 'track'
8 i3 h5 u# j2 z* n*/
2 F% [; N8 o: d& v! i& s4 Y! O- gis
" n! I5 V: w0 J6 f& U# y- o- o part, GlobalDistObj, assignLObj:object;row,Lan:integer;
6 a' p& |# t8 A6 C, g9 m- u6 g+ ]do
7 V! H- i4 i% B ^- W Lan := rootfolder.Internal.Tools.AOLlanguage;% d' V1 l1 E$ q4 Z4 U& C
if current = @.Destination -- else return, V% v- E+ c# a- {, P- o0 C4 `, S) i
then
3 c3 _* T3 ^3 {3 g7 f% }: Q @.Destination := void;& H' d( u, h# c$ v- D
if @.occupied then
3 ^, t& a3 a4 L/ t part := @.cont;
: N8 I, s8 U6 M+ G @.transpOrder := void;( @" I! M% |& ]7 a+ Q
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 N3 R; ?8 b/ ~0 _$ R, _ @,root.eventcontroller.simTime);' t: b; G' K; D. z
@.HasOrder := false;
+ s% [) U8 x6 P, q @.DrivingHome := true;
# N7 U7 ?# e" {% @ rgManager.tryToStartTransOrder;
! J; d3 P: C! i9 W+ h* P if @.Destination = void
/ s- E7 F5 ~9 e: s then -- no transport order for vehicle @, e9 d( _, {0 w: H- J5 E
@.Destination :=
- K, u* s* ^: {$ I$ x* ? rgManager.nearestFreeStation(@,track.~);
& D$ V$ n9 E- m/ U H newDirection(@);
, W( ?$ Z6 O2 n if @.Destination /= void then
2 ^3 }( [6 s$ \. k) V @.Destination.NumReservation :=6 y4 X( T- w2 n6 ~' e, E
@.Destination.NumReservation + 1;
& D5 k- I) c/ b1 \ end;, Z, q" f; j0 C! s; J" j0 M5 r' B
@.CurrIcon := "drivingHome";
8 r" C6 }( g+ |2 Q. N9 y. Y @.DrivingHome := true;1 [% A& ~/ ~0 @6 h) G/ i
end;
0 x, C0 w) S& e" }! Z else -- the vehicle @ is empty, both vehicle and part are in the same dock station
7 ^$ X) p( K- E9 F part := @.transpOrder;# e ?$ B* v ]# S" p) M6 L8 Z, Y+ O. {
part.move(@);-- load part1 ~; F3 d& R" e9 U V0 ?; @
@.CurrIcon := "load";1 Q+ E; v: x* K1 `7 A
GlobalDistObj := part.globDestination;; L; T/ D3 h0 \" w% ]/ @
assignLObj := rgmanager.rgAssignL;
- u% c/ g9 C; _5 j row := assignLObj.getRowNo(GlobalDistObj);7 I7 K b( V' [9 W
if Row = -1 then -- since 70
( |6 G# f6 E/ Z( `; u if lan=1 then# c0 a# l3 Y7 [4 z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 B: h% f- |8 Y$ M$ P to_str("in der Andockstation: \"",?.~.name,"\""));
/ T1 h* V% f2 K+ g9 f- k) \ else% U2 J0 |0 g# F" a; G4 |3 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), e7 ? X$ _! w% ^! _
to_str("in docking station: \"",?.~.name,"\"")); - b7 I$ ~# B# W% B
end;
: m; g, m, i) l$ V" ? else) R* G9 c Q) ~8 _+ `' S; X
@.Destination := assignLObj[1,row];
' z+ [ z) [+ u! M9 B1 x end; $ x5 A( L. x2 p5 T N# u
newDirection(@);$ }# x) a+ X& }0 E, ?
@.HasOrder := true;
' ?( ?# T% @. B2 R( Z5 T4 R end;
7 F9 O1 m& l7 y! H; @% _ end;
: f O7 @- X, ^9 Q5 d+ r- H/ fend; -- of the method
2 O$ V3 X" j. ?- A8 i* Q8 K$ p |