/* called by: entrance ctrl of the object 'track'0 c3 d2 g( S: p/ G9 @ R
*/$ t Y# N# k( i- V% m4 ?2 e
is. |7 I: p0 i+ }3 d d
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; F/ R2 I8 p; w) j+ l3 C8 tdo: X7 M) V% v, ?
Lan := rootfolder.Internal.Tools.AOLlanguage;1 B" I3 M, t3 |" D3 r/ C- k! C1 C5 D
if current = @.Destination -- else return, a3 P/ k( v, A; _( M
then
4 o, y- ]3 h4 ]8 Y5 I: P @.Destination := void;6 ? y* f/ Y& e- Y3 ~+ S* e5 C* M" ]* @4 L
if @.occupied then
6 y9 H. q3 e/ I6 c4 I1 k part := @.cont;
$ L; T$ D; t4 t% v& a' ` @.transpOrder := void;
. n5 r4 S% ]" ?4 j+ ?: t' n' @ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 L/ k3 c8 [& X/ L9 r, }( F
@,root.eventcontroller.simTime);
9 Y; E( n" a& y1 v% d* c @.HasOrder := false;
" N3 p3 }, k6 r0 z @.DrivingHome := true;
3 {; R H+ S; Q rgManager.tryToStartTransOrder;
H" c& k* {0 ~/ V+ p if @.Destination = void2 A& a% q! I! {/ N2 M! ~
then -- no transport order for vehicle @
1 r3 p# ]" L( k$ b @.Destination :=
/ G% [; b( H* |3 @* W rgManager.nearestFreeStation(@,track.~);" J/ p% Z# ~% m) {! q* B8 T
newDirection(@); . I, Z7 q- o5 V; _
if @.Destination /= void then$ G+ G: o: C( d! w+ f8 M, |5 |: V8 w
@.Destination.NumReservation :=' |$ \5 K+ ~7 o$ x) d1 \. ^
@.Destination.NumReservation + 1;
% j. y+ {9 D) E4 a8 E/ Q9 u end;
9 O/ C5 M3 P1 R; T @.CurrIcon := "drivingHome";
# v% {& z# ~1 Y! m+ p5 H9 u @.DrivingHome := true;0 w" V- o6 C1 o( z/ c3 k# `. ~! `
end;3 k3 i. n0 g4 X' h4 _/ e2 x) v5 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) J6 ~7 U) Z1 S2 J z part := @.transpOrder;
- P$ l, ` K$ T1 l part.move(@);-- load part
8 ?. u& `7 p+ _0 l% R9 J( m @.CurrIcon := "load";) g- Z) I& O- L! q0 o# \# f
GlobalDistObj := part.globDestination;
1 x+ E% j0 A/ ] assignLObj := rgmanager.rgAssignL;- l+ k- S4 q3 y
row := assignLObj.getRowNo(GlobalDistObj);& |" L0 Y) B" j0 U# G4 V' q
if Row = -1 then -- since 70
. m/ E% @/ p, f! N+ y+ \5 d; S if lan=1 then; b7 b* M# W" w+ |- e
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# q" H+ d4 D; x- Q) \: N H
to_str("in der Andockstation: \"",?.~.name,"\""));
0 z6 m8 g# b# ^ i+ h) H else
) K/ s0 H( m0 X: o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) t( R, n. e! P2 ~
to_str("in docking station: \"",?.~.name,"\"")); & p5 }- h- c1 a9 C+ X( D
end;
' n4 V- h! x3 Y0 Y4 g. b' Q else5 E4 ?4 b" y$ ~5 T; h" x- L1 o0 V( Z
@.Destination := assignLObj[1,row];
8 J/ U4 ]. R! S h' D1 g8 f end; . `6 F+ h4 l& x3 S2 ~5 `
newDirection(@);
_2 @1 D8 x/ b( R" h$ i# b @.HasOrder := true;
; J5 Q9 e$ ]! r; p0 w; n end;( l N3 B2 C' I- L1 v
end;- u2 u2 U: x$ J4 I L8 I0 o2 o
end; -- of the method0 F1 H7 p l+ A& J5 X! C
|