/* called by: entrance ctrl of the object 'track' B( s5 f) q# b C# x; Q# J' J, `
*/% ~, y- U8 E6 g; ~
is! C' D* ]3 L/ G! a
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) o6 l5 U, u4 Z/ s7 x1 n
do
9 q. W' @* C h$ I6 U Lan := rootfolder.Internal.Tools.AOLlanguage;0 k7 E7 H" _8 @7 v
if current = @.Destination -- else return
n X& G8 ]# h( v- W then
+ X- s, `' Z" y+ Z% Z @.Destination := void;
# |1 S& d* K, F* k9 J6 u if @.occupied then
# F% ~1 o" u7 w" H part := @.cont;
* Z& q5 G# n1 O0 ` @.transpOrder := void;4 M0 h7 }# [* `! Q- V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,5 C9 _' ~1 o! r# {" o& p! X3 v
@,root.eventcontroller.simTime);( G9 y* _5 P" d
@.HasOrder := false;0 z# {0 N8 h: I3 l: F- M# H+ r
@.DrivingHome := true;
0 z0 b/ [0 \3 p8 [$ q/ @% t rgManager.tryToStartTransOrder;# [8 Q; N z! }- J
if @.Destination = void- J3 _% A9 U0 o" K: @' L! p
then -- no transport order for vehicle @ L) n' ?- [$ e1 ~, Z8 H
@.Destination :=7 l. }+ _4 L1 A3 T P) `
rgManager.nearestFreeStation(@,track.~);
6 ?/ V& P6 o" U newDirection(@);
/ g! f. @* O: }) D, {# Y- x4 A; h if @.Destination /= void then5 @$ R q/ r! c0 t1 C- @& x
@.Destination.NumReservation :=
' b. E$ X9 W6 p) e @.Destination.NumReservation + 1;" m( n, k7 H9 a/ C
end;
. ?, M- `% w5 m0 U- _0 M" ?3 m @.CurrIcon := "drivingHome";
m$ M# J' ^& y( ^; [ @.DrivingHome := true;
# B' t8 M' T2 l/ } end;* L0 B& R0 b$ I4 n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station. r I6 [4 I7 C5 K5 x; J/ ~0 I
part := @.transpOrder;+ I- D; Z" s1 W8 Y* }8 E5 J9 F# j
part.move(@);-- load part
; x: r0 e3 y9 S; Z @.CurrIcon := "load";
0 }+ f. u) \# ^& s) S/ G3 n: s GlobalDistObj := part.globDestination;
0 S1 t7 k5 C& C) x, t assignLObj := rgmanager.rgAssignL;1 {7 d9 F+ E* D+ m' Q
row := assignLObj.getRowNo(GlobalDistObj);! {* _. V" j" M2 u1 {3 D8 U# t
if Row = -1 then -- since 701 y1 Y& `/ q4 X: b) Q9 k8 L
if lan=1 then
* j# K. t* n" \: Q6 i promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 _6 b; v2 g" Q# F: y& i to_str("in der Andockstation: \"",?.~.name,"\""));' m4 |& i9 ?9 @ n) r" S, X s, p
else
% _: k1 u3 ~+ K& R2 e" S promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ N% o( i/ e1 e1 E! _/ d
to_str("in docking station: \"",?.~.name,"\""));
* h; w! a( }6 n0 ^ y3 E end;" j# ~- u7 z6 G
else1 D* n- {; `' D5 r! S: p n
@.Destination := assignLObj[1,row];3 x8 ^. J6 Y1 r( u& {
end; $ i @7 g) I% s( F$ D6 W0 Y
newDirection(@);3 K8 k) J3 N( x1 E- V' `! [
@.HasOrder := true;
& r* v% _/ }; g. t& @4 S end;6 R' X4 n& |$ T% U
end;
T& u8 M4 @( X dend; -- of the method' [0 O7 H( X6 {$ i& O0 V. n0 `3 t2 T
|