/* called by: entrance ctrl of the object 'track'
- p! R, ?/ X, A. S*/
: x1 _5 t, y: b2 p6 a' t9 Lis5 p d" I( ]9 v; Q% }# |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* ]$ J J& v6 K. v1 [& q+ N# J
do" L$ y* |3 m( I5 G% ^) E+ p
Lan := rootfolder.Internal.Tools.AOLlanguage;3 b- M' c4 U! V# ?; P3 S
if current = @.Destination -- else return) w: k0 @# o" ^* a" F2 O
then
/ v# l. x& t( F/ Q5 X @.Destination := void;
5 a p" H( T; H if @.occupied then. @2 G0 ^+ y+ C; q; `& q! g! j
part := @.cont;
& I) u2 S$ S1 |& D @.transpOrder := void;: f3 F7 t0 P2 I- c8 q/ P6 M
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,- C8 N+ ~. m+ ?
@,root.eventcontroller.simTime);
. M+ J* [5 f: E5 |) W @.HasOrder := false;8 m0 d1 P: t1 U
@.DrivingHome := true;5 p4 R) q& W6 ^# V# R. G0 s/ ?# ^+ q
rgManager.tryToStartTransOrder;
- e( u8 _2 x/ ~) N# r if @.Destination = void7 O5 L# C' \8 v3 {9 k
then -- no transport order for vehicle @
" [3 I+ F+ n* s& |7 U @.Destination :=( ^$ O' S, A4 k! k# r% m, y; R
rgManager.nearestFreeStation(@,track.~);) b% l- j w. z" t
newDirection(@);
% z \* ]- y3 y' z8 K* q if @.Destination /= void then
2 g. ~' F( D! p9 L3 W( _0 O @.Destination.NumReservation :=* r. o* Z8 Z3 V q1 h2 @: Q9 H; z
@.Destination.NumReservation + 1;
7 X$ w2 b) s( n; ^ end;- @/ Q& k) d9 z$ `8 P
@.CurrIcon := "drivingHome";
- H) I ]. x/ h. T: K; F& e8 S @.DrivingHome := true;4 |7 p i b- [$ }4 B/ O
end;
0 Q* T/ k! D$ q else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 T% v4 ]3 Q; O- a part := @.transpOrder;
$ _6 `) G, ~* O; a9 U2 g. A, l part.move(@);-- load part8 K- ~/ b5 ]9 z4 \
@.CurrIcon := "load";: H& c) {0 K3 c* F) F3 N
GlobalDistObj := part.globDestination;
3 K* K) v/ D! [( w# M assignLObj := rgmanager.rgAssignL;
9 n, |) t+ B8 V5 r6 l7 u, l- z row := assignLObj.getRowNo(GlobalDistObj);
8 {4 v, d3 \' {4 t: ~% U0 o if Row = -1 then -- since 70
3 C+ v' x% c# ^. v0 c4 N+ S( u9 _# q0 F if lan=1 then
+ D& H) k4 G+ m% a promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),8 b# P- z% h' K- H7 P4 Y4 D8 v( x
to_str("in der Andockstation: \"",?.~.name,"\""));
. g6 [" v5 _* ]" s% ?3 b+ X: t else% v4 L. d0 r: C1 j
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' \. Q5 M, G0 R6 U! r8 W. Q
to_str("in docking station: \"",?.~.name,"\""));
/ }# P8 _2 A; N* O end;
( P. I% K/ \' } else
3 e4 j; k8 i! A: d- Q8 K; M3 p @.Destination := assignLObj[1,row];: D! J5 J+ y4 S- T9 t
end; * r* x, z; ]+ M2 Z! {# E# ~2 b
newDirection(@);, o2 g/ A+ {& o6 c8 l7 q4 V5 T
@.HasOrder := true;
* y/ D. q6 b2 i6 O' o. Q end;
6 q* G) v3 i! Q1 B end;
" e R: }) Z8 S+ a: A' m6 S3 Bend; -- of the method
% \5 H2 v6 R3 U: y! H/ c |