/* called by: entrance ctrl of the object 'track'! t" _/ B* L& G( i, G( W
*/
, F1 y8 t, c2 O! h. W5 ais
. ]% _5 x! `1 j2 ?& M part, GlobalDistObj, assignLObj:object;row,Lan:integer;
0 ^* @ U/ Q* s2 p. u+ B5 Fdo* d8 X- r8 e2 {( H$ k! |
Lan := rootfolder.Internal.Tools.AOLlanguage;$ n( V! _, z8 s
if current = @.Destination -- else return, I) E) M9 U! E4 [
then
, s. c; A8 c C9 i @.Destination := void;
& v a2 W. Z, V- d& W if @.occupied then) l6 k9 m3 j9 T
part := @.cont;* F; \! b5 ?2 K7 L$ x/ u( R
@.transpOrder := void;
% o* O* o; ~& a part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,( ?! u+ H+ L/ ^1 o5 `1 b
@,root.eventcontroller.simTime);
\7 `. r& E, Y! o @.HasOrder := false;' y% S' b) h" r/ \
@.DrivingHome := true;& c" V. K) S% \7 w7 t
rgManager.tryToStartTransOrder;
- Y7 Q. V, V/ z" l, L: A. J/ W if @.Destination = void, v9 M! o" E i) c1 ]! R8 x
then -- no transport order for vehicle @
$ x9 j( n9 i, U) ] q @.Destination :=
B! y2 O! |: D2 \# k$ s3 C rgManager.nearestFreeStation(@,track.~);) o. ^) J# W( l+ `2 P/ t
newDirection(@);
j+ K3 O8 T6 }8 _+ B% ^4 I- I if @.Destination /= void then& M8 F" x( P1 D3 t& u- E
@.Destination.NumReservation :=
0 W8 R0 G( F. M9 G8 R @.Destination.NumReservation + 1;- T5 Y1 L. R) D$ Z2 I
end;9 Y" k. |- y8 n- B: I5 p9 l0 e9 ]
@.CurrIcon := "drivingHome";5 p7 X/ d$ I# U" ~8 m
@.DrivingHome := true;
, f1 L' U% [2 z& Y q" r end;
: U( y( g L. g2 _( {0 u else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. |' |- `) T* ]3 \8 C part := @.transpOrder;/ z; f$ |' {4 v" [1 F1 `
part.move(@);-- load part
3 ~$ J5 E5 ^4 ~! a7 U1 Y @.CurrIcon := "load";
$ k6 s" I4 ^. d* O2 U5 X GlobalDistObj := part.globDestination;' k1 c W- p- y6 p6 N; ^- o5 G0 K
assignLObj := rgmanager.rgAssignL;
( t5 s% I( U- ~8 C row := assignLObj.getRowNo(GlobalDistObj);
4 j9 r6 a5 ]. {9 ]- }! z if Row = -1 then -- since 70* R" S4 d3 ~' s
if lan=1 then o) e2 ]/ @3 k9 Y0 }
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),# [9 L2 J; b# t8 @3 U% ]* A* V8 y
to_str("in der Andockstation: \"",?.~.name,"\""));
) [) d( X* d- T, g# d# K0 B; e else
5 O2 p7 U. k6 t8 ^) f promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ e5 ? ]( _: q to_str("in docking station: \"",?.~.name,"\""));
5 \' l! u1 `$ I' X end;
; {4 I' `9 q/ T P else
8 t; q$ o6 v/ E( x& y/ J, C @.Destination := assignLObj[1,row];' H @6 ?. \) g
end; 7 c! i! {- J/ F# N) y$ C
newDirection(@);
, }+ j+ `& Q# W7 n' R6 a8 F @.HasOrder := true;) J5 a5 m( s5 L9 S ^
end;% q0 k7 g$ I8 M# A" e) x- `* k0 \% o
end;2 | f4 l, G# D7 a2 R; d+ G- O( I' ]" N
end; -- of the method! a [8 [0 h1 b4 H% ?' t; M
|