/* called by: entrance ctrl of the object 'track') m1 Y! k" K/ t4 N
*/
2 O6 i9 l0 e6 [is# n0 l O' n- S( U; |- H* a! G
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
X9 K* y& y8 ~8 n( [) o$ Ddo( f. d5 s* b- b! Z" _5 |( r
Lan := rootfolder.Internal.Tools.AOLlanguage;# j; M" h/ i1 n$ H Z5 g
if current = @.Destination -- else return
4 r9 O" S# x6 o then+ W% L8 w6 l4 t8 k) ~; M" Q
@.Destination := void;" S1 j% w& ] U* ~7 V9 g
if @.occupied then2 O: |7 K5 F6 [# \4 _
part := @.cont;
0 t4 I; D. A% K! C4 O$ K @.transpOrder := void;% X% o$ M/ X+ z1 ?8 \0 R* i
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ z" w$ ]; v! m8 C9 M& k! K @,root.eventcontroller.simTime);
7 w% ?+ }6 R0 I, B) O+ C' H6 J @.HasOrder := false; u. z- A1 C# L, m o& x8 Q
@.DrivingHome := true;
* [% W$ J' j" A3 p" z; T% o4 n rgManager.tryToStartTransOrder;: J( c, K' ]+ T( l6 I& g0 \
if @.Destination = void) M$ ~' V0 t$ j+ f* E" D
then -- no transport order for vehicle @
- m$ d0 G1 |" S/ ] @.Destination :=0 h- x- c8 `4 g+ a+ m2 ^" p
rgManager.nearestFreeStation(@,track.~);
( y* Y! `8 M# f8 f6 X newDirection(@); 9 A% k. y# _; H# F$ V+ U
if @.Destination /= void then
" e4 Q, M8 b# v2 v6 ? @.Destination.NumReservation :=
3 x: T5 a9 i$ }! c/ S% ^ @.Destination.NumReservation + 1;
: k1 g, b5 B) T. a0 w1 k end;2 q; \9 I5 q" t. [6 t0 b
@.CurrIcon := "drivingHome";1 k6 D; K. v0 ~
@.DrivingHome := true;
3 A$ V+ Y* x m0 ]1 m end;
: o" h* G u- [! x0 I, \% s+ w) c9 V else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 |' j E6 Y: [" _8 [
part := @.transpOrder;: `4 Z2 u) _" F
part.move(@);-- load part% i" n% |( {1 }
@.CurrIcon := "load";9 @$ C" y( R$ _3 p
GlobalDistObj := part.globDestination;4 w/ b, M8 k( D" b
assignLObj := rgmanager.rgAssignL;' J1 B5 c& z/ }* j$ K( \2 T3 D
row := assignLObj.getRowNo(GlobalDistObj);
" y( i$ X0 B& E if Row = -1 then -- since 70
p8 D4 z2 \1 [6 h7 @ if lan=1 then# u# D/ i- C7 }7 ^6 N
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),5 C4 v3 l+ e% n. N1 u
to_str("in der Andockstation: \"",?.~.name,"\"")); B& l' W$ K+ q/ e/ _
else
7 D. j1 \* n" d promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),$ Z( O2 x& ~9 ~
to_str("in docking station: \"",?.~.name,"\"")); 8 w& L9 N% Q$ a
end;
3 ~9 m0 R" a2 \, _) G1 `: o else
2 w- @5 m0 z0 e4 ^ @.Destination := assignLObj[1,row];
* h5 V0 m x [ r end;
, y% m$ I: c0 R0 C newDirection(@);
! W: Y( { {) G% t @.HasOrder := true; W2 G: Q8 G( ^: f$ T
end;; R" z" \+ B7 _0 q9 z/ @' L
end;
' a# Q5 M# p) A" K2 p! Pend; -- of the method+ W' f; \ V1 d+ _0 V" A# v% u. A
|