/* called by: entrance ctrl of the object 'track'
! P. g+ g! E% R( C* O7 [*/8 R& f* M2 F& s3 F/ C6 q
is
0 e* w! c* N4 o) T1 F U0 n5 F part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 [6 s) \. X5 {% z% I& [: Y
do
0 X( `/ E/ Z: g2 T Lan := rootfolder.Internal.Tools.AOLlanguage;
) _; `1 G0 m; I% \8 r if current = @.Destination -- else return- u3 }. d6 ?# t @0 i& X [
then
& |- m2 r, b, ^3 j+ o6 j3 k @.Destination := void;$ s9 E. M7 r& _$ ^
if @.occupied then- w4 O3 [9 A. O9 n6 s$ D
part := @.cont;
& ^5 [9 T" ^+ f5 g! [+ e @.transpOrder := void;
/ d) k5 j& D: X, f( f part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 F3 n5 \ n- ?8 Z9 S0 R @,root.eventcontroller.simTime);& {0 `5 Y9 h0 @) O i1 Y
@.HasOrder := false;
* e* Y9 ~- [( L! X @.DrivingHome := true;& {* G2 R- e/ o* Y
rgManager.tryToStartTransOrder;9 L Z" o6 F T8 A% F
if @.Destination = void
- J" O$ Y0 I1 p0 S( K then -- no transport order for vehicle @
2 S8 w4 k$ ~! I' o, I0 j @.Destination :=
) q) }$ A" f) R+ H' k rgManager.nearestFreeStation(@,track.~);
/ g+ ?# f( d G newDirection(@);
7 @% o. C3 I4 S. j7 E/ e; [ if @.Destination /= void then
. `; {; T+ c4 v @.Destination.NumReservation :=) w3 z, I( R4 ~; s% B( b
@.Destination.NumReservation + 1;
- R2 ^" a( L# M; U, L2 Z! r6 _ end;1 C" `; [. M$ K2 S- d! x3 W
@.CurrIcon := "drivingHome";3 i1 M l; X. N! i) ]; N8 t, E
@.DrivingHome := true;% X& @! f% ^3 _+ W; }3 \
end;- H4 {- T7 a# x) C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' D) U3 p8 ~+ K4 `( G! e
part := @.transpOrder;1 u6 Z; z5 E3 b* E
part.move(@);-- load part
2 v' p( s8 c7 |9 l; _" |& C: f @.CurrIcon := "load";
% v% k8 Y0 k" x& K2 z) F5 o2 \ GlobalDistObj := part.globDestination;, [4 p h; ?# Z' g
assignLObj := rgmanager.rgAssignL;! h( B2 t& F" i
row := assignLObj.getRowNo(GlobalDistObj);
1 t! s% j% o+ `; {, W if Row = -1 then -- since 70
0 H3 R |; S6 t4 Y if lan=1 then& K4 P" g, x2 p: P
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 F) M `+ Y" j5 a- ] to_str("in der Andockstation: \"",?.~.name,"\"")); k# {' Q- }4 @
else
- k, ^. a2 w q, c2 J promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),5 P4 J4 R0 @; j+ g
to_str("in docking station: \"",?.~.name,"\"")); 6 v; W; m6 T G) K" C
end;$ t( G4 j; p% W6 {' q, }) I% C9 w& O
else
, E' E' r" [, `) p @.Destination := assignLObj[1,row];
5 R {5 D( T# w) }0 Y end; $ B# A; D: g$ S* n* ]
newDirection(@);
) E$ r8 l: e `( D& I @.HasOrder := true;
+ D+ E; D7 v4 U4 n% Z h end;
0 |/ d0 K& ?3 h8 t' X# N1 h end;
, A7 y1 X8 B8 e/ T8 rend; -- of the method' \9 X5 o; }$ A Z" h m# m
|