/* called by: entrance ctrl of the object 'track'* Y* M9 T4 q9 e7 l9 S5 ~- z
*/
. e0 r* p- e0 c" j( D" w+ Sis7 X0 ? c2 n/ W8 W9 e
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; \' G: E- w3 A* O2 ~do
" R+ O* t6 r! y, p) j( r3 z' m1 L3 w Lan := rootfolder.Internal.Tools.AOLlanguage;
% d% A) f/ T. i/ R' s if current = @.Destination -- else return
0 k `" V# P; |1 L9 Z1 q then
e2 ~' o! {% J; z @.Destination := void;
8 ?, W& w0 K$ U4 ]3 @" }9 _9 w if @.occupied then, t4 w3 O% D! S; s& P
part := @.cont;0 a) Q) I8 n; C( a+ {/ ~$ Q" `# m
@.transpOrder := void;/ e! J' g! t8 v! L7 i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,0 N9 ^1 \" O! K
@,root.eventcontroller.simTime);
$ a& l7 v8 }) O! m5 f @.HasOrder := false;8 Z+ v+ _# j2 q) q9 G2 O* l1 B
@.DrivingHome := true;
$ h+ `) X" o! f r* T+ l rgManager.tryToStartTransOrder;. @& ^% O0 F5 W% F
if @.Destination = void$ H0 Q( [1 Y1 p5 D, G7 S; k
then -- no transport order for vehicle @ A2 y' F% K& \' O8 Q( W0 C' j
@.Destination :=0 P# Q& I2 A8 L
rgManager.nearestFreeStation(@,track.~);9 C( T) x& x& a
newDirection(@); # S8 H+ \# P6 \4 v# O1 O
if @.Destination /= void then7 s9 U# [$ j d [" h, Y
@.Destination.NumReservation :=' ?0 Y8 l% `5 U, ?# v# P
@.Destination.NumReservation + 1;
3 W H2 z) p' ]! t* K6 C8 M0 U: B0 E$ C end;* Z% h) M Y( d3 R* U
@.CurrIcon := "drivingHome";
2 R1 f3 Z+ }- ~/ y b @.DrivingHome := true;4 f& T, ~: z3 h: R1 }6 m' Z) A
end;
6 l6 U' y, z* T else -- the vehicle @ is empty, both vehicle and part are in the same dock station; o9 j( P( q* d3 Y- z
part := @.transpOrder;) e, _1 g' R% N& m" c
part.move(@);-- load part s, @. c: r, D4 Z! j0 _
@.CurrIcon := "load";
& |- t* }: Z s; a, W GlobalDistObj := part.globDestination;
) u5 {" H8 ?# M+ r3 `* R# Q assignLObj := rgmanager.rgAssignL;
" ?' Y% W; k6 Q$ Y, L row := assignLObj.getRowNo(GlobalDistObj);
% o/ _1 o. h7 }9 ^! J. n3 e/ a4 f if Row = -1 then -- since 70& Z, M0 Q$ E- o0 O% T
if lan=1 then
0 e: s- @9 o" K promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 @& q4 \+ [/ f0 m6 q9 I( \% I to_str("in der Andockstation: \"",?.~.name,"\""));
+ D; C% m# I. h F6 U else0 H8 _5 C; _% Z& h0 ]
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""), M( M$ ~5 M5 r4 u: O; D% S
to_str("in docking station: \"",?.~.name,"\"")); 3 F# Q5 F9 _' F' F' q
end;8 \; v5 Q! m% X# }2 h& A
else5 H% y. @0 n, G+ C9 m0 p0 \: Z* C1 f
@.Destination := assignLObj[1,row];
$ h/ X1 v4 H/ ?2 @7 _2 z& f end;
/ m% F/ B# f7 Y( s4 h2 c3 U newDirection(@);6 ]2 X, ~) v+ {8 l* N
@.HasOrder := true;8 n. O9 }) g( ?" T# }
end;$ ?9 q% V1 L: O
end;8 o1 }2 ~+ \2 d) }3 B
end; -- of the method) b0 V2 z ]) [4 f0 W: ] k5 _
|