/* called by: entrance ctrl of the object 'track'7 C2 \. x/ m. V
*// s' T, F1 E5 l) `! }9 |
is
; k: D. D5 G5 N4 d part, GlobalDistObj, assignLObj:object;row,Lan:integer;
2 g$ @ y8 A- o( E% H! d& Wdo
4 m( W. J2 K: z( z Lan := rootfolder.Internal.Tools.AOLlanguage;: {& ` r; k. V
if current = @.Destination -- else return
' D _8 w9 [5 U$ o3 ~* s" d, B then
6 H* Y* O* N! K* z% H @.Destination := void;8 o$ J8 R8 C7 v
if @.occupied then( ?+ y0 @8 i8 ^) j
part := @.cont;) J( c5 [4 j* k' f% ?% ]8 k
@.transpOrder := void;
0 R, x) N1 i- |. F part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# u( a0 s% _& B2 I4 y @,root.eventcontroller.simTime);
1 e4 i% y- r! i7 o: a4 }" x @.HasOrder := false;
5 K6 R: L9 s! z5 A9 Q; A. o, } @.DrivingHome := true;
; S* w# ?/ S) ?6 E5 u3 m' v( M rgManager.tryToStartTransOrder;, `3 J- ?; I: B/ Q. K! |
if @.Destination = void' N7 {# _% H) [9 `* X& U4 U2 O7 s8 u/ F
then -- no transport order for vehicle @
) o% o7 {- X; ` w! \0 X @.Destination :=
5 w. Y j6 y4 C, ^ L rgManager.nearestFreeStation(@,track.~);
5 u* ]% S. M& |+ i1 V+ I6 V newDirection(@); ]4 |0 i: n' { P% Z, f
if @.Destination /= void then
, v6 y5 i3 {0 y1 x! v, K* w @.Destination.NumReservation :=* [: C8 _8 T" S4 L6 N: x3 E9 m
@.Destination.NumReservation + 1;
6 O% ^& ?0 e$ G- e end;8 I! }' }3 h- i) ~! c: M
@.CurrIcon := "drivingHome";
2 h$ b8 E; Z# U& | b @.DrivingHome := true;
1 b+ `$ ~3 N% f end;
& ?, P1 E. o* X/ H8 c' O else -- the vehicle @ is empty, both vehicle and part are in the same dock station6 c$ b' s8 f! k4 T0 u$ [
part := @.transpOrder;( B# a+ k2 s9 h( S5 x7 d6 |! E5 O
part.move(@);-- load part: ~# C! Y* {- P0 o
@.CurrIcon := "load";2 K+ O3 B$ U: e8 \- E
GlobalDistObj := part.globDestination;
% x& J+ i: W. z assignLObj := rgmanager.rgAssignL;
7 `, D$ E9 j( }) A row := assignLObj.getRowNo(GlobalDistObj);8 V& L+ V( h* [* |4 q* J7 q$ Y" F
if Row = -1 then -- since 70
- l, z! c/ M- @/ B9 } if lan=1 then1 p/ Q: G5 h8 J1 P& ~) j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), {3 n( _% e0 {6 m" |
to_str("in der Andockstation: \"",?.~.name,"\""));5 I' ^& S" N% H6 Q' j2 c
else3 k# b" n: D( x5 S& M& i4 O
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 S; Y! s) Y+ }% r2 E
to_str("in docking station: \"",?.~.name,"\"")); : x' S# w! Y: N, e0 j- n
end;
, i' o) X" Q& Y& X" u4 N else
# S/ ]" B0 p0 Y5 }# J% a! ? @.Destination := assignLObj[1,row];
( E- z% {6 t0 a; n1 e0 ^ end;
9 ?% p* n- j; t; F6 H newDirection(@);
( @ Q6 q8 t" E& W- | @.HasOrder := true; h. u- H6 L F$ j3 N+ ~6 p
end;
; V0 G* d% t; w1 B6 p [ end;0 S' v/ L. _/ q4 L* [) J* D
end; -- of the method6 ]7 @% i% O; |5 r3 g- D0 S. z y
|