/* called by: entrance ctrl of the object 'track'# x i, e; O- ~, Z3 {8 u
*/
) B( t- D, g6 ?is# a3 y4 [( f5 v% _0 m) d0 T) N
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! J. h) v: d: l& z. o4 d
do
, a% o- D' @ Q6 P+ H4 } Lan := rootfolder.Internal.Tools.AOLlanguage;# ~1 v! w+ K! {/ Q& ]9 ^
if current = @.Destination -- else return
) N4 J. g# b! n- Z; c! h then
* z7 J5 z* L) r @.Destination := void;
0 i2 S( |7 f z5 H9 ~- k if @.occupied then
" f- A& l; D% x5 D! n' Y part := @.cont;& ~& ]* ~- q1 K2 Q8 `
@.transpOrder := void;
* I# y9 i# w& Q( I0 z" h$ c" S( @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: F2 K" O( \& J( c @,root.eventcontroller.simTime); Z! o! u8 M6 D$ P: A
@.HasOrder := false;
2 I2 b$ R3 o3 ^. A @.DrivingHome := true;3 I& Y, ~8 \& N- L
rgManager.tryToStartTransOrder;" K x# r7 ~6 [) p
if @.Destination = void$ Y+ O5 z2 {/ P0 h L
then -- no transport order for vehicle @
, c* V6 k" b4 Y/ q @.Destination :=
7 I# s7 q$ h3 b( `2 k$ E rgManager.nearestFreeStation(@,track.~);
; n7 X* a, b0 H" C' `! I newDirection(@);
/ v; T* X5 @* ?: l$ m if @.Destination /= void then
* }; M. |5 D( _; _2 z @.Destination.NumReservation :=
1 C) m6 D9 w+ E4 ^$ r6 m7 @" C, n @.Destination.NumReservation + 1;
, m2 s$ V; z6 t' ]! y1 u# D! p end;
0 j; o8 _3 b8 S @.CurrIcon := "drivingHome";0 ^3 d5 ~+ V$ |/ @( q! @: k
@.DrivingHome := true;! U) H' r4 P, f" y8 j0 G
end;
. b# O0 E4 Y2 L8 _9 K$ F7 P5 F( L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. a h9 m2 K+ H2 _, L7 l part := @.transpOrder;
4 l$ L) N8 q J4 a, s+ ?; L( B part.move(@);-- load part; y# m6 \# w" o; M$ v) e; w) v: J3 R% P
@.CurrIcon := "load";
- z7 P# M) N: E GlobalDistObj := part.globDestination;
# u2 U* C4 h; c7 }* d: g6 W assignLObj := rgmanager.rgAssignL;- C# U) j& c( b7 ?9 k9 L0 o
row := assignLObj.getRowNo(GlobalDistObj);
. z$ P4 j/ j* k9 h9 Y, c if Row = -1 then -- since 709 h* @$ {! f4 B8 p! n& K' i
if lan=1 then* }) t2 n3 p% W& N$ [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 ?% u" B) H6 x" x* M6 T6 o$ D to_str("in der Andockstation: \"",?.~.name,"\""));: f. C0 T% F$ e `: o$ N/ [
else
' V! S0 q3 v8 g) { promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# g- L" L, V3 a7 u4 k$ Q, q to_str("in docking station: \"",?.~.name,"\""));
* t2 S6 |: E1 g* m- K9 d1 y end;% L6 K- K; `* z* _0 W: ?
else' a' N+ s- ^2 ~* b9 n1 K. P0 ]
@.Destination := assignLObj[1,row];
; G& B+ o1 ]- X$ c% m end; 6 G. W, R( r5 @& e
newDirection(@);
' }* H# b2 u; `5 b @.HasOrder := true;
$ I; N k2 `8 c9 f: f: {: o `; S end;
0 r$ F( |2 q" D end;; [6 v" \# v. E; l& l) M
end; -- of the method# A* I2 C2 {5 _8 Q% x: p5 D
|