/* called by: entrance ctrl of the object 'track'; q0 p" C/ g* k" z8 B+ ~+ O
*/$ n5 k, y, c& _& c( a5 i* f
is
# I7 ^0 x, p5 O: V. G part, GlobalDistObj, assignLObj:object;row,Lan:integer;" Z) g6 y7 v2 M. p- ?
do) l2 x( [0 p* H5 s2 u. o5 M
Lan := rootfolder.Internal.Tools.AOLlanguage;. m" y, e1 |7 z$ U
if current = @.Destination -- else return
# a8 h* @! o" Z/ H, e* K then
& U0 x! J8 S9 Q. {% s3 x @.Destination := void;+ \+ A" l; j* I7 F- `+ V
if @.occupied then4 w% {$ c! v8 `9 ]
part := @.cont;% T, g) f$ G6 f2 r1 L8 t% ~
@.transpOrder := void;
- S: i3 p! b" D' L part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,$ k+ O! j. |6 u7 A2 ]
@,root.eventcontroller.simTime);7 C2 C5 N+ G. H5 J
@.HasOrder := false;
' E5 I# c/ R6 p2 c& F @.DrivingHome := true;6 p G. F5 e! r5 {0 `8 z
rgManager.tryToStartTransOrder;
' o5 U( W- X" E( j' C8 Q1 n if @.Destination = void* \# U6 a/ }& G0 T$ h: M0 {
then -- no transport order for vehicle @0 Q$ j4 q! W* d# Q: ?$ i
@.Destination :=* f' ?1 t! w7 ^3 G$ m
rgManager.nearestFreeStation(@,track.~);) k4 f# ]& M8 H, v9 J( `( e5 J
newDirection(@); 2 _1 U, j" K1 s: f: B
if @.Destination /= void then6 c" b. f! `' Y/ S/ @3 T) \
@.Destination.NumReservation :=
' {' h0 v& q% F# K: W @.Destination.NumReservation + 1;
2 m% U3 o5 Q( ~- d end;
3 f/ r/ ]$ a* [+ y+ O @.CurrIcon := "drivingHome";2 C! p1 k) i6 r+ m( v! n
@.DrivingHome := true; M: j) I: u5 g! V
end;
9 ~: K: y9 w0 ^0 `, D! b else -- the vehicle @ is empty, both vehicle and part are in the same dock station
% O: h: s3 R5 _* J( d* {. b x6 Q part := @.transpOrder;
4 Z4 O* r$ I' S9 U, U E9 b! ~ part.move(@);-- load part
$ p2 Z9 U9 J4 o; `9 S4 Q @.CurrIcon := "load";
3 e0 R5 e3 Z8 u& Z$ S, J GlobalDistObj := part.globDestination;* b2 N8 H, ~% o, e: n5 t
assignLObj := rgmanager.rgAssignL;
3 [- W) o5 C: J; q! Z row := assignLObj.getRowNo(GlobalDistObj);
+ l) u7 R' U4 e6 A if Row = -1 then -- since 70
( B7 ]% g7 N4 y) w( Z5 K% ?+ N if lan=1 then$ _( b5 @! b% T* ?, X, Z H
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 ]: O1 m$ q8 K2 t4 |9 O) G to_str("in der Andockstation: \"",?.~.name,"\""));
2 b9 m# Q7 [5 q/ v5 Q else- x9 k' V e6 b q1 l
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. x# R5 ~' w/ V1 ]% O4 B% Y% u. ~
to_str("in docking station: \"",?.~.name,"\"")); 6 M0 e: v* t1 y/ y
end;
M! [) q$ d8 J else
! W1 [ u0 I$ Q( Y. B# Y" ]7 g. h @.Destination := assignLObj[1,row];' C7 j! R* U( X8 K+ J: t/ ~% V" A6 `
end;
: W* C j1 M6 M newDirection(@);
( C3 ]1 L7 E' m, t% t8 | @.HasOrder := true;2 {% e; J5 K5 V3 W7 S
end;/ V. J: q: ^) _% ?
end;1 m1 |" O+ H( f, ?( D, @3 q3 s* A
end; -- of the method
, a6 _% i0 ^3 q |