/* called by: entrance ctrl of the object 'track'1 G2 B) [! G9 j3 ~" `# y. u5 ` w
*/
$ x8 Y! d8 {3 E8 l* Jis) ^2 t% V: {! b9 H$ k
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& _; R7 g: }( h2 \/ F5 J/ b d6 Cdo+ X5 [( s- N. H: r! @. G0 o2 Y5 @
Lan := rootfolder.Internal.Tools.AOLlanguage;
) L( G" Y1 K' U if current = @.Destination -- else return
) `( K9 C' V4 C; j3 K4 d; v then3 f g! t7 H$ z+ w' r
@.Destination := void;6 i2 T* h3 ?% l: R
if @.occupied then
/ b7 I$ {" j V4 O part := @.cont;( \6 y+ M* A( m Q4 }" r
@.transpOrder := void;
( b& L! I/ y) r2 I$ o, ~6 l4 | part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 |5 z& h3 f9 R
@,root.eventcontroller.simTime);7 r; h( C# o! J8 e5 o8 d* @3 r4 I# `
@.HasOrder := false;
" i! l* P# Q! ~ @.DrivingHome := true;5 X K( y4 c8 { J, f$ U" F" \
rgManager.tryToStartTransOrder;
9 H2 R- T8 v; ~* @( t7 F# n: g if @.Destination = void
6 f3 U$ p8 _9 n$ i then -- no transport order for vehicle @
* u: @9 ]- K/ v+ |, V" u @.Destination :=
1 U9 f& n- C7 y2 I; ^' O rgManager.nearestFreeStation(@,track.~);+ J" `3 d: J! x: v: a8 P5 E
newDirection(@);
! `3 N' a1 l% C0 b5 b5 [ if @.Destination /= void then
% m' o' ]6 Z. h2 P- a2 G' t @.Destination.NumReservation :=
( N( q) C( k; T; I+ c! x+ f, ] @.Destination.NumReservation + 1;
) d; ]9 X3 l2 j0 _) A* Y$ ~3 o end;0 Q q5 R) c; B! i9 d2 m
@.CurrIcon := "drivingHome";
. l1 T7 e+ j H6 H0 ] W" ^+ o @.DrivingHome := true;1 F; F3 O$ O$ ]3 Q ~ [% a* \" F
end;/ w, m1 y: s; B
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 ~4 b' @ Q" s- Y
part := @.transpOrder;4 a- m. Z. o% F5 r& z; U5 L
part.move(@);-- load part) e6 A+ ~) x* _) G! ^% P& {
@.CurrIcon := "load";4 O, Y( p7 e C2 N b: G Z; v, V
GlobalDistObj := part.globDestination;
1 o9 W- P4 K- t* y! S7 y1 G0 z assignLObj := rgmanager.rgAssignL;- H) c+ l- T- N+ J5 x
row := assignLObj.getRowNo(GlobalDistObj);
& T( ^# q- `$ B if Row = -1 then -- since 70
l& U8 a4 {8 a2 j1 \ if lan=1 then
0 J) d* w8 G" I5 n1 |! e& L( ^ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* m, n8 r w. _% @) F/ u" u to_str("in der Andockstation: \"",?.~.name,"\""));; v8 I( X; ^& @9 v0 X5 _8 D
else
2 v1 |( U0 j0 E% R' h( P promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 v/ u2 l! P) Z7 ~
to_str("in docking station: \"",?.~.name,"\"")); : ]$ e8 M; @! q8 n
end;' e& g" U0 c0 I$ m+ e3 B# G6 F
else# u/ O8 `5 ? A3 E1 g( N
@.Destination := assignLObj[1,row];
7 I5 b! o5 n5 J! O2 o' g end; + }: s) J4 T9 L% z' ^
newDirection(@);
% M$ c* e+ T4 r% p" u, n @.HasOrder := true;
4 Q$ o# X2 r+ [; g+ I end;4 s N2 h: Z" B* p+ G) A
end;; P. [+ `- M% O S. |+ K G
end; -- of the method
& I3 z0 ?- g0 ~/ d+ }: _$ l; Y |