/* called by: entrance ctrl of the object 'track'3 @3 |$ m( W! C3 I3 r: w
*/
; Y, U- y$ H! z6 y/ Mis) @. u4 N+ x2 L: x. O
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
! M6 i" J5 }3 |, M8 \0 T7 Sdo/ b7 C, x' {: i* j! L; p
Lan := rootfolder.Internal.Tools.AOLlanguage;% J8 U( t. t3 O$ [
if current = @.Destination -- else return
/ m6 I. O/ k1 e1 I) J then
+ ]! q! o0 r# d/ u' B; d @.Destination := void;3 ~/ {. C! F: y, E+ j
if @.occupied then
7 A3 q) t4 e! { part := @.cont;
" V: C. d6 [' P& m2 N. h5 |4 F @.transpOrder := void;9 r( I! ?( ~ K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
1 y! J6 F' R+ M) S. F2 s4 ] @,root.eventcontroller.simTime);$ M8 m' M3 R1 H5 r c4 z
@.HasOrder := false;
! T4 P4 ? w0 F# u- B+ |9 A @.DrivingHome := true;! E7 w* ]$ c( \. F* _8 o
rgManager.tryToStartTransOrder;
# q7 n" G0 x' y7 E7 h( ^ if @.Destination = void
7 K3 _4 l6 ]/ A: Z3 h then -- no transport order for vehicle @) C2 _- v3 }3 x* z* K
@.Destination :=7 _; q7 K" D% ~
rgManager.nearestFreeStation(@,track.~);, Y9 Z, F' s! _, y' j
newDirection(@); " D% F+ Q, L# Q& v, O
if @.Destination /= void then* b4 e& `; M/ j. p3 {
@.Destination.NumReservation :=
8 \$ S5 X0 c; j% Q6 [ @.Destination.NumReservation + 1;
# u9 t& p' a6 f+ B0 r+ O end;
C$ C! _5 o5 z0 { @.CurrIcon := "drivingHome";
* r! D' n! [9 u, M, P @.DrivingHome := true;$ V8 E* i1 f, ]& }0 g
end;
- O; _3 Q- T% i/ b1 B$ f9 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. }5 `6 i6 |- N. |8 J' X part := @.transpOrder;! R ]* k7 E% U9 z
part.move(@);-- load part: ^9 {# e. m$ ?. T: c; D
@.CurrIcon := "load";
5 ], q% |( N% Q7 V& i0 x- R GlobalDistObj := part.globDestination;
G, p$ _: x& P! l- P assignLObj := rgmanager.rgAssignL;
' U5 Y5 v" V* A# y9 {7 A& I | row := assignLObj.getRowNo(GlobalDistObj);. j/ |% B( F8 @; R, ^) k$ R
if Row = -1 then -- since 70) m3 V8 H8 g% [' C& Q' L. x+ H5 n
if lan=1 then; N2 H$ s8 s9 w+ N3 Q( M
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! q$ o- q7 x% \2 T4 [8 M- |0 x8 g9 `! S to_str("in der Andockstation: \"",?.~.name,"\""));& s% C" e4 D$ i( c
else
" V' {: W4 ? P: X% r- b: S6 I) w promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),* W- ?9 v2 q9 c0 H0 S
to_str("in docking station: \"",?.~.name,"\""));
, U$ y6 H' b# K end;
Q C0 E7 F; h# c% }0 j. d else
2 Z" M# C* ^7 v% B* b8 E @.Destination := assignLObj[1,row];( S) X4 p4 B9 v1 o" k w3 s
end;
% k) y- t: Z8 q9 }/ s newDirection(@);9 m: B* v- X' Y$ Q- ]& r% t1 n
@.HasOrder := true;
1 n' O% D# s& F( S end;$ u% B5 d$ L8 D( M
end;
$ s1 i) p4 H) a1 T5 U$ k: \end; -- of the method5 m" y, \) M. l! G3 c
|