/* called by: entrance ctrl of the object 'track', p/ L3 M7 P( J
*/
) }9 Q) J- X% {4 o5 w9 Iis
0 C3 j; ]3 a& b) t. Y j+ U/ z part, GlobalDistObj, assignLObj:object;row,Lan:integer;
8 A) H% K' i! Y- X6 i0 Jdo$ p& E' o0 ]6 m1 r( t
Lan := rootfolder.Internal.Tools.AOLlanguage;
; `' g8 \8 R. d; l9 W0 K( J: U, e F if current = @.Destination -- else return3 y% K3 K. m( m$ U9 v# ~
then7 F) u3 J3 z, K, C& N/ C
@.Destination := void;) ?& _0 b: _" ?4 a, P0 f
if @.occupied then
' W: J$ }4 p$ M" D ^. t7 v part := @.cont;) D, ?9 y( n1 {' j/ ^
@.transpOrder := void;
3 r, x& J: O& j t) ]+ K8 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) D1 J5 A" e/ h& e I
@,root.eventcontroller.simTime);
/ [" m1 r/ d8 j/ ~9 D1 K- K' v @.HasOrder := false;
$ X4 n I. f4 Z+ w! r @.DrivingHome := true;& t/ b( [- E0 ]
rgManager.tryToStartTransOrder;
- m( Y1 w$ D1 D, X% ?. ]5 K/ r if @.Destination = void
1 @& I! J2 a7 S8 y( N8 V% S then -- no transport order for vehicle @
, B/ [; k2 U3 f9 E3 T* N @.Destination :=% k) M3 D9 L( q ~( t7 P& k
rgManager.nearestFreeStation(@,track.~);" |& {9 L. X o
newDirection(@);
' W' R- z* X- }" M$ ^) v if @.Destination /= void then
" V K, x5 ~6 J9 c @.Destination.NumReservation :=
% M2 x2 u$ C3 ^! d3 _5 G @.Destination.NumReservation + 1;! h8 x& W( e2 y8 \
end;
4 Z2 G" |, y d9 E3 w @.CurrIcon := "drivingHome";
P2 _7 |" a6 X/ _ @.DrivingHome := true;
2 a; B: Z6 x; i end;2 }4 c) e9 i ?+ Y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 G. ^3 ?/ B4 B3 R9 J' x part := @.transpOrder;' U4 s i/ F& ?. c4 A6 c& ]
part.move(@);-- load part
. B+ }: ^* a! n; e, W @.CurrIcon := "load";/ i8 {- o" P: q
GlobalDistObj := part.globDestination;
0 n' x7 Y4 V& |* L assignLObj := rgmanager.rgAssignL;, k* r3 p, V" ^* Q3 {2 X+ r9 a* |8 `
row := assignLObj.getRowNo(GlobalDistObj);
. [- k c+ ?' w y) t, i/ N' c5 k1 y% r" ^ if Row = -1 then -- since 70
" ?1 {% k! t3 g. u if lan=1 then
& S; m2 \2 m0 @ h, u3 j promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
. j) }" H, I; ^7 x to_str("in der Andockstation: \"",?.~.name,"\""));
! h$ s1 V" U0 h( c; A else
" E+ S5 p; b4 M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),( h3 e1 [) m7 k. O x9 t" v. g: s
to_str("in docking station: \"",?.~.name,"\""));
9 z9 y8 y& e+ O( h end;
& G4 K/ v$ \# f else( W$ n' v& }" |/ B
@.Destination := assignLObj[1,row];
5 U0 D8 |% B- a$ z1 S6 n end; 7 S! q; f7 I1 T# Q
newDirection(@);
[2 ]- a, u* R/ h! r3 u @.HasOrder := true;
% Q& n! o9 E9 \* a. S2 D' H# f end;
: g* E8 w) V% [/ r$ X$ E! z" D: G end;
* ]0 B# Z% p6 m$ \( ?. E/ xend; -- of the method/ x, S) [* O; s$ o+ x
|