/* called by: entrance ctrl of the object 'track'
' E! k% t8 Y) S3 w" K2 r*/
: @5 k8 L K6 lis$ K- f, E+ `& m: I- t
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
7 @& j4 c/ i8 wdo
' }$ z) _$ R0 I* C9 w# v* y' B+ V Lan := rootfolder.Internal.Tools.AOLlanguage;+ R4 e, C0 ]; z ]3 Y% y
if current = @.Destination -- else return A. D8 ^; p3 o
then
+ L ]9 O$ P" h T" l6 l& c( b @.Destination := void;' q+ ~: N1 Y( Y y/ U6 J
if @.occupied then
: ?8 P7 Q: `: Z7 ]3 V8 P part := @.cont;7 |6 O" S, s8 i K/ j. a3 K& y8 ?" s
@.transpOrder := void;, M4 a) M9 h8 J# @+ c4 b
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 T5 Y2 \1 N* Z @,root.eventcontroller.simTime);
- A/ t a1 }) M- E% q0 r @.HasOrder := false;
; x* e; P4 k6 u `+ ] @.DrivingHome := true;, K& P" u: |7 P0 v
rgManager.tryToStartTransOrder;
% [. \8 i# C- S: R if @.Destination = void
, M7 p0 T- J6 s% b( ?* o' ^2 K/ m then -- no transport order for vehicle @
- S/ x- A) w7 n! N- r: C @.Destination :=
5 p6 G2 P. F7 h5 X, P rgManager.nearestFreeStation(@,track.~);
" I% o) E( Y% ?* U newDirection(@);
8 Z" }' T2 [0 G" o4 k+ f8 J) a# H2 H if @.Destination /= void then
6 [ M1 H6 O- T! w; S0 ~$ J @.Destination.NumReservation :=
3 L' d) V# k+ E _$ Z( V @.Destination.NumReservation + 1;
# W4 a2 `4 V# [$ M end;
) R. s5 V' P0 I5 z& s @.CurrIcon := "drivingHome";- H/ k- F. _* U
@.DrivingHome := true;- L0 W0 X0 X- e
end;/ n; k0 \& N; J. a0 ?, f* W
else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 O: S+ C W) B& l0 D: @5 h$ Z
part := @.transpOrder;5 D$ z- W, e. j1 r# N; V0 u. `# ^5 E
part.move(@);-- load part
3 _' a7 e9 w* N- J* E @.CurrIcon := "load";5 W" ^0 f5 h a0 |) l
GlobalDistObj := part.globDestination;
: B6 g( ]9 ^) U! n assignLObj := rgmanager.rgAssignL;
- B' {' M' Q3 \1 f7 o& { row := assignLObj.getRowNo(GlobalDistObj);+ J/ c) h9 k( e( w; o' v
if Row = -1 then -- since 706 e) Y* `5 V% T
if lan=1 then/ T8 I V Q: w2 t3 w% @' |
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: j8 V! h5 \) p M2 B3 i& L to_str("in der Andockstation: \"",?.~.name,"\""));+ z& L/ @. E3 {4 w. Y/ Z* F2 b. H
else
# f" _! w' {, w, T8 W( {7 x: G) X6 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
/ Z# k3 P6 |) ]) W to_str("in docking station: \"",?.~.name,"\""));
4 a2 h1 j5 D" l* n" B" H end;3 Y# c# l7 f; Y
else3 {6 P2 Y( F: ^! G
@.Destination := assignLObj[1,row];; I- T# t5 r, b" `8 Y( c* z3 o
end; 1 Q) v" G# F* z2 \1 W; _- c
newDirection(@);- i- q5 v% W; A- }8 ?) \
@.HasOrder := true;9 p0 T( B& z' Z6 Y* M/ N
end;
$ P+ r; z# f0 a8 m end;
$ P1 N) z5 q* V, ]+ o5 A; |9 Uend; -- of the method h( s8 c! B* p( b, j/ O
|