/* called by: entrance ctrl of the object 'track'7 ~ C# D- c$ r$ q% ~* w8 i
*/
5 M2 P" g/ K, _* g- e. l% d) W, cis( z4 q7 J, }" @2 J4 d ]% c. q; L+ z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& W- p+ V2 p0 R0 Ido
F' ]- E0 C ~ Lan := rootfolder.Internal.Tools.AOLlanguage;
) z/ R; H7 U# B7 d1 m if current = @.Destination -- else return& R% }( v8 Q$ F- D' e
then: m5 x8 I m9 q. [
@.Destination := void;7 ~7 I' R4 ^% N% o1 E z/ T
if @.occupied then P' `2 T# ^( u: t, M% p" @
part := @.cont;
2 ?/ l3 C- F; S7 V% }% m @.transpOrder := void;
! d: B" ?8 @$ T; N* ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, `5 k: D0 G/ I9 X6 c
@,root.eventcontroller.simTime);( l6 R1 S1 u5 b+ U5 u, @1 Y
@.HasOrder := false;, d9 {; U4 i; o' ~3 N
@.DrivingHome := true;& R9 e, j- Q: B6 k" b& c* W7 u
rgManager.tryToStartTransOrder;
) N- u [+ q5 r9 E" K if @.Destination = void
4 `; a Z. {& Q. w4 _ then -- no transport order for vehicle @
8 p$ m8 {/ c4 Q) e0 n# z& x @.Destination :=
4 h: e' X3 z- L rgManager.nearestFreeStation(@,track.~);. o( [: g3 g) l; [! Y ~6 e1 G8 x( U' \+ ?
newDirection(@);
0 c0 U* A4 P. E* b5 @$ ]+ [ if @.Destination /= void then4 p3 ]3 {* c( P
@.Destination.NumReservation :=
- ]5 O0 p3 b4 a# v) ]& p3 v( Z @.Destination.NumReservation + 1;& ~) F; g5 U) p$ g8 [& c8 z4 |( m0 I
end;
[8 T& a' u7 P/ b @.CurrIcon := "drivingHome";
3 |) W. |& Y& }8 G9 B$ k @.DrivingHome := true;
1 `9 a& L4 R& A& c, H+ v* h end;
8 z) ]! z P" N+ L else -- the vehicle @ is empty, both vehicle and part are in the same dock station) |; H {+ _& l/ Y* T. @
part := @.transpOrder;
: |+ B. J1 ^' D; p part.move(@);-- load part
- f& k. a5 J+ g p1 W0 b @.CurrIcon := "load";
( T$ o, B* ~- S* H1 ]% h GlobalDistObj := part.globDestination;
% S) N, P, c- W% w* n9 ` assignLObj := rgmanager.rgAssignL;2 X; f! ]" h% r, }
row := assignLObj.getRowNo(GlobalDistObj);
9 o% w8 i( D! c( J, g' b if Row = -1 then -- since 704 `6 i$ K6 S& }# n1 |
if lan=1 then$ T) D5 L% K. ~. j, C k6 r
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- _9 T6 A+ d, v) `; l" g b
to_str("in der Andockstation: \"",?.~.name,"\""));
& {. n% x! F. K! j) S) e7 v7 f else; }9 n8 m' }6 k0 l, R) a+ ?
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 O9 ]5 a5 G4 @. G to_str("in docking station: \"",?.~.name,"\""));
! A, {8 y8 L& I# G end;
6 D* [7 B5 m# Q else5 i5 X" ^0 L* }; Y' T
@.Destination := assignLObj[1,row];! G' |8 D3 O; D. g0 r
end;
8 }6 t6 c+ j) ] newDirection(@);3 a! q3 y* h4 [* M7 h7 i
@.HasOrder := true;& @0 ~# q$ u0 y& R& m5 o
end;" w% `0 Z+ G1 p$ R
end;
0 L4 Y3 S; \! Z; x) v" ?" V. m! oend; -- of the method
' }% u8 ?5 y! H2 t% N |