/* called by: entrance ctrl of the object 'track'2 K$ q" F" w" L: X
*/
% L4 B" U7 d, t* n/ B1 D. A0 Lis$ l7 s/ s( t4 N) p2 t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ ?9 V5 k1 i; o0 P
do
5 V, s* v# |7 ?5 F Lan := rootfolder.Internal.Tools.AOLlanguage;) Y. x) g! R, S6 V
if current = @.Destination -- else return
% j4 h" x4 {4 ~1 _' j9 u then9 L/ g- F' ~0 B) s2 _; X8 k: ^1 k
@.Destination := void;
* H7 v7 l" ]* _0 A) @( q- G if @.occupied then" M+ h2 }8 g( {8 c
part := @.cont;: q/ _. E$ ?; W* J
@.transpOrder := void;, T6 E9 k2 T2 c. w% n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
0 u8 o1 S! W+ E0 t$ Z @,root.eventcontroller.simTime);+ h5 d! V C; T8 U. r
@.HasOrder := false;
7 I8 Y1 e" q1 w# M @.DrivingHome := true;
4 v. E# C& F" N rgManager.tryToStartTransOrder;: u: I" \& Q1 o1 h( W: I' i
if @.Destination = void
1 a3 H) X4 V' J! W% ? then -- no transport order for vehicle @
( k- @% Q0 h! b0 Z& [8 d; e7 n @.Destination :=
9 G2 Z# ?- g9 b# G& z' k rgManager.nearestFreeStation(@,track.~);# H* Y) ]2 k, f
newDirection(@);
2 u- R! B# z5 W7 r3 m if @.Destination /= void then
' H6 q/ H# P( N0 \ @.Destination.NumReservation :=
! F+ D# L3 [2 u6 L4 r @.Destination.NumReservation + 1;
; b' e0 w& p$ b, [ end;' J+ @. M U s3 r+ w1 L3 V
@.CurrIcon := "drivingHome";
7 \1 M$ ]3 }3 m @.DrivingHome := true;! [2 H) p0 z, [
end;: c' |; D( l4 d) X
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' s. g" m( B/ ?
part := @.transpOrder;! M0 t" S! K' s
part.move(@);-- load part
; C" x/ f. \* ^& `- |" u' C7 k @.CurrIcon := "load";' g% ?8 D4 ~) S
GlobalDistObj := part.globDestination;
5 D' K* @& [' J' U assignLObj := rgmanager.rgAssignL;+ e' M4 a& V7 P4 l& a$ ^3 `
row := assignLObj.getRowNo(GlobalDistObj);
' k/ [0 [# y; `& w6 ^ if Row = -1 then -- since 708 R6 i$ ^) m4 e& T5 K
if lan=1 then
; F( s, t9 v2 b d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% z2 R# C- ]; \& u! | to_str("in der Andockstation: \"",?.~.name,"\""));
' r. d. H8 a1 ?( j; Y else
2 T" x( O4 u) b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 j6 o/ U' F1 A- W6 g& D; b
to_str("in docking station: \"",?.~.name,"\""));
# ?$ H0 p. a: d6 U l2 k end;
: C; b; m" `* u* m, ~" G else
7 J% |0 I D9 T1 S0 z$ e. | @.Destination := assignLObj[1,row];, Z% s" E! e+ D0 K5 D' R3 \
end; 5 I5 i: v1 w$ h1 i0 q2 i
newDirection(@);" R% ?/ J* @; a
@.HasOrder := true;
& f1 Z& m7 ?4 }8 L- I/ `+ T5 |" O end;
; U2 O5 N7 A5 t7 `# v$ l0 y1 d end;
! W* [- \ K) B* S" r% c5 L" Mend; -- of the method& N& ^3 b" B. ~3 K6 D% ?/ J7 t7 u
|