/* called by: entrance ctrl of the object 'track'5 L2 `( X/ S# ]) A8 `; ?0 f
*/
6 z5 }+ ^: g \; }$ p& J6 |is
* Z/ {# e) C% e. C/ y7 B part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 U+ _! }3 S jdo
" _6 K% n- T$ B3 \- T Lan := rootfolder.Internal.Tools.AOLlanguage;
$ O! {* S! A( r k4 ~ if current = @.Destination -- else return6 O) R1 u8 `" \, C& l! p/ p
then
( x0 i- k: s- @* N. A+ { @.Destination := void;
I. R0 a8 y- X* s* d if @.occupied then
! B( r I! Y" i! `7 D5 c2 o part := @.cont;
* h N. b# G, B7 |8 B' N5 s; o @.transpOrder := void;4 c8 L" I( p* i' B* _
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; L: u4 Y( c5 Z
@,root.eventcontroller.simTime);0 f F+ R5 A# U( n
@.HasOrder := false;
; P, T+ L9 e# m2 ?! o9 p6 M# \ @.DrivingHome := true;
% k. z7 ^% q% c; [ rgManager.tryToStartTransOrder;
* c% y9 s( \4 m( K' [0 _; e* h if @.Destination = void' V, V. g, S. F. A
then -- no transport order for vehicle @7 {) ^# D) Q3 G
@.Destination :=. P9 }& ~+ ]& Q& W8 @) W
rgManager.nearestFreeStation(@,track.~);+ |5 D9 T- ^& S9 G% h% R
newDirection(@); ) R- C3 W# S( U. ]
if @.Destination /= void then
+ i' ^, m& ?; | @.Destination.NumReservation :=9 l+ q% g6 G \! s) P6 O2 g
@.Destination.NumReservation + 1;
) t. V! q: Q2 Z* H4 X end;, W4 L* `/ x' @& D) \% g; M! m
@.CurrIcon := "drivingHome";3 V/ `6 W) v& ?# V" V. p1 A# n
@.DrivingHome := true;
" D, i$ @1 ]4 y) @ end;
$ ~% s* p! d6 K; }* d else -- the vehicle @ is empty, both vehicle and part are in the same dock station. A J* `5 l& R) l
part := @.transpOrder;) L+ j" G' U! }4 P: d
part.move(@);-- load part" C8 X/ }6 l/ {" w/ Z G4 c2 B% @
@.CurrIcon := "load";
/ b4 ]( P# ~- r0 ~' F GlobalDistObj := part.globDestination;& ]+ Z! N' S/ @' B8 u+ W$ Z' r; K
assignLObj := rgmanager.rgAssignL;9 R, q/ m$ k/ i7 V$ l0 w
row := assignLObj.getRowNo(GlobalDistObj);
! _/ Z3 u; f- z# x% b& g0 Y! N* Y# I if Row = -1 then -- since 70
# |7 b- \1 Q$ u, A if lan=1 then- ^; F5 \2 {( S4 `. `! d- p
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
& P7 ?. Y- }* S C: B to_str("in der Andockstation: \"",?.~.name,"\""));$ j7 s* x, t, p* A
else/ f& C6 J/ x4 i! c# s0 E1 h% O) [" ~
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 v! b2 T; I8 ~( e* `9 j
to_str("in docking station: \"",?.~.name,"\""));
# i3 V6 ]' b: K5 }& h1 Z end;
& o+ o, n) h0 Z1 Z! d- t5 B; Q/ f else
2 l0 J- }# e$ e# ^( j s @.Destination := assignLObj[1,row];
& X1 K" m, G H0 A! ~ end; % Z* k# v) F% H. e% G( H$ F5 j
newDirection(@);
' n/ G3 K8 _5 w, h; W @.HasOrder := true;1 F, N( q. P. J9 [
end;
! |4 M- ~7 o. }4 M1 K1 R* v end;$ V) u, a( [: u- n! O2 ~
end; -- of the method \5 W) t( T F' v
|