/* called by: entrance ctrl of the object 'track'/ M* m7 ~9 u" N
*/
% @; l8 @4 w, ^0 Y. J: h- @! x3 wis
. ~- L; s- q" I$ L: P part, GlobalDistObj, assignLObj:object;row,Lan:integer;
5 Z; P I* j* P! R0 b: edo1 `% u0 o7 [" l
Lan := rootfolder.Internal.Tools.AOLlanguage;$ ^2 z$ a, X/ H) C5 S- d, B" ~
if current = @.Destination -- else return
: Z4 `1 _# _0 W3 o+ ? then
4 N/ e+ Q' ]( W @.Destination := void;% @* t: ` O3 a; ?
if @.occupied then* a, V. H2 @) t1 W8 z. J; w
part := @.cont;6 |6 e/ n: G8 f' F3 ]0 |
@.transpOrder := void;# K; [( ^1 W; e% P8 }
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( q. C) {" N* x7 w" a$ K @,root.eventcontroller.simTime);
( b' H8 |* p f4 L* i. o @.HasOrder := false;: P& {* W- }; d* h, @. _
@.DrivingHome := true;
% v6 k1 f4 N6 R8 J. s) k# N rgManager.tryToStartTransOrder;4 j( v2 [7 a* R. k3 u- j/ l
if @.Destination = void$ ^( }( d3 @ P0 ^& O# O
then -- no transport order for vehicle @2 p+ |% |5 T p" ~3 t: ^
@.Destination :=
- Z, x7 [$ D* w rgManager.nearestFreeStation(@,track.~);
- j* O; C. S& }6 q4 R! e% J newDirection(@); 5 s5 H4 }- F f) E2 m9 t
if @.Destination /= void then
0 b8 O$ V% ?% {8 a @.Destination.NumReservation :=
! t" a( t( V! ?9 Y, u @.Destination.NumReservation + 1;2 m2 M+ g, \& L* I. E- t0 j4 l! J
end;3 C' t$ N8 m7 f$ q/ ?$ V% n! o9 U
@.CurrIcon := "drivingHome";" t$ `$ X _, p+ ]
@.DrivingHome := true;/ D# f4 R$ K$ ?7 C% Q' ~
end;. L) p+ b. Q+ R
else -- the vehicle @ is empty, both vehicle and part are in the same dock station: b t7 J" \7 n7 V
part := @.transpOrder;/ p3 o" o& K" @! `. l9 q: i# ]
part.move(@);-- load part
. M& U5 o) D8 X6 R/ w @.CurrIcon := "load";
* `0 _, Z4 X7 T9 o3 I; j: U4 l: z GlobalDistObj := part.globDestination;4 }! c% o. S1 q
assignLObj := rgmanager.rgAssignL;8 y7 V( _& p* w% P- S& [! d5 z6 \
row := assignLObj.getRowNo(GlobalDistObj);
( O& W6 p) ~. s if Row = -1 then -- since 708 q+ D5 o+ w! b+ T2 |( ?
if lan=1 then6 d' I; g V g. K
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- M3 v6 L, d) S- O- o& | to_str("in der Andockstation: \"",?.~.name,"\""));, p8 i$ E3 n+ }3 J8 C/ q, |5 w
else. w. v" ?: }9 c1 h8 [6 W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. q s! z% d4 {/ _% w( U5 w
to_str("in docking station: \"",?.~.name,"\""));
" Y; j7 M z4 e/ w end;
( T3 Z+ { {9 y: P& K0 y! n! V7 d else6 j: |' w5 J- [, {( z" [
@.Destination := assignLObj[1,row];
4 L0 C4 Y9 s. V) H, {0 N, J/ d+ W8 S8 { end; . f/ @' ?( I# U5 P) Q: o
newDirection(@);- }! b, y' n) l+ y; a+ E$ o2 ?1 H1 e
@.HasOrder := true;
: p2 P& A7 R+ ^! \' t3 z: p6 W/ H end;
, P' O& e& e. M' c' P( k end;
9 Z3 Q \" x- o5 G6 @ Pend; -- of the method# h& @4 Q3 L' q3 f* V ~1 L P7 p
|