/* called by: entrance ctrl of the object 'track'% b" [' ~5 p) r0 s% ~2 g
*/
4 j: _5 z- m% I# Tis
) z" B; ~/ k8 j+ M( } part, GlobalDistObj, assignLObj:object;row,Lan:integer; s1 o6 Z7 a ~
do) u4 P* U" A) P) P8 o4 |
Lan := rootfolder.Internal.Tools.AOLlanguage;5 e& l& c3 g7 s' }* J% Z, l, `
if current = @.Destination -- else return
" a4 F1 t, p3 f( R& B* q* | then
) I) `# {/ o1 H2 v4 K @.Destination := void;
" Q# Q- f8 M1 P$ L4 Q, [ if @.occupied then' J& d- A; d& J. D: |
part := @.cont;1 _# L. b4 a ~" z; g0 Q) G& @
@.transpOrder := void;
) B! f! C: e4 c part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 O) I' l$ W! b; v* f) ~8 M
@,root.eventcontroller.simTime);
4 K' E8 k7 O, y# s, h @.HasOrder := false;2 Z5 v7 u- Y4 O! j4 L8 p* k
@.DrivingHome := true;- J$ Q* k g6 {! y
rgManager.tryToStartTransOrder;7 G3 i- @( s, f# m% o; l# \5 e
if @.Destination = void) m+ e; h' x- C+ Y2 t3 Q7 d
then -- no transport order for vehicle @
9 H9 W% I$ f3 m% R8 { @.Destination :=
7 h: e, R; b2 R! f! M3 ] rgManager.nearestFreeStation(@,track.~);
9 ^- G' h/ D+ X' H1 m" k. u7 c newDirection(@);
# r- M# C" T9 N: A if @.Destination /= void then
: x+ z' |* U4 e6 x( ]7 @" i @.Destination.NumReservation :=
( s, M% q* E# v; N, G" E# h @.Destination.NumReservation + 1;# b4 b/ u4 ^! J: K
end;
' Y1 N( j1 g+ Z) v1 g @.CurrIcon := "drivingHome";
7 t0 o- m% e+ S j3 k- I' H( P @.DrivingHome := true;
$ Q6 Y* T/ t& V+ y$ [* n end;
0 ]$ [' Q+ _0 `$ n7 [ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
; Z G3 ~5 T5 w part := @.transpOrder;
( d/ |) Q5 L5 X/ F part.move(@);-- load part# c# ]7 u0 J1 m% Z2 M: `/ ]: e
@.CurrIcon := "load";
! w% s# J8 k' z. u+ H GlobalDistObj := part.globDestination;1 k7 y# j+ _! S0 V
assignLObj := rgmanager.rgAssignL;2 J+ N T8 t; l6 B' t+ O1 `
row := assignLObj.getRowNo(GlobalDistObj);
( ?# }" r3 z1 u/ i: X if Row = -1 then -- since 70
7 }2 \ I& ]% I, S G$ Q* S if lan=1 then
3 }0 g9 H4 l! J$ c& p9 O4 E promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
3 `( c: I' q9 W2 ^ g* d4 s to_str("in der Andockstation: \"",?.~.name,"\""));) [7 ^" g( Y8 Z6 b! g
else
" g/ p% k1 I ^1 w0 P- C8 o promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
% w; B0 g W) `: H6 V* U/ q0 Y to_str("in docking station: \"",?.~.name,"\""));
6 h; l' F1 \1 m$ o" X end;/ }* {3 p( x# P$ W5 {
else
, j' \7 |* A) i; Y @.Destination := assignLObj[1,row];6 N p# N3 ?' }! v% i% k
end; 5 l6 o8 u& H G, R% G, N& j
newDirection(@);
( g6 F9 ]+ \7 T0 W, T @.HasOrder := true;$ k( R! T! o6 Q, ^
end;7 H7 S9 V) L8 v1 Z; m* V
end;* } z, t5 b9 S( h9 H- s# h
end; -- of the method- R: P5 D& l: S; b; D; h j3 x
|