/* called by: entrance ctrl of the object 'track', o# K2 u3 c1 o+ N2 `- v( m
*/# A2 M j7 r \, X" F. V
is/ P: P1 c6 G e6 @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
/ T& M: c& B- ?! |" Q7 _do2 Y k+ ]* }# L3 r* E
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 H" }* m J" u, r; d. O: g if current = @.Destination -- else return
! L% J% h5 P6 [ then, w8 z9 X* o3 X! m0 F+ {+ t6 ]
@.Destination := void;
' ]9 S: S% t; D3 I a4 N if @.occupied then) I* h; D; U# Y
part := @.cont;
) E% E5 ]: \/ j | @.transpOrder := void;
6 x }; y `+ z" F" _' e$ ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ M) s6 O% `3 z @,root.eventcontroller.simTime);( J9 S1 `* P' ?/ q
@.HasOrder := false;
( b$ H, c$ A7 t7 \ @.DrivingHome := true;+ F q9 R6 E. P6 |/ _; \
rgManager.tryToStartTransOrder;
. V; j& P2 i, l8 V I# d4 w' G if @.Destination = void
# X1 e& G7 ]' b5 ]% G. Q( R& N then -- no transport order for vehicle @; G1 W. K% K+ u5 N" o# h
@.Destination :=
. E' C. @: F7 T0 U8 i0 p rgManager.nearestFreeStation(@,track.~);+ H) B: @, R6 B$ P8 |, `- l- J2 H2 U
newDirection(@);
+ G |+ R$ N' D$ J9 E J% { if @.Destination /= void then( ?; {% ^+ z* R! }0 _1 y
@.Destination.NumReservation :=
- c4 h$ X9 D* d' e* F @.Destination.NumReservation + 1;0 [1 o: o* S3 K8 g
end;" Q, a; C* N! a/ S6 I; j" T
@.CurrIcon := "drivingHome";4 X9 R- |+ P* R# @
@.DrivingHome := true;
i; g% \3 c j" v' e7 _4 u# e( Y* _ end;/ y! D+ r. D0 K
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
* L- D- J, C8 {5 A- V, T part := @.transpOrder;6 ~) u8 \* p, l
part.move(@);-- load part
6 B8 m; p9 Y& l( G1 v @.CurrIcon := "load";# I. }( ]9 Q8 x( \& Z2 a$ |
GlobalDistObj := part.globDestination;- a9 ]0 T2 S$ n$ ^9 h+ v
assignLObj := rgmanager.rgAssignL;
- t4 ?6 R2 I% |( q" A% Q row := assignLObj.getRowNo(GlobalDistObj);: L& N+ t% f" P2 S: `9 l
if Row = -1 then -- since 70
1 z) [# L5 [: }( u% M if lan=1 then2 i! c- ^( a2 P9 K* _
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),% v6 w- z F6 x3 n% u6 ], J
to_str("in der Andockstation: \"",?.~.name,"\""));: p$ n* h# V" }, j: {; h
else
# t6 U4 y$ H9 S( C# k8 k promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; z% G% R; s( r, w( @ to_str("in docking station: \"",?.~.name,"\"")); 1 k9 x; o: |4 r- d& s- D6 S5 A
end;9 L4 q8 A3 T4 M$ d; [
else1 }5 e( O2 x! m2 A
@.Destination := assignLObj[1,row];. k: |4 o* y* H5 [" P
end;
. w& q; R8 X$ @ newDirection(@);
3 N; q4 o6 {7 A: j$ T @.HasOrder := true;8 d/ w& s3 m$ w: N
end;
: U4 H" W8 J3 X B. m7 G end;
3 Q @* R( M7 O+ |/ Iend; -- of the method) j" |/ \9 m6 M1 W, W6 D3 O
|