/* called by: entrance ctrl of the object 'track'8 `) z$ S3 E' x7 z0 r9 F$ b
*// u; ]- G6 q ]
is6 I9 o( A }8 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 c1 _9 t% x1 N6 w
do
% I+ U0 P) B# ]; N8 i Lan := rootfolder.Internal.Tools.AOLlanguage;, a- y2 g! Z; \7 e' |9 L
if current = @.Destination -- else return
1 s P* s1 S0 \ then- D2 `- E( Z+ V4 A
@.Destination := void;- ^% {, y$ n6 f% L( H- q# ?
if @.occupied then q" J0 K, E) n1 a, F) L
part := @.cont;. `& i! }: f. `% {1 H- `5 s3 B. ~
@.transpOrder := void;
5 s; k. V# x! s3 h* ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 E3 j8 T/ C* W8 f8 `
@,root.eventcontroller.simTime);0 j5 H9 q( D! K( F4 i8 s
@.HasOrder := false;* k! R3 ~# e: W3 b( P$ N6 M) }
@.DrivingHome := true;
9 M: A8 T! M- K% I* d2 ~8 `6 M# t rgManager.tryToStartTransOrder;
2 k- T: @- S2 r7 Q8 X& b if @.Destination = void
6 @: n$ I V4 y0 p# |( e then -- no transport order for vehicle @
) X( T' \/ \9 q# M4 N: x @.Destination :=
- N- h$ _/ l1 i; ? rgManager.nearestFreeStation(@,track.~);) s, ?% @. i o! B7 I: x
newDirection(@);
4 H; v1 }5 o, ` if @.Destination /= void then9 `3 r! F$ [- g1 W$ ]( `( ]' ^& b
@.Destination.NumReservation :=
: W5 [2 t* o8 R/ H @.Destination.NumReservation + 1;0 m$ I$ y. @' V X8 [
end;
B2 X" G/ ]. P" c; h9 ?: c; l @.CurrIcon := "drivingHome";
$ m2 ~) f$ Q' m" Q/ ^( J5 A @.DrivingHome := true;. r1 x u7 N$ c1 p4 m6 {2 C$ p2 J5 R
end;+ h6 F( J( q6 D* [" V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
3 h$ h% l- S: G! H, G part := @.transpOrder;
) W& h0 \6 V+ q$ G1 W part.move(@);-- load part
& J* Z/ A6 G5 K; c0 _! G' _# w @.CurrIcon := "load";1 s2 `; A, M; Y" G
GlobalDistObj := part.globDestination;
" V* p$ E6 }* }: R. q0 F* O! K v assignLObj := rgmanager.rgAssignL;4 w' o0 e1 O8 N; T5 j
row := assignLObj.getRowNo(GlobalDistObj);, [2 \# J0 A% o
if Row = -1 then -- since 70# K3 {! ~( B2 B/ R6 H6 F& u
if lan=1 then
# a6 N& D2 l% I# \2 Z; y: \& I promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ a5 k, d% v. o5 p9 [& ~
to_str("in der Andockstation: \"",?.~.name,"\""));0 D+ M8 j1 J6 E' ^$ o" D) T: ~
else
- ~/ r1 C; x* o" T promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
$ O+ C: a" F: S& {: i$ H6 \* H to_str("in docking station: \"",?.~.name,"\"")); , X+ Y" h- [: ?4 u$ ~9 L
end;
. S9 S. O+ Q/ b e else$ N$ H0 q# A/ O& K+ o R
@.Destination := assignLObj[1,row];
9 |5 }' @( g9 J6 `: {1 u' [ end;
, W# q, I4 V4 g. Z7 E5 [9 m4 o. E newDirection(@);! X+ H/ N) N9 x1 ?( A4 i
@.HasOrder := true;! d' q, c: T2 r, H
end;: r6 f3 D z; O8 C# K( ?) l
end;& G9 r. t$ z9 {4 w* c- O
end; -- of the method( U5 U! g. u; Q+ s$ ^! x. S
|