/* called by: entrance ctrl of the object 'track': J0 v. Z1 j" ~& r
*/
0 Y& B2 |1 B8 g+ Cis
6 p& Y) c) j' Q' [8 i9 I: S a part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) Z$ F( L2 l* z) tdo) f& ^, \6 f" x& H# O: M
Lan := rootfolder.Internal.Tools.AOLlanguage;/ z0 b! r5 R, x# S& |: v- D
if current = @.Destination -- else return
5 X( d! M' h6 S/ n, O4 t9 a then
! }( X( G& _- s4 Y3 a5 Z' I @.Destination := void;% `4 M$ D5 d, p9 ]$ v
if @.occupied then
' T' C P. v) a) b1 G Y part := @.cont;
! L; ^$ h' w! Z, Z* l; s @.transpOrder := void;
/ d4 J$ e) J' J9 C4 _ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
?, c9 p* {; o @,root.eventcontroller.simTime);9 l7 R5 t: _3 z* n w; ^% L
@.HasOrder := false;
/ y t* O; J! \/ d* c9 W @.DrivingHome := true;
/ I$ z$ s, X _# f- G* Q# E8 n rgManager.tryToStartTransOrder;, n! o. v( d0 d: h1 ?
if @.Destination = void
' @* \, q. O' Q0 `! m+ A% c6 W6 z then -- no transport order for vehicle @) K) M: m7 w% W3 T
@.Destination :=
5 |7 m; {3 k* h& j$ n rgManager.nearestFreeStation(@,track.~);# {9 y4 F: c8 Q
newDirection(@);
8 P5 [( z; [) ]1 s' ]* ~& W! V- ^ if @.Destination /= void then4 u4 @* L% f8 @4 }! T/ F
@.Destination.NumReservation :=/ \+ [' c3 ]3 g Z4 ?! X3 b# @$ U" Z
@.Destination.NumReservation + 1;! F) @5 C3 c5 e, Q
end;
0 {" i- R) K) t @.CurrIcon := "drivingHome";
1 o2 A) p' u" @* g" h @.DrivingHome := true;+ K% e2 R% M1 {7 d( ?8 o9 P
end;) K* m- E. D0 a1 v. h; _
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( |" H. F1 Z0 ~: s
part := @.transpOrder;
M# t8 }" [2 E part.move(@);-- load part
/ Y" M' @9 r/ b; ], x- g2 s7 Q @.CurrIcon := "load";
' V$ X, L& L2 e5 N GlobalDistObj := part.globDestination;
. L; \+ e! @0 g assignLObj := rgmanager.rgAssignL;
! {" C6 c4 f+ d+ B row := assignLObj.getRowNo(GlobalDistObj);" _; D1 G& d N9 l+ y
if Row = -1 then -- since 704 T8 ]0 w" h- X# Q- M
if lan=1 then
7 t1 A: C$ \" n6 a) R$ n m7 C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: {# e4 v% z: b. m to_str("in der Andockstation: \"",?.~.name,"\""));7 P) u) Y" R. G8 U. M# F T( ~
else- p i F$ J% q
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
. k* [% M; K( [3 `& @% E to_str("in docking station: \"",?.~.name,"\""));
6 e9 F( V4 q3 j' r; @: _# x end;
& ]) x! L' u3 c+ Z- @% k else
6 Q! s2 f* g) y& @ @.Destination := assignLObj[1,row];1 }1 X, |. e# n7 T
end;
& A5 X8 w' U( m% Y newDirection(@);6 S8 x- o i/ |* L0 I0 H+ U9 C
@.HasOrder := true;
# d- O% G' T- G6 `, [* P3 G7 H1 \' K end;
4 j! @* Z' G2 C1 w end;9 u$ _+ r& M4 c$ S0 A
end; -- of the method" E& Z; e1 j; X
|