/* called by: entrance ctrl of the object 'track'
% ]+ R1 s. a3 D! n% U$ e) y*/
; W- l8 Z. C# u: c: [+ n- u# Eis3 m& m/ j; N+ {/ c* n* r; [
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 N7 n* k+ a% S4 I. q( f9 Odo
7 o/ U/ _$ D% Q* o7 _4 m Lan := rootfolder.Internal.Tools.AOLlanguage;& K7 g4 V$ B- p H& Q/ y
if current = @.Destination -- else return
! M5 E" H0 @% i/ D then( u* K7 J8 g8 v: P4 w, R/ j
@.Destination := void;/ t+ F) C D% y6 t/ W8 T3 N
if @.occupied then' J7 v( P; X0 z; ~
part := @.cont;
1 r: y. L2 @, z' {2 q @.transpOrder := void;
- c! t5 _% x+ R9 U" ~1 ? part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* S, G- H# m0 V8 y @,root.eventcontroller.simTime);
" |" Q/ F) s. ? @.HasOrder := false;% {; [6 n2 |* }& ~7 i) l! l
@.DrivingHome := true;
`1 [1 G* R. N8 r1 ]) R rgManager.tryToStartTransOrder;( N0 t; v0 z7 a( l1 c/ b
if @.Destination = void
; g) l) F v3 e; E9 C then -- no transport order for vehicle @
9 G8 |% ?2 b/ e; y! I @.Destination :=
7 C' E% \9 N0 ~) Z+ L, a rgManager.nearestFreeStation(@,track.~);
0 e8 Z1 ` K' W$ O2 g newDirection(@); 8 h5 T. i' R: P* |* o+ q+ d+ R
if @.Destination /= void then
- y" w5 P' |- V& r9 z7 V @.Destination.NumReservation :=
3 k9 U: D) C5 w F2 l @.Destination.NumReservation + 1;
1 Q6 v6 ^, v0 y" G5 q end;
! }9 E9 w) O7 J. l. f7 w @.CurrIcon := "drivingHome";8 }3 K5 q$ `* G# ?6 z4 ^! e, A
@.DrivingHome := true;
& E! F- x8 g% P$ [ x# U end;9 d( w6 d* W! j c" N4 e- d
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
9 _/ z6 D Z! F* G, m$ Z part := @.transpOrder;
3 _) {% f) k. `6 c i1 O* Q part.move(@);-- load part( J# v- [% P7 c- l; E% E
@.CurrIcon := "load";2 A/ O0 k6 i: Z
GlobalDistObj := part.globDestination;; f; U( T! a c& I
assignLObj := rgmanager.rgAssignL;/ K: T B8 } W' l7 n
row := assignLObj.getRowNo(GlobalDistObj);; f4 I: B+ ^* @5 ?. H- G/ A p
if Row = -1 then -- since 703 o0 E, v* p8 o6 C( b1 f8 ?
if lan=1 then
! s& S$ L: u/ P9 g8 c8 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# r& g0 }9 \$ t& X+ Y1 G- m. [% f
to_str("in der Andockstation: \"",?.~.name,"\""));- j1 s; X, E6 x9 q& s& }7 G
else
! a5 u0 s8 ?+ C: V promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),6 W# o- K& W% O! n: L/ k K
to_str("in docking station: \"",?.~.name,"\""));
' Q. T3 k4 O3 c& W' T; K& B end;$ R# F1 X+ \" c
else
5 y4 D5 z" P! d( V! ]. { @.Destination := assignLObj[1,row];
1 e; D& Q2 H/ }& O+ |" h9 ?. k end; 2 |( \% a( B6 D
newDirection(@);
4 P& V! q" w9 j' `6 e @.HasOrder := true;
4 r4 F+ c& X$ D, b2 u* ~1 g/ ] end;
6 Y0 ]+ \( |, A) }6 P8 ^! H end;
( Z' d8 d$ @( w$ Jend; -- of the method$ z7 G3 u0 w7 g8 d. v9 D: X' |- I' v
|