/* called by: entrance ctrl of the object 'track', q0 {7 Z8 L3 I6 ^5 f5 y2 Q1 P
*/
. e' e! P0 ~" i$ a7 i2 Z8 ?" xis
2 s% o7 Z6 |+ S; A& s part, GlobalDistObj, assignLObj:object;row,Lan:integer;
' }* F- u" @" I- G3 u. }1 L& bdo
' u/ a4 G+ [3 u9 r% U, F Lan := rootfolder.Internal.Tools.AOLlanguage;
& \* [# `2 j$ ~" K2 E: i( r if current = @.Destination -- else return; k' P4 z9 O6 ~, i; K3 ~8 m/ A
then2 X& Z/ X% L$ z9 s
@.Destination := void;
# Q# V7 _% n8 X3 t0 C( P' V if @.occupied then0 {( r4 }* v, c5 i8 y# G( ~5 L1 {* @8 F7 A
part := @.cont;7 B9 r% ^$ n- W5 N- ~1 I
@.transpOrder := void;
. X1 c& q* c9 Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 J9 T: N' ^- O" A( Q% @
@,root.eventcontroller.simTime);4 D, z6 L: _/ F3 o1 W
@.HasOrder := false;
5 w$ t/ P/ ~$ o+ ?7 C @.DrivingHome := true;
9 t6 A/ }+ g( l% f+ x2 Q- m- q rgManager.tryToStartTransOrder;
, L. q4 L1 W7 p( k+ B: i, k2 Y if @.Destination = void3 G) A7 v& n9 ^, p- i. F
then -- no transport order for vehicle @
- b6 L3 X% e5 ] @.Destination :=8 Q. G7 u: J' M& F" J* F
rgManager.nearestFreeStation(@,track.~);
3 d s* f; x. u* u newDirection(@);
: d" a1 M( V9 D s. _ if @.Destination /= void then; n* p3 a% S$ t# W# n
@.Destination.NumReservation :=
3 y+ r+ S* [, F+ q" C @.Destination.NumReservation + 1;: H' _1 u- I$ l) B K, t. p0 U
end;
2 U. C- p/ f. [( n @.CurrIcon := "drivingHome";7 r7 z0 L9 `/ U- ~% g
@.DrivingHome := true;$ F- h( C$ W1 j
end; P' p$ H) s2 o( ~, G
else -- the vehicle @ is empty, both vehicle and part are in the same dock station( B5 D% Y2 ~8 }- D y
part := @.transpOrder;5 c3 y) r/ n" N( A1 r, _* s
part.move(@);-- load part' V+ W: i$ q5 Y
@.CurrIcon := "load";
8 j' s X! j6 n% x; y GlobalDistObj := part.globDestination;' e4 y3 l2 y& L8 ?
assignLObj := rgmanager.rgAssignL;
# h1 [4 ]" l* m" v% q" v& d$ Z row := assignLObj.getRowNo(GlobalDistObj);0 _, [9 \2 |3 {1 ]7 g4 _
if Row = -1 then -- since 70
+ w8 ]* m2 V4 E; [" P9 X/ K9 [ if lan=1 then
) o# y# L4 W0 g5 i2 D; N promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- x! v& B8 J: x r4 c# |; b0 X
to_str("in der Andockstation: \"",?.~.name,"\""));
7 t' t9 Z; n. f else
& t+ m0 e4 _" _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),3 E6 `& a' x9 B' t; m# J
to_str("in docking station: \"",?.~.name,"\""));
! _+ U1 T/ a/ y. s8 q; D! A end;
. o4 L$ @/ O4 x: T! r9 a else. T" t( q/ l- `8 l$ z
@.Destination := assignLObj[1,row];) q- H3 {0 G- E, F1 ^. e
end; 9 ^" C7 t# h- x$ x7 K+ \1 v2 l7 ^
newDirection(@); N) K! L x9 U( W; p
@.HasOrder := true;9 {: h- O) [$ [: [; Y) F( F% ^
end;$ N9 h( k$ S6 X$ \1 t$ G
end;3 c/ i" D8 h ]. N' ^
end; -- of the method
, Z+ n |5 V, b2 n* X) c+ { |