/* called by: entrance ctrl of the object 'track'7 S; U/ M9 R5 f+ N- t
*/
0 `! O# Z+ W8 ois
* \) ^$ Y6 l! U part, GlobalDistObj, assignLObj:object;row,Lan:integer;
C. W4 S# f5 _4 J! x+ _6 Kdo h6 L J7 `: t6 T8 T, B* z) L0 i
Lan := rootfolder.Internal.Tools.AOLlanguage;
! X8 P& R) t: x# d if current = @.Destination -- else return0 m- M8 ?: _6 ]
then
6 K: R! I/ [% S7 f- k; T @.Destination := void;
0 T6 L) W. c2 Q6 W8 f. H if @.occupied then
/ L. E) @- Q$ x b; ]* K8 J' a3 ] part := @.cont;
+ _ T) L4 X4 L2 P! j- n @.transpOrder := void;
, Q K# t' C" E' B8 ?3 L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ S; z- Y4 U* @1 }, Y7 j
@,root.eventcontroller.simTime);" h0 f, v( ]+ e, \
@.HasOrder := false;) a+ _% j* Y( B' z+ f& l- y! ~* G
@.DrivingHome := true;. b- K% i6 G. i8 ^
rgManager.tryToStartTransOrder; b* L f9 {! Q9 c! T Y( C6 e
if @.Destination = void
9 G) Q( c) g/ A; @, X then -- no transport order for vehicle @. m* w! s( d+ \* b; w5 u
@.Destination :=
) \- P: v- ~9 J: Q6 a% x, x rgManager.nearestFreeStation(@,track.~);9 V& `# W- O% ~/ l
newDirection(@); $ h! R) Q& P4 [% ]9 g
if @.Destination /= void then
6 z4 W1 O3 I i" B2 x# s @.Destination.NumReservation :=
# l2 Q @& d O) _: k9 v$ H' ] @.Destination.NumReservation + 1;
5 V: V3 I5 E6 w" d7 X/ m end;
& {" B4 d+ t. E+ L1 a; H5 z4 t' Y5 M+ ? @.CurrIcon := "drivingHome";
2 m' x v0 L+ M: l z @.DrivingHome := true;
; y% b/ h/ V. W$ f6 n2 E1 Z end;+ U. ~1 B; A' P3 S7 }7 e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station5 I# X1 _( u4 P4 r5 }
part := @.transpOrder; _" R( v5 o; y! B( i7 w6 C
part.move(@);-- load part7 Q" q. M0 |8 g1 W% \0 T* x7 V
@.CurrIcon := "load";7 J' C" a0 E3 }6 V1 C. m$ L
GlobalDistObj := part.globDestination;
9 m+ z+ O2 Z/ @2 W. ^0 s assignLObj := rgmanager.rgAssignL;: _* G/ G/ q& s# z
row := assignLObj.getRowNo(GlobalDistObj);$ R& n- T" x* u: M# R9 m; C6 w }
if Row = -1 then -- since 70; Y9 d8 p( M0 }% a) Q1 f
if lan=1 then2 z; I2 C: w2 r6 O# }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 d3 e! a( D% r% \5 \( V to_str("in der Andockstation: \"",?.~.name,"\""));7 C2 x, j4 F: _- P6 r$ E H9 K3 @' x
else% w3 j0 q7 i1 ?0 R
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
3 w" y# Z( s+ G. _ m# E4 ]$ O to_str("in docking station: \"",?.~.name,"\"")); ( h' e6 o4 |" \. C. k
end;
0 R( j3 w4 t2 c6 q$ S3 o7 y else( U q+ I% Y: Y, ?
@.Destination := assignLObj[1,row];
/ R1 T/ \! J" [+ ~ end; - N h4 h! H6 h6 s
newDirection(@);
' n; U/ h) H; w3 K: q @.HasOrder := true;: h) S: }6 i& p j
end;
# k; X/ E6 g$ H3 H' ? end;
$ @/ y! k! k0 O# e. G6 L; m: |end; -- of the method I7 V$ p' _9 r1 a
|