/* called by: entrance ctrl of the object 'track'; @' r0 z5 m1 D3 p
*/
+ T( s3 }0 x8 vis1 f( d0 s% I1 @6 k& `0 V; u$ l
part, GlobalDistObj, assignLObj:object;row,Lan:integer;* F. k) R( y5 l$ q% p/ U
do7 p0 }' E7 r7 P ^0 \2 d4 D ~4 A
Lan := rootfolder.Internal.Tools.AOLlanguage;7 T6 ^4 l- V% M" F5 s
if current = @.Destination -- else return
4 @& _( @. h+ U# ?7 X4 @ then
' G0 w2 b" V% P) d$ G- o1 q @.Destination := void;
0 @2 _! M1 e- G" g4 L6 T. {. Q9 a if @.occupied then
q& X8 }, P0 d ~0 `- X M5 B part := @.cont;
1 c/ i ^8 n( ?. y F @.transpOrder := void;
3 n7 q, P5 c+ s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 k- k7 |# Z+ W& k% X' ?9 h @,root.eventcontroller.simTime);% I* L0 E* \) F, ?
@.HasOrder := false;
+ I3 V7 ^! U3 ] @.DrivingHome := true;2 O# F+ T6 {4 t6 U/ [' l) d
rgManager.tryToStartTransOrder;+ k6 `+ `4 s# t5 D& \
if @.Destination = void
% s! Q" n- Y! F then -- no transport order for vehicle @
' B2 d% N. R4 t$ Q$ A. ]; e @.Destination :=
* J; \1 D4 C$ f1 |- k rgManager.nearestFreeStation(@,track.~);
$ [4 F/ q9 }' o newDirection(@);
+ Z2 t6 ]7 K* B+ o) J" y+ s if @.Destination /= void then2 e+ [/ J+ o( Q3 B
@.Destination.NumReservation :=: v7 y. |6 J( f. a! C, k% W8 Q
@.Destination.NumReservation + 1;
6 W- N% e6 q/ b7 y6 `& M end;
1 P% @' i, R% c% t. y @.CurrIcon := "drivingHome";
! z% F/ h6 C& T y0 [) R @.DrivingHome := true;
- E5 I; k0 |( ~6 A a4 z# U; D1 ~ end;
6 U0 k) k2 _7 p; I9 U2 `: d else -- the vehicle @ is empty, both vehicle and part are in the same dock station$ R# X' S# Z/ U9 ~
part := @.transpOrder;
8 {+ _/ P( J5 J W- U& I part.move(@);-- load part
+ ~; G" _6 n# l* X' v7 G @.CurrIcon := "load";
0 S7 R2 K! O) s9 g GlobalDistObj := part.globDestination;
! Z- r7 ^7 f) |0 S, @% S$ @ assignLObj := rgmanager.rgAssignL;' G6 `: G, |: Z; s- Y
row := assignLObj.getRowNo(GlobalDistObj);' `5 p+ C' L+ Z, w* ]6 \+ x, ~, w
if Row = -1 then -- since 70
' e/ e% f/ m& e2 U if lan=1 then: s! i( w0 K) V' \5 B) W7 i
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: q6 x2 Y d& Z9 \5 ?: r7 ?8 L" G
to_str("in der Andockstation: \"",?.~.name,"\""));3 {9 W& S! ]$ s) X9 v. S
else
0 o; L; N4 e3 J3 I+ ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),1 H/ H6 O( s) Z- G# f
to_str("in docking station: \"",?.~.name,"\"")); : H7 T$ `5 E& E- l
end;9 b! X# L3 ~6 ?4 T4 K) d
else
& G, d; l6 Y/ {! R @.Destination := assignLObj[1,row]; Q; L# V y3 T; G' B
end; 9 y" Y/ {* s" P$ X) ^$ A, R
newDirection(@);
W# p, e2 E/ R4 ]/ s e0 { @.HasOrder := true;/ [9 ~4 F. T4 L* i: [2 p: ^
end;
; m% ]: F/ h9 u6 W end;8 h3 {! T5 O& \) o# w" E
end; -- of the method
: z( k2 ^* z, K, T/ D4 O; N |