/* called by: entrance ctrl of the object 'track'6 u8 V* ~. c( C0 b- H9 h2 U
*/
1 ^- H) I; Q, Wis
8 {% n( l6 S" l3 X E part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! f( c* f% ~6 C# k0 p; H% Rdo2 |0 k' o4 y: T
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 _: a _7 n: F if current = @.Destination -- else return6 h2 D! G9 r( D' o
then
3 r5 m- V2 q& ]# Y& I4 P6 I @.Destination := void;
$ S6 ]% x: U- P/ ]0 M- z: [7 s if @.occupied then" r; ^$ q1 U D, N8 I: w
part := @.cont;! i# } b/ n3 ?
@.transpOrder := void;
8 I2 E% L- M q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; \0 R0 t y7 |6 I$ }
@,root.eventcontroller.simTime);
! I {* F* T- Q6 _ _/ x$ S# r7 x$ M* D @.HasOrder := false;; V: H5 X# u* s- M) x9 G
@.DrivingHome := true;
% `7 z+ K# V2 u% T, q rgManager.tryToStartTransOrder;
7 K0 i2 W7 N' L, x if @.Destination = void
3 J; d6 q2 M s7 D2 p3 U then -- no transport order for vehicle @7 a! d( P; D4 B: Z6 Y% H- g
@.Destination :=
" {, W6 v0 v* C rgManager.nearestFreeStation(@,track.~);
n$ ?( V1 q* \ h' w" @+ v newDirection(@);
; V" p% [+ M: r: I8 B, Y if @.Destination /= void then
9 O6 c0 k1 P* H( ^/ \8 t* T0 j3 y3 w" ` @.Destination.NumReservation :=9 A) @, Z, H4 d* y' e
@.Destination.NumReservation + 1;8 f4 Z2 c- q! U$ y
end;
. G- D6 O4 V4 e) [( p) G4 e @.CurrIcon := "drivingHome";
+ J9 K* I# w' R: X @.DrivingHome := true;# ^3 K. ]6 q+ D/ C; X% }
end;
a' ]" |7 P% C* A0 P1 }" J else -- the vehicle @ is empty, both vehicle and part are in the same dock station: z8 ]9 _, N# w& u4 w' G
part := @.transpOrder;+ E) u. ]) i9 T& _; d0 e
part.move(@);-- load part
4 ]9 x$ ~8 e* h: u6 _) G% I& b: s @.CurrIcon := "load";
& t! b, t0 |5 q6 T GlobalDistObj := part.globDestination;8 Z+ |3 L, ?7 H2 M8 h: J5 s* ^
assignLObj := rgmanager.rgAssignL;
% M2 H o" G p* D. ^$ k& @9 D9 z row := assignLObj.getRowNo(GlobalDistObj);
, c: S9 E5 z p5 \! C if Row = -1 then -- since 709 y$ T3 _) E& F
if lan=1 then7 u" v F9 O j
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
: ?6 S& J3 d1 l/ N# [ to_str("in der Andockstation: \"",?.~.name,"\""));# U. q. g$ k+ F2 D( Y! N8 k
else( c$ k! o4 }0 \& B6 F
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
) {# [. ]' a# |1 r/ C" { to_str("in docking station: \"",?.~.name,"\"")); : h# N' a8 k/ u9 u: u; w
end;
6 V% l U) Z# [$ U3 j5 ^3 J else9 v' j+ ?' O# _* i+ S6 I
@.Destination := assignLObj[1,row];% j- C0 H, z: I( A
end;
/ ^% b2 I4 _' q4 {2 X newDirection(@);
; S9 W, ?) Y' {( y! Q$ e5 R @.HasOrder := true;, ?, ~8 S. d5 M7 N: B
end;0 O D1 Z' O% G1 I& R; W
end;
+ P; V, U8 a$ _$ mend; -- of the method; s3 u! _& w4 A' O$ C; S. a
|