/* called by: entrance ctrl of the object 'track'3 \4 |( }+ M+ w* q: a
*/
) J/ C3 b% F: @2 Z7 Q3 `# l: sis& p$ L2 z+ A- z' r8 Z( [( [" ]# z% P3 b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% x. M. ~2 H; O+ ~& a
do
/ M9 P. g" ?+ u6 n. X Lan := rootfolder.Internal.Tools.AOLlanguage;
# |& {4 \* x# [0 M if current = @.Destination -- else return8 D2 e6 U8 s4 B! `
then D2 _( U8 ~4 W: I! K
@.Destination := void;
5 s1 W$ I) [: Q# P if @.occupied then; Q' J( P% e# R8 y+ c8 i; @
part := @.cont;' o6 {6 A/ z$ O& K
@.transpOrder := void;
: l0 _ r$ |8 y( }& y, A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, p5 K$ p2 F9 q7 ^ @,root.eventcontroller.simTime);
$ f, _7 C3 O1 @. g" L& ?- i @.HasOrder := false;
+ Z& U1 Z( T6 l1 q% E8 J/ Q @.DrivingHome := true;
+ O6 E$ a+ U" O- q rgManager.tryToStartTransOrder;
, A( z1 j6 K) }1 k/ @: A" f if @.Destination = void
! `# z, z4 |- ]# F9 E then -- no transport order for vehicle @" B+ N- y8 i& g3 s; P4 W
@.Destination :=
) p6 F! L( q# W9 a rgManager.nearestFreeStation(@,track.~);
{! K* j \3 U! c0 N0 C* @ newDirection(@);
- `$ e% s+ n, L; F# S if @.Destination /= void then
0 A; R. w: E( A* R" q# N @.Destination.NumReservation :=, P+ Q" `2 z: G& I8 C' ]
@.Destination.NumReservation + 1;
) Y% g3 L7 x" Z, H2 h+ S& a end;
2 P& @' Y% J" ~6 y/ K: S @.CurrIcon := "drivingHome";) U3 B( d9 Y+ i Q2 u7 v
@.DrivingHome := true;1 J7 k6 o' u* V9 b% ?; q
end;. h7 i. J: t; U+ E/ d5 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 {& k1 x" ?& d3 v part := @.transpOrder;+ k6 ~2 f2 c7 A. L3 z, K. ~
part.move(@);-- load part
8 F& ~. r2 ]+ O( n7 h; G: {8 Z @.CurrIcon := "load";$ Q4 z* |! P9 n. V( R/ H3 J$ F K5 V
GlobalDistObj := part.globDestination;4 U$ R) ^/ N' V/ O
assignLObj := rgmanager.rgAssignL;3 ]5 C" d3 e; q! t3 K5 C, [
row := assignLObj.getRowNo(GlobalDistObj);
: _0 f8 O. K' Y# D if Row = -1 then -- since 70, B% D) n1 B0 }. K
if lan=1 then. z) ?) R* e& r& x
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- g9 Q: R% _- u& n9 L to_str("in der Andockstation: \"",?.~.name,"\""));
+ _: q6 ^8 k9 s' f7 j4 |0 b4 w$ Y else/ r% I. b+ d# V* M5 N: [ g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),% i" C1 C6 X7 K6 z" a1 x& U
to_str("in docking station: \"",?.~.name,"\"")); 2 o7 ^8 B1 h# G$ J5 l! S! }6 [3 w
end;
8 @6 h' {. f) G* f! `7 ? else
, o5 }8 O1 N! b8 K: L. o @.Destination := assignLObj[1,row];4 I g! O8 D" x6 p& t, v) T: w
end; 3 h6 a V3 V8 z/ A9 x5 P7 K6 }
newDirection(@);6 P. L) H1 A5 A/ d* D+ j* x6 k( J
@.HasOrder := true;2 U. G, a7 D0 [, |8 b4 y2 }
end;. H7 }* I, k+ Q" p% @
end;
7 Y8 Q. T+ G% m' J2 xend; -- of the method; \3 ?, J. l6 l8 t
|