/* called by: entrance ctrl of the object 'track'' K5 N& j& A" Q, k9 P; k
*/ P- | |: _- \
is
% U9 I4 a/ G D1 W$ `& S part, GlobalDistObj, assignLObj:object;row,Lan:integer;6 u; l$ ?2 F, p% b' u
do! a! \5 D9 X8 a/ {8 R: N1 k8 x
Lan := rootfolder.Internal.Tools.AOLlanguage;
) R( C6 r' B& Y. b if current = @.Destination -- else return. K0 R/ M5 `, {! M) D3 L
then6 e$ p9 y( Z5 p" o' B
@.Destination := void;
6 M( U7 ?" u1 V if @.occupied then% c5 f y/ ]- r* d4 B
part := @.cont;
9 f/ w% ?7 ]5 b1 V! w4 s @.transpOrder := void;1 ~: f$ `& |+ M! N6 d
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ t2 ~1 a$ a3 O" \& e3 U
@,root.eventcontroller.simTime);* R5 h6 C; u: U( q* i# C" J: S
@.HasOrder := false;
& C9 Z9 |9 C5 d9 w& h# a3 \$ \. } @.DrivingHome := true;% X$ v- W& `. p+ Y! e9 Y, F ]
rgManager.tryToStartTransOrder;
' A2 x; T! d* p# P+ H+ P if @.Destination = void. S& A7 K" D# Y q4 k. y/ \0 H: E5 g
then -- no transport order for vehicle @
( Q; z: R6 a2 h! G) }& t @.Destination :=
& i/ \* h. R2 j( k6 r: d4 ?8 {" z rgManager.nearestFreeStation(@,track.~);
# l1 [3 s1 i( ] `) Y4 c newDirection(@); 5 r$ g* f ?- S+ M
if @.Destination /= void then
8 n2 u' [: P4 I) l7 ]9 t9 ^ @.Destination.NumReservation :=8 w* G# r( [' ]/ f t0 c
@.Destination.NumReservation + 1;
. l q* v; d5 @ end;. N9 n1 s, J9 j% W" n6 d
@.CurrIcon := "drivingHome";
2 w& D1 l- a* Q$ W5 ^3 X' S3 V @.DrivingHome := true;- N* i% s, w" A( ^; _
end;& U3 x) ? a. y) ]) {
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( x7 Q; u# z- t9 q! W9 z part := @.transpOrder;6 `5 w- Y( K: D' O
part.move(@);-- load part) M2 k" o' C( ?& y ?# z" D D) f
@.CurrIcon := "load";) r3 z3 U$ U4 D( |) a4 M* b, A$ v8 `/ E
GlobalDistObj := part.globDestination;
* k8 P0 L; c2 X4 {- U( p assignLObj := rgmanager.rgAssignL;
) R* s" R9 c3 r/ W0 E row := assignLObj.getRowNo(GlobalDistObj);
5 q q$ [+ H& Q" v7 S6 y) D2 o if Row = -1 then -- since 70" F+ a, o$ b: ^: ?; ^3 g1 e
if lan=1 then
3 q# }5 p3 o3 t3 u0 ] } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 C, A$ q5 S0 E$ ]7 {% @7 D$ e to_str("in der Andockstation: \"",?.~.name,"\""));
& v, G& \1 e- K6 Q8 F) a% a else2 x& {4 R) e, Y! R, b
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 b& _) J. j5 l6 H
to_str("in docking station: \"",?.~.name,"\""));
& i9 `( G* J) @& @( t( K8 b8 @ end;
; }% F; ?) J6 X: u1 V+ S else
/ M" l- f* Q- P: J) y @.Destination := assignLObj[1,row];4 d$ O4 o; }) M, \8 W* V
end; 8 l, C* T E: x% |4 J! ?( B6 y! B
newDirection(@);# Q6 d1 L Q1 o0 j" q. ?1 i
@.HasOrder := true;5 |& X' h5 L Z c/ M! a5 f, _
end;
! R4 n- o$ o; ~, a. `; A) H end;
1 @ w# w8 E1 Y3 v2 V1 Aend; -- of the method7 p, ]& s" g! w7 b7 X4 O
|