/* called by: entrance ctrl of the object 'track'" V6 E- l/ Z. D: E$ @& H% T
*/8 h _. t* ]2 D$ X$ O
is" ?. `8 l: ?- j Y4 P2 ?
part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 K- C% ~ _" A# N' i9 F
do" e! ]: J6 {% Z: N( l! P0 R# t
Lan := rootfolder.Internal.Tools.AOLlanguage;( }5 g) `% [' q8 I3 ?
if current = @.Destination -- else return
' h6 r; ^9 f1 ?. q$ a) i then
+ m, K) n$ p0 K/ V7 g2 @5 O9 s( b; U8 g @.Destination := void;
' u. j! E; d2 h0 U4 D if @.occupied then
) C+ ~# ~+ K& u6 l part := @.cont;
/ _. d+ E0 L1 ]0 b) n* l3 ? @.transpOrder := void;
( Q4 O" h1 u+ D$ W; A' O3 s part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,, Q H' _+ m/ u4 g* {# l9 U
@,root.eventcontroller.simTime);
4 v) F. O* q( A/ l @.HasOrder := false;
4 K3 x3 Y- R3 e5 A7 E7 [2 b @.DrivingHome := true; ~4 ?- q& s8 s, o" \8 h
rgManager.tryToStartTransOrder;
) s+ M" d# |. [+ M' @( n% ^ if @.Destination = void. ~' n# W! b- q& H6 U
then -- no transport order for vehicle @
5 U; ? ~( r( `; E1 ?6 \ @.Destination :=
/ `0 q- j" b9 l8 ]" N rgManager.nearestFreeStation(@,track.~);
! \( d5 R$ ]% ? newDirection(@);
' ^- R$ m' Q3 p7 q4 w if @.Destination /= void then
! m* a3 k% ^' I" u3 l( G @.Destination.NumReservation :=- Y- ?- B. V+ A: M
@.Destination.NumReservation + 1;+ q& J4 ~( [7 U7 V3 y7 \
end;
8 l1 s( p" b7 \3 i$ b4 t2 S/ G @.CurrIcon := "drivingHome";% k& @" D, |1 a H; \
@.DrivingHome := true;& d/ O. q5 L; A6 d" \
end;
" `: o: x, E3 ^/ t# u+ v% {; s else -- the vehicle @ is empty, both vehicle and part are in the same dock station2 v+ S7 q) N/ N; c" ?9 c" E+ n( X0 e; R
part := @.transpOrder;
! g! q% q, x" O( b& R+ _* n, b. y part.move(@);-- load part
]* y0 N9 w; V" q1 G @.CurrIcon := "load";. [8 l% ]/ z# h- v4 }
GlobalDistObj := part.globDestination;" p. d6 W# m2 j! P' s
assignLObj := rgmanager.rgAssignL;
* X4 g( v3 R1 S g9 X( h; y row := assignLObj.getRowNo(GlobalDistObj);8 x$ G- z1 v* C- @: D
if Row = -1 then -- since 70
1 u% V* A/ V4 a" b" L- C/ S* ? if lan=1 then- d" S1 _- _) ]! C7 J1 `- n5 \
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 n: o) c; i, V c2 `9 b
to_str("in der Andockstation: \"",?.~.name,"\""));# B& R( f( g6 [2 E3 y
else4 ?& n- O* v3 f. V# P. R! G
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' E6 V; ~ \1 d( c to_str("in docking station: \"",?.~.name,"\""));
1 l. a5 e" k8 b2 \) V end;, u. N* O. V1 Z
else' @7 O; i1 y, w
@.Destination := assignLObj[1,row];1 G H' r5 t( }0 V+ d% ^* l
end;
* e4 s5 L3 Y2 Q; M4 b; J2 K newDirection(@);3 k/ W* I8 f; R; p, g
@.HasOrder := true;
7 R: x( U1 c' @3 h8 N end;
9 G f. l% T+ I# {1 k3 i end;
. `: l6 O" r8 Y9 qend; -- of the method4 l0 Q9 C7 Z7 b
|