/* called by: entrance ctrl of the object 'track'/ x. g' d' m; I$ ^% q7 L
*/; }* h8 P/ d; {& t( h) g
is: R+ Z& p( Y, z4 i; T
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 ]! V% n( V: d
do- h% a) U) i2 P9 x
Lan := rootfolder.Internal.Tools.AOLlanguage;0 C3 Z r$ j( s. f& j: O; w
if current = @.Destination -- else return4 E7 |- \1 o7 |; P! l6 F5 r4 h
then
3 a0 u4 h+ ~% @: F/ c7 B7 d; n @.Destination := void;
+ ^& y2 Y! C; N6 Z% U if @.occupied then' O+ p8 J9 G* Z# w# \' d
part := @.cont;: {! k5 a/ l% J8 T
@.transpOrder := void;
* {' g) b% a; v- E part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
% z% I* r) Q1 E* Q @,root.eventcontroller.simTime);: s& x7 q g) @ I$ V! u: D
@.HasOrder := false;
) u% g) _ e/ T: o [$ t @.DrivingHome := true;8 B H7 z' z- a4 y2 X1 h" H
rgManager.tryToStartTransOrder;3 Z% U1 X' @5 {$ G, e% h7 E
if @.Destination = void; l! i, Y1 }) V1 W1 [& M
then -- no transport order for vehicle @6 `& C& g) f5 `& D8 T' n! d# w2 P
@.Destination :=
% _& {- a; v+ M$ x7 n rgManager.nearestFreeStation(@,track.~);
9 L* n$ m r- a/ p+ p newDirection(@);
) y0 L0 ]; [) t' j8 w1 L if @.Destination /= void then. s0 |( R# K8 @8 A' |1 S
@.Destination.NumReservation :=: L1 a, W7 O ~8 r% R% V7 x6 E/ g
@.Destination.NumReservation + 1;( p" X7 y; N3 L& }. p1 {* `! v; h
end;
! J$ ~$ B" @8 f0 \' c @.CurrIcon := "drivingHome";
& u/ J8 _, O' j, h @.DrivingHome := true;
4 [4 X/ @3 F' |* ^* R( }, Q end;
- g- t1 c+ u% G- {2 D else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) e$ V9 |$ P1 B% D4 ], ^7 t part := @.transpOrder;/ C3 t) s% X, q" w* Y" s+ N* B
part.move(@);-- load part9 B; Q; }# B# r
@.CurrIcon := "load";3 x) Z5 A' {) B- V; F
GlobalDistObj := part.globDestination;
, Y6 K* I% c }, H. r+ }; X% z" U assignLObj := rgmanager.rgAssignL;. G# \' Z. \. S
row := assignLObj.getRowNo(GlobalDistObj);
; N. w/ _7 @+ d if Row = -1 then -- since 70
9 ^2 P6 V7 l- `2 g5 ^ if lan=1 then
9 m" i2 o7 r( n, r, R Z8 [ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 I$ j- Z( e3 |$ q
to_str("in der Andockstation: \"",?.~.name,"\""));
# T* [; B4 q8 X" Y A else" n: b, [3 n' D k4 [
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), A& A' I+ L& e9 G' ^& {: o
to_str("in docking station: \"",?.~.name,"\"")); % G/ G2 a, u: _. |
end;
. x! n. o3 V4 _, y/ v3 u2 R else
9 i4 j2 e- W: }$ j# t9 E @.Destination := assignLObj[1,row];* F; E; |7 t Y6 W8 N6 v- _; o
end; " @& H1 {5 Y, ?; @- L; s8 `5 q
newDirection(@);9 N9 y6 `) C' G3 r. `. ]2 B
@.HasOrder := true;
1 F3 l( `4 ~" J [ end;
# T7 G' C$ \& Z/ G end;
+ _1 D& i2 y7 I. c6 Xend; -- of the method
" L! p- [* U% W4 W, n |