/* called by: entrance ctrl of the object 'track'
+ L; B2 F$ Q* x6 P% e*/* F& \$ L) m# `0 U
is/ I1 v: Z# r* o: R
part, GlobalDistObj, assignLObj:object;row,Lan:integer;! a% i9 m) c: W4 b
do
# S, f. n, C5 [& E- T Lan := rootfolder.Internal.Tools.AOLlanguage;& w3 W1 w3 I: i& w$ i/ p
if current = @.Destination -- else return
. S. U* y" o- j: |; x$ v q then& S7 k# R$ P( E% p l# l
@.Destination := void;# I( s1 _! b1 ]) u) I' P& z
if @.occupied then4 i4 T+ n2 Q5 H4 A& w
part := @.cont;; y% y4 E' z- q9 _% {
@.transpOrder := void;' o' y# S* r8 P2 t+ k+ x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,% s% d$ R" ^5 ~, M+ Y
@,root.eventcontroller.simTime);
# R, `& P d2 a2 q9 P/ I) k @.HasOrder := false;
% }! g: _2 _: ^* a/ j- i @.DrivingHome := true;& G" h) P+ n' l) | n
rgManager.tryToStartTransOrder;
9 g, w4 V2 l, U0 w if @.Destination = void9 f) G' Z) U5 w5 y( O% X" {8 `8 T( p
then -- no transport order for vehicle @! ^' z P* i3 m' i( F
@.Destination :=
& W2 J$ S! n3 O2 E rgManager.nearestFreeStation(@,track.~);
8 [/ H" M9 ^9 j" f9 E5 i newDirection(@);
* y, S. K3 S$ L" x. I2 u if @.Destination /= void then
- e# p: s- q# r! S+ `! c0 t6 t @.Destination.NumReservation :=! l- u. V( A+ l9 I$ |
@.Destination.NumReservation + 1;
0 v/ O9 \' ~% n. O7 h! {: R- o end;/ o/ M l) j. j2 f3 _' x2 D* S7 _
@.CurrIcon := "drivingHome";
" F1 i' `4 @, j8 ^$ Z+ {+ Q @.DrivingHome := true;/ \1 c3 X7 }4 d7 r' M# b
end;0 O1 i2 F- r: Q2 I% y; r; {: G( z
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 J7 s' d; Y* y
part := @.transpOrder;
' T" t+ Z I0 T/ @3 ~8 \ part.move(@);-- load part
8 e( J9 ?1 U. i# V2 w/ D8 O @.CurrIcon := "load";% `5 `& V, V0 A+ O0 ~6 L; e
GlobalDistObj := part.globDestination;
- G! C$ h7 M# ?& Y1 t- Z4 T assignLObj := rgmanager.rgAssignL;
% r& t. S) P# W row := assignLObj.getRowNo(GlobalDistObj);
; {- ^6 n; g+ Q7 f& o( | if Row = -1 then -- since 70
, O' f* V8 A( g( c% S if lan=1 then9 Q2 ~7 n6 A/ P: r9 W+ z( }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),) \* x. Q. Y5 R
to_str("in der Andockstation: \"",?.~.name,"\""));$ X, `+ t- P! s3 Q7 n% m* {. \ H
else$ N$ ~1 w+ Y+ V
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),) N+ c+ K( u5 B2 E# k
to_str("in docking station: \"",?.~.name,"\"")); ) J1 X, g( p3 [4 C2 A# V. P& S: ]1 U
end;
1 b1 o% D; c! ^3 i else
9 T5 K8 W' ?) Z3 v @.Destination := assignLObj[1,row];# u9 `" i$ @5 a
end;
- n2 Y0 T$ D' Q6 a, \* Z newDirection(@);
; B1 z) n" Z1 ~ @.HasOrder := true;& G N; V% ~5 g: D+ W1 d
end;8 O( O, B) g; ~ M. H
end;
# ^$ F( x- T! Mend; -- of the method. j$ _ `& Q- X" D
|