/* called by: entrance ctrl of the object 'track'+ d& T& ?: \! [- _; r# ^9 U
*/
& ?0 Q, a+ _7 L" ]is. I- B3 T+ t& F) H
part, GlobalDistObj, assignLObj:object;row,Lan:integer;0 h5 y) L! @ d) ~9 S" I
do
4 ?+ W w* P M. ^ Lan := rootfolder.Internal.Tools.AOLlanguage;
$ k$ d, t; y9 p# Q' G4 f9 W# m3 m if current = @.Destination -- else return
4 _8 j' v% D0 v% R$ Z- x( k$ S then
. B+ Y* M' T0 b: c2 @3 K @.Destination := void;) J4 u2 }( f/ E$ P
if @.occupied then2 l% {8 o- ]" w$ K" Y1 @- c2 }" ^
part := @.cont;
% l4 E- |5 l: A# b+ z, [6 ^ @.transpOrder := void;) g; D1 L+ t D& g* T5 \
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 E0 G4 w+ R% F4 C2 K! Z$ p) L
@,root.eventcontroller.simTime);, T5 q0 ?+ h. B- E
@.HasOrder := false;, K$ n1 o. @, Y5 f, R
@.DrivingHome := true;5 N- d5 e! F3 v; ]
rgManager.tryToStartTransOrder;
) z. D/ i- G4 c. F% M4 A if @.Destination = void! }: |* H r; F# H
then -- no transport order for vehicle @" L, l0 p+ T% K1 d" J$ \
@.Destination :=
! ?& M- a3 z/ `: Q- |# N3 k3 l1 m rgManager.nearestFreeStation(@,track.~);# P" N! W: `# | [4 G9 y
newDirection(@);
* X" ]: T; f _- r$ v4 J if @.Destination /= void then( q: D9 N: R* O, O4 y2 n) [
@.Destination.NumReservation :=
3 i8 n2 y& V4 q# p5 v @.Destination.NumReservation + 1;
, f- e& L; {- M" E end;
: O3 l+ Q% g9 ] @.CurrIcon := "drivingHome";
& h5 N9 _5 b$ X3 C1 k% a @.DrivingHome := true;' w" w7 I7 U! y( Y
end;! U5 L, {/ W9 l# R+ j0 v, J) l( p# I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 I/ B8 F7 _( r$ i7 I4 z) }
part := @.transpOrder;. U8 `- M+ |$ B7 m0 s+ L; r
part.move(@);-- load part/ v, E/ @9 o) d4 [# l/ G/ ~
@.CurrIcon := "load"; ]( k, b5 [! I& I- G5 x' d: v( N& u
GlobalDistObj := part.globDestination;
" @; a( q+ p. A; V1 Z assignLObj := rgmanager.rgAssignL;) B+ V. K: g( P) E% W
row := assignLObj.getRowNo(GlobalDistObj);
0 F6 |" g- d B* B% f8 ^ if Row = -1 then -- since 706 ?" z4 x( C1 U* G1 H! J: ~6 r2 N
if lan=1 then
; g+ T- \, X4 a* { promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 w( b& Q2 h! R) V3 S7 k3 \' \
to_str("in der Andockstation: \"",?.~.name,"\""));# F+ `6 ]1 y0 n" i: R8 @2 k
else$ e8 E1 c7 t( C- ?/ `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) U; S; Z1 z$ r to_str("in docking station: \"",?.~.name,"\""));
4 k6 f4 ?0 c$ I! Y- H E- ~: I end;
1 {* ~ O, q; `+ p! ] else( T; ?( ?; q( H
@.Destination := assignLObj[1,row];
+ x D6 z& p: A& p% B- `# l end;
D1 [ Q* o. N% x- h9 | newDirection(@);+ [/ Z a1 \9 w$ c; [! W
@.HasOrder := true;
& u! H/ Z+ E$ y5 x; n end;
9 L- b" }( @# W. u end;
E, J7 b' q% P* g/ oend; -- of the method
; `$ p2 n4 D/ n% x1 s |