/* called by: entrance ctrl of the object 'track'8 F& t0 I7 Y! \3 Y
*/; K# z) A8 A1 d" s, z9 P2 A
is
- g0 h5 X; C0 T5 W3 z% C( J" S part, GlobalDistObj, assignLObj:object;row,Lan:integer;& @" B/ c8 ]# J1 C. [
do8 u' ~1 d, {: }9 ~% H k' P# T( A
Lan := rootfolder.Internal.Tools.AOLlanguage;
# r% C, ^2 n" G6 |! h if current = @.Destination -- else return3 H4 P) v+ G$ O( L+ A
then
: B9 V9 T8 F' R9 X3 r @.Destination := void;
7 h. y; C5 K( ^* x1 z* L/ x if @.occupied then
& R- Q5 Y! L8 E part := @.cont;
+ P* S4 `' n, W/ u$ ~ @.transpOrder := void;
; }9 t, G. ^) I. ]2 ]. \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
. _* a4 ~ }0 a8 }2 L V @,root.eventcontroller.simTime);. S+ z7 ^* d3 d( U. t0 D
@.HasOrder := false;
/ v8 v5 ]/ J0 f7 V$ k @.DrivingHome := true;1 L4 X+ Z0 T" f& X& [. K7 J& q% q
rgManager.tryToStartTransOrder;
6 t: ?& J, L5 t& h7 z$ r if @.Destination = void
8 W* D" [' ~( A8 Z. |. I then -- no transport order for vehicle @
: @4 v- ?5 ~5 l6 K% k4 E @.Destination :=! @, @) v7 C1 j! i$ ~( P
rgManager.nearestFreeStation(@,track.~);
# j" b7 o. Z S- X7 y+ { newDirection(@); - |7 s w0 F$ a3 h* R
if @.Destination /= void then# J' | k" Y! Z4 J f5 I
@.Destination.NumReservation :=- Y% M( N" O/ t
@.Destination.NumReservation + 1;
6 D+ v9 _9 A4 j8 F4 i/ p end;
) |; ~( M8 S( d# S @.CurrIcon := "drivingHome";
8 [( c) G& h- k* I+ u } @.DrivingHome := true;1 g. Z* K8 q6 O
end;# o% L' X$ ]! \& s, `
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) g+ f2 r$ ^$ H7 T4 [- S5 I
part := @.transpOrder;3 e( d% _* U2 ^: H& @( r
part.move(@);-- load part3 J) R9 g# k7 m* Z2 Q! S
@.CurrIcon := "load";& z- u. B- V+ e# F
GlobalDistObj := part.globDestination;6 u l. |. J* i6 T' ^1 }' M0 {
assignLObj := rgmanager.rgAssignL;5 v3 `- P4 Y' h3 }; o8 a4 `, `( T
row := assignLObj.getRowNo(GlobalDistObj);- Z8 q6 W, N/ i
if Row = -1 then -- since 704 T8 s, t6 n3 ]5 _: z
if lan=1 then
% @( D% d) U: t4 B promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& T8 q) X) u( n- q: ?" n9 z
to_str("in der Andockstation: \"",?.~.name,"\""));
1 G. L! A! {% ^3 j+ O( W4 y$ g else
; P; e$ _6 P" @& h( a& `2 a6 K5 ~2 i promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
2 f s9 x& C4 l7 I/ G' { to_str("in docking station: \"",?.~.name,"\""));
% x6 H5 C) I& p1 d end;
3 T1 C) L' u4 X else& w1 Z$ O; g7 s" x: ^; Q9 T
@.Destination := assignLObj[1,row];
: k$ Z& t) `1 j6 g* Q+ { end; 1 R, _. X9 X) R$ e5 x
newDirection(@);, y# `3 D* s6 e& R+ d
@.HasOrder := true;
3 X4 a+ r1 x) g9 q+ F; I end;5 y6 Y; J/ y4 N6 l# T: l
end;
% J' B( W/ N! W; Cend; -- of the method
* Z; g, O9 k3 ^' `7 T |