/* called by: entrance ctrl of the object 'track'
- u2 L1 d" f4 z2 @! r*/
2 c, A+ P$ ]0 B! W3 Cis
( f' `! u6 d- J" `+ h2 T part, GlobalDistObj, assignLObj:object;row,Lan:integer;* V7 U e9 h+ C% ^( l4 N3 q" W! u
do
, c0 G. d0 }- z7 K7 y( V2 i1 d4 p3 N! j Lan := rootfolder.Internal.Tools.AOLlanguage;. }. W* r4 j7 J0 ~( X+ e
if current = @.Destination -- else return; p/ D8 a" ^3 Y! {6 j7 m
then% o" U+ o8 J1 R6 v8 h2 e
@.Destination := void;5 h0 O+ _9 v7 ] @( k: }- n
if @.occupied then- `& T; ~+ N1 q- B, P5 z
part := @.cont;
( ^& C; J; ^; B @.transpOrder := void;4 R" D- `9 a3 c
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- W$ R+ |, k0 d4 l1 O3 \6 A: Z1 Z
@,root.eventcontroller.simTime);2 t; f6 |2 m1 V: i4 i
@.HasOrder := false;
7 U+ [/ Y! t2 F4 r2 K2 @ @.DrivingHome := true;
" h, T" k$ r+ t( Z- q7 \ rgManager.tryToStartTransOrder;9 y m6 a5 g5 j9 U( v5 l0 S7 s8 T5 G1 P1 G
if @.Destination = void
5 R F+ c& T1 Q7 ]# i! y; r2 h7 C then -- no transport order for vehicle @' u# [; [9 z# V' J; Y* |
@.Destination :=" _! V) D9 x4 z. ?; ]
rgManager.nearestFreeStation(@,track.~);& k' I. q: q7 s) e7 \
newDirection(@);
- L: Z7 b" p! ]5 \( c if @.Destination /= void then
- I$ h( ]1 i r @.Destination.NumReservation :=
: `; p1 o5 L( [5 U q( h; { @.Destination.NumReservation + 1;1 X7 `6 Y9 u3 G6 y- O" H- q+ D2 Z5 M
end;) G& w: a, n9 k5 U1 D9 i& h
@.CurrIcon := "drivingHome";- Q0 G/ r& Z: c+ O7 U/ m" C
@.DrivingHome := true;
: q! M1 E$ e* z. a5 W5 z+ j end;8 i! n) J! y$ C$ d3 f, W4 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station* w7 b* m7 T; m6 K* z8 t
part := @.transpOrder;
' ], f; ?% d, d ] part.move(@);-- load part! V; b, F- j# Q3 g( f1 g2 l% L/ e
@.CurrIcon := "load";
( n9 a7 G* {$ |/ P9 B& G9 M. @ GlobalDistObj := part.globDestination;
7 h6 Z# j# p* M8 Y7 {' z5 C assignLObj := rgmanager.rgAssignL;7 ]* O! ?% J6 ]% p. `
row := assignLObj.getRowNo(GlobalDistObj);; m$ L9 K" j$ t1 ?
if Row = -1 then -- since 70" {7 D: \( v1 [# t* L1 G1 I
if lan=1 then& j' ]; G) V: _! b
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," Y1 a9 ]7 c9 | y" P' j; ^6 [
to_str("in der Andockstation: \"",?.~.name,"\""));
, J: e- Q: ^% Q0 {0 G$ i else
I6 v2 F. K) v; Y9 y$ } F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
8 H, w3 ~& }. ]" z3 `9 t to_str("in docking station: \"",?.~.name,"\"")); & v" Z0 Z* L$ V( w
end;
2 b9 q% |# E% X: K else0 f; c- U5 W& _4 ?
@.Destination := assignLObj[1,row];7 q- l2 E8 ] `; M# w' }) H
end; # M+ t! y* [2 P$ K4 E9 ]
newDirection(@);6 a% G) [9 k1 L/ t
@.HasOrder := true;
/ Z" H* J' z$ h) N* Z! f( D# Q8 z end;% v; L7 f, B7 k3 P1 Y7 l j7 t* X- c
end;
2 Y6 ?& W0 s7 Rend; -- of the method
5 L- x& o5 x' W; w0 X4 L |