/* called by: entrance ctrl of the object 'track'8 p; m% t8 v F: z6 E& [
*/% s$ x' [& F/ b+ H( x* j: w2 `4 x6 j
is% |8 s+ w4 n1 i/ |
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
" u U2 ?5 G6 ?1 U1 q5 Z% ddo0 V3 |5 K9 U2 V: H
Lan := rootfolder.Internal.Tools.AOLlanguage;" ~' W1 i7 |! W9 p6 g
if current = @.Destination -- else return! @- ~3 y6 _% }5 v& Q* P% s' ^
then
5 |: J4 G# @8 p: C$ O8 f @.Destination := void;! _- c! Q1 p- b
if @.occupied then- ^' \. j) N( b6 I! ]
part := @.cont;
" A& M- L7 q R8 y/ ]! ? @.transpOrder := void;
) q3 ]. U* F$ I' [6 x! Y part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
( C; N- u# b5 t( [- V' G& g @,root.eventcontroller.simTime);
3 p! ~0 e4 K' m# w @.HasOrder := false;) R4 ?5 t+ L5 ^; d
@.DrivingHome := true;3 ~' y$ t5 [# x7 |+ Z4 k
rgManager.tryToStartTransOrder;' P8 Q- M# G* j0 s. x9 \- `
if @.Destination = void
# [2 Z% Q* K$ B% V3 ?+ @, n( u then -- no transport order for vehicle @, D3 A( ~1 s( p+ b
@.Destination :=; I( a9 I& Y; g
rgManager.nearestFreeStation(@,track.~);
, s* `5 g; \0 \$ }" s newDirection(@);
X, _! G& z5 b; a& \0 S! m+ F if @.Destination /= void then
+ ~) n, f% w T; K! p @.Destination.NumReservation :=1 b4 P* }7 V2 ]& S: M
@.Destination.NumReservation + 1;; I) [- \+ B, n- B' k6 |, S
end;
- J1 g: A, S2 O' T, s, r" }3 r2 ]6 L @.CurrIcon := "drivingHome";; d$ v$ ?1 W P: }2 H6 Y
@.DrivingHome := true;
) |0 Z9 Y; Z$ A7 ` end;$ k! M7 h) z6 d m* H
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ ?* A# \0 f5 _4 `4 R part := @.transpOrder;
$ i( }% j" ?- ?# U& N: t% v/ i& N part.move(@);-- load part5 J) x8 V5 L0 F8 `* M: \6 N
@.CurrIcon := "load";
4 B: w# \6 P# y3 E+ ~1 h X1 f x: g GlobalDistObj := part.globDestination;
( _. G- ]& a* |! s) s assignLObj := rgmanager.rgAssignL;
/ }7 u7 R% {; x8 T( ^7 c' K" }; a0 T row := assignLObj.getRowNo(GlobalDistObj);
1 J8 }$ m) a) A. J3 Q( P if Row = -1 then -- since 708 @! Y+ x' I3 E+ h7 d* |/ p" u
if lan=1 then
; O4 _! U9 o K# O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),( e- [7 H/ H6 s9 s
to_str("in der Andockstation: \"",?.~.name,"\""));
8 _$ p0 S. Q1 i7 O* |* L7 J | else
, Z( R# P: d5 r) ] promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),7 E' K- O* B0 N }( I
to_str("in docking station: \"",?.~.name,"\""));
! d; D) q9 o1 N& n& c1 Q3 h& ? end;
6 Q1 g; i- r, ~ else- R' j0 { @( J, |
@.Destination := assignLObj[1,row];3 L+ t+ H) L; V- C4 N1 Y! \
end; ) \& R: Q7 F% g+ p$ f1 c( M/ A
newDirection(@);
) t) k: G! W6 G. l @.HasOrder := true;$ a0 r7 I1 x8 ] N: }
end;
* s% b' q1 \$ H( O% Y+ ~# p* a end;- N, c4 \. N6 o0 C$ T
end; -- of the method
E. _0 S( t$ ^2 | |