/* called by: entrance ctrl of the object 'track'$ X) n \9 p4 q; v: q- j
*/
2 H$ t" Z' \& T! L# p& kis$ C( V& n) T8 O2 ?/ S7 \' c3 U
part, GlobalDistObj, assignLObj:object;row,Lan:integer;8 i* T5 A+ J! Y" t% I- p, C( P
do7 ^2 j2 o4 z7 ~; H+ N- g; }% a
Lan := rootfolder.Internal.Tools.AOLlanguage;+ ?+ O% l# v$ I! q) s; ^/ T1 K3 p
if current = @.Destination -- else return0 g8 n0 b$ d' Q6 K* T D8 {
then
* w. t; P( }1 d7 K. }; N2 o6 `- e @.Destination := void;
5 t! Z( O E# m; ^0 `, v if @.occupied then
6 M) f }+ V4 `6 [9 [8 u2 ^( K: n part := @.cont;7 I9 c* ~" C5 }" ^* B: B
@.transpOrder := void;
* l7 M' k8 y+ L; k; G+ N) s4 U4 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," |9 s- j+ b2 ^5 z
@,root.eventcontroller.simTime);1 V# f$ o+ o4 H
@.HasOrder := false;/ C& `; t( b' b; U8 J! x# H
@.DrivingHome := true;5 \, }" G) h( {
rgManager.tryToStartTransOrder;
( j4 o6 Y4 { ?( \$ ^ if @.Destination = void
, m4 ]) c7 n1 f. A" F! K+ D then -- no transport order for vehicle @0 m: F% J* \ W0 n
@.Destination :=* m5 w; E1 ? s2 O& a4 U. d9 G
rgManager.nearestFreeStation(@,track.~);
; ?& S& S v& F* Z newDirection(@); 3 K# i" [; k( N% o0 t2 s. j# Y3 U
if @.Destination /= void then9 ~6 }3 e! e# U
@.Destination.NumReservation :=- x l! ~ A! J
@.Destination.NumReservation + 1; K7 S! r+ z9 C
end;
d& a9 u8 j5 u @.CurrIcon := "drivingHome";
+ h; |* f4 y! P1 R6 J @.DrivingHome := true;* n) @) f- g1 h; C
end; i( n6 ?$ ?$ n3 y A$ D$ C
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ g3 d- f% Z! n) B; M$ { part := @.transpOrder;% G4 V5 \( N5 Y# Q3 B9 [
part.move(@);-- load part" y% B; W" r! U' g6 w
@.CurrIcon := "load";4 S- J' v2 C8 _) y5 G( \
GlobalDistObj := part.globDestination;
4 O1 B1 f. w L# s assignLObj := rgmanager.rgAssignL;
+ ]# ~3 ]0 Q( t* _6 g6 L0 M" M row := assignLObj.getRowNo(GlobalDistObj);
% p3 Z7 n7 m4 T: ]: J6 I% `1 A if Row = -1 then -- since 70
! `3 K+ T# O" H$ \) E& e1 i if lan=1 then
( N8 L0 H1 d: [8 h' ?! N3 g promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 v _5 w. A9 h) ]4 j: }- | to_str("in der Andockstation: \"",?.~.name,"\""));
# m- I1 ?$ e' C' a3 `3 t/ } else
7 W4 F) |8 C% S. o5 A. D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" B" x! \+ _ t3 k to_str("in docking station: \"",?.~.name,"\""));
# R9 s% P. y) t1 ?7 N5 ~ end;7 [$ |! n% r p, l
else1 H' y: D$ g4 F
@.Destination := assignLObj[1,row];
) Y y' g y: w& O) K end; ) Y2 l8 s3 O8 b9 u
newDirection(@);3 U7 R2 c X5 g! Q% K3 v; h
@.HasOrder := true;
& \* J; E- J+ v3 O* m* ^3 s3 x- h: V7 I0 g end;
, U: \, R0 F1 R5 |7 m2 U! ~4 q* ~ end;7 O1 ?; V5 D C& D0 j0 U
end; -- of the method: @3 p! `/ A' M: _% d$ W" B
|