/* called by: entrance ctrl of the object 'track'
% r( A, }! d7 i9 k9 }; j*/
& B/ Q' e, @" r; wis# K8 j# ]$ k+ ]5 Q z, G2 Y
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
# E& b' ?, y& J' N2 f6 ?2 sdo1 p9 n" u3 W+ y2 @1 [# s7 c) t* X
Lan := rootfolder.Internal.Tools.AOLlanguage;
$ S0 A, y! }5 h. M9 y+ l# L! X9 L9 I if current = @.Destination -- else return
9 l6 ^1 W- l# k: { then
- ^2 R4 W4 g+ I, A @.Destination := void;
6 @0 a, d. [0 V/ b3 w& k4 Y if @.occupied then* |8 D" ~1 Y- O* W% j
part := @.cont;4 Y& W7 f) x/ g8 X d! @
@.transpOrder := void;: B9 F7 h Y" n* `* a
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 I% r) F( V5 B5 v. Y$ U5 P
@,root.eventcontroller.simTime);$ E, U4 \1 U: ~- @3 F
@.HasOrder := false;
4 p2 b6 i" v z6 z @.DrivingHome := true;/ `2 a6 G- t2 Y; ~- C
rgManager.tryToStartTransOrder;
- T, [, ]/ \) l if @.Destination = void& C; g8 a8 ^( T, g: s8 M
then -- no transport order for vehicle @' _ {/ X( p W( d3 k; V" u* @0 V
@.Destination :=
: X! m; {' P: c. r! K rgManager.nearestFreeStation(@,track.~);
/ d! l* v- u- E9 D' v+ Q* B' s5 Q) h newDirection(@); 8 \. s! }9 x/ x& ?. _$ |# i- N
if @.Destination /= void then, y b% B9 s% ~0 F: K. F8 J) A* d- ~; o
@.Destination.NumReservation :=
0 c( ^* _0 p( w, H; {0 @, e4 [ @.Destination.NumReservation + 1;1 T& I/ y# R6 y7 h
end;
, e" q; m4 I* v3 P% e8 T! G @.CurrIcon := "drivingHome";5 ~, N# N0 V7 p2 B
@.DrivingHome := true;
0 J0 b- R! x [* m) f6 R end;* X# X/ x4 K7 c5 N
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- h# Y2 |/ \" z9 v# } part := @.transpOrder;. Z9 p- M I, ^" I
part.move(@);-- load part
2 |% M+ F& ~4 A2 M* B( ?) F @.CurrIcon := "load";1 f# J% F7 o- P# _
GlobalDistObj := part.globDestination;# f, u% R' n( l
assignLObj := rgmanager.rgAssignL;
2 j# d. O) U3 k2 Q: R* Q row := assignLObj.getRowNo(GlobalDistObj);9 R5 w0 P( Y( j$ R( y5 X8 {
if Row = -1 then -- since 70
; H+ [/ g/ A9 H( I if lan=1 then# N6 c% }( \* S# \8 n4 J6 L# V: B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# E1 ~0 M: k+ Q! R
to_str("in der Andockstation: \"",?.~.name,"\""));. u9 x l* v* B# R) |2 {2 q
else
* q4 }$ z, J7 S6 b: Z) E# D$ I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),2 F( Y b7 N* b N% j
to_str("in docking station: \"",?.~.name,"\""));
+ k0 m1 c$ D0 K* @- W' f2 Z* u end;
6 O0 n6 O3 {% k else* ~( j, d* F- x
@.Destination := assignLObj[1,row];
3 T% U6 n2 C) X8 C5 d. J end;
; m. I, r; T) D5 b$ M newDirection(@);
b8 t9 `: c1 w @.HasOrder := true;0 L$ f; H% F: u7 k
end;5 s; i4 w; N) y I7 a
end;" w' `6 {8 R- `# a
end; -- of the method3 |/ a7 M, Z& N6 ?* {
|