/* called by: entrance ctrl of the object 'track'9 D, F* P8 t9 b
*/# N& |2 l# [7 E; u) x2 B5 g* @
is2 J# I: n8 s5 C; X* A( p
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 x* T/ ]9 I# r: D7 F1 F
do
/ K3 A* i( f9 v% e. ~* S# ` Lan := rootfolder.Internal.Tools.AOLlanguage;, [7 y" u' y, N1 \8 P7 Y% Y
if current = @.Destination -- else return& {6 R% `8 N7 X, E! q* c0 Q: S6 s0 d1 M
then
' }, \: r2 L& @/ d, z/ \# q @.Destination := void;% U: x1 h9 O7 ?
if @.occupied then- W) P* ]0 ?6 T. S3 X4 a
part := @.cont;- c2 q" M, Q2 g6 S: O) j% a
@.transpOrder := void;3 Z2 c& W" j2 Z0 F
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ p3 c* U0 l/ ^( v
@,root.eventcontroller.simTime);
7 R2 X! s2 A; O; _7 W, | @.HasOrder := false;' s( N& I: _' S5 T
@.DrivingHome := true;
. h7 m% @" i' M T( a rgManager.tryToStartTransOrder;1 a- {( t& d* V9 A
if @.Destination = void, P4 s( v* b# ]
then -- no transport order for vehicle @% r7 t" K; v& D% q/ W6 G0 L- [
@.Destination :=
- E: x7 g% }$ O% Y' l7 D, ~' c rgManager.nearestFreeStation(@,track.~);& y3 p& C R u. p2 z# w1 U
newDirection(@); 2 }# O: |5 W% d a, y& J( l" x! d
if @.Destination /= void then7 _# i' u7 F8 p) g6 L
@.Destination.NumReservation :=
7 H6 _% u s5 c, }& n6 }! D- F @.Destination.NumReservation + 1;
0 {& `. p$ J; _& }) i! d$ y6 C end;8 G/ [7 U6 A. e* w4 D. I/ q/ p2 \# r% O
@.CurrIcon := "drivingHome";
. b1 d: U7 a* V2 P4 k3 x5 ?" d( n5 m @.DrivingHome := true;
8 R) z- m1 {; ] end;
" N& t* v* d8 y X' z else -- the vehicle @ is empty, both vehicle and part are in the same dock station3 {( E# m. r0 Z- }3 J; I# u P7 p
part := @.transpOrder;
) H5 e0 p4 X$ z( _ part.move(@);-- load part
$ w7 H! [4 h. Q" |& s7 J @.CurrIcon := "load";
7 }) j8 b* p$ c. q" h( @, a GlobalDistObj := part.globDestination;
2 Y+ A4 {+ _3 ^0 {) [ assignLObj := rgmanager.rgAssignL;# m; E9 U* h/ t4 b: R% p9 G
row := assignLObj.getRowNo(GlobalDistObj);" p: g* @) `- w/ o
if Row = -1 then -- since 70
A2 P; l2 i, t3 f if lan=1 then2 z+ j' A! g& F/ b% p" \) ?8 G
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: D) R1 A! Q% N& _5 |6 ~
to_str("in der Andockstation: \"",?.~.name,"\"")); C; ~/ b. e8 A9 W8 N( n
else4 Y6 ^4 I8 @6 _( o' r% a! V3 k
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, |& t$ ^0 m! s/ c to_str("in docking station: \"",?.~.name,"\"")); * U4 ?! E0 x5 F2 R
end;) h2 g; N2 |5 q2 `5 A) f: e0 Q. v
else+ U# r, U" R, S p- q9 R7 u
@.Destination := assignLObj[1,row];
& q! U) N3 J0 k5 p6 R7 `" I% p6 U end;
! _2 I/ ^4 X4 C# C F newDirection(@);
1 d) L2 e1 |! G$ X4 b @.HasOrder := true;
" I6 J T: ]& K7 ~6 _% f" r/ n/ G end;/ X3 E" V* S# w& C% F
end; g, v$ F- [4 g; B% ?
end; -- of the method* s% K$ v( m7 f7 N( |* F% ^
|