/* called by: entrance ctrl of the object 'track'- s0 I( y* _5 d- |$ a+ |" q
*/
- w, D8 @5 B0 R) H4 ois
5 N$ L& X' l5 \8 [1 v8 ^, L part, GlobalDistObj, assignLObj:object;row,Lan:integer;$ M; R6 F; t g+ S
do
4 [+ s2 L" `2 j { Lan := rootfolder.Internal.Tools.AOLlanguage;: Q5 \ K' R- y
if current = @.Destination -- else return" E, Q3 \5 N0 @! ~- b
then
0 A1 R( z. j: i/ A( n; W @.Destination := void;0 |( n7 T, j! I- O7 y
if @.occupied then6 J3 z0 d' I+ i8 o5 ^5 F- W- w9 l
part := @.cont;& U5 s/ j9 ^, q- I5 o; B
@.transpOrder := void;: Y* s% I! K+ Z
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! y! g1 ^/ P/ k* M2 h3 Q" F
@,root.eventcontroller.simTime);
& n/ g4 H& j( T: R- c @.HasOrder := false;) G+ U4 |9 k3 J- W. I: S$ L, J
@.DrivingHome := true;3 L. X5 i' G1 e6 h) P* O" I5 _! {( l
rgManager.tryToStartTransOrder;! |' x1 ?( {( A
if @.Destination = void
6 V9 v( }3 B8 Q% F* y! `& J then -- no transport order for vehicle @
7 B& [5 w" u: o% M @.Destination :=
( Q* l$ n3 Q; {3 o' @! n, o! r# [: { rgManager.nearestFreeStation(@,track.~);. G# N. m. @4 r# N! {) ^7 [
newDirection(@); $ F6 L6 G( W- k+ R G
if @.Destination /= void then6 B* |2 g# u. k8 F- m+ A
@.Destination.NumReservation :=+ l! s7 y f0 s& n/ ~
@.Destination.NumReservation + 1;& w* A1 n, {$ S' V8 b3 {
end;
$ s# s( l4 l4 A, w6 x+ S5 n: J @.CurrIcon := "drivingHome";. q4 Z/ L {" d. ^! @2 `) s
@.DrivingHome := true;) s! X4 g% \: s
end;
: O7 i. V: G9 q- S2 U' M: A3 T else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 p$ E/ Z% F. M/ J5 F2 j4 d
part := @.transpOrder;
J3 V% l/ L. x4 H n& _ part.move(@);-- load part
+ n( `. g8 W3 ]5 n7 w @.CurrIcon := "load";
3 O1 a% T0 Q: r$ F GlobalDistObj := part.globDestination;
6 N1 N- E) t" g6 z% C. Z assignLObj := rgmanager.rgAssignL;
( F \. O7 n F9 W row := assignLObj.getRowNo(GlobalDistObj);/ T: u3 G. Y1 ~9 [1 V+ I, W
if Row = -1 then -- since 70
@- m( i0 G5 m6 _+ |: ~* u if lan=1 then
' m) ?5 B/ D$ A% U6 S) U: } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 h3 E- Y O6 \: v" w& g3 c
to_str("in der Andockstation: \"",?.~.name,"\""));% Z+ L& L) o9 C+ Z# P, E9 }" k
else1 A4 E1 v/ A, Y# E u7 G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" m `6 A4 D7 N# f! i1 m to_str("in docking station: \"",?.~.name,"\"")); . ?+ l' g8 |# P3 W8 z( b
end;
; z9 y; g4 \4 _ else- m/ T$ x5 f0 w0 I8 m' V& S6 `
@.Destination := assignLObj[1,row];
5 r" G* a6 R/ {9 n6 X. i2 V end; ) O; [7 x- q' d
newDirection(@);
. w6 s2 l; s% d8 C4 b( `0 o! S @.HasOrder := true;1 w9 ]9 g6 Y: E4 z+ @: q+ c0 l7 x
end;
; t/ Q$ P" B1 M; k. ` end;6 q! ]9 }7 r" R% h3 S
end; -- of the method/ @- x: t' J. Q+ J
|