/* called by: entrance ctrl of the object 'track': G1 r; }. \; ^3 E- z, n
*/
! t0 @* u+ v/ I6 F' J; t3 xis8 E8 b& v" i, L7 g& A6 E
part, GlobalDistObj, assignLObj:object;row,Lan:integer;% z) {5 L1 A' f6 G: ^3 F
do
% _1 f4 [0 i a' S) f+ @ Lan := rootfolder.Internal.Tools.AOLlanguage;: W2 u/ g4 x6 }3 f$ D1 y3 k) e% Q+ u
if current = @.Destination -- else return
, Y" M! E4 i5 |# x* M% Y then
) @. L6 D! k5 |& |( x @.Destination := void;& V" u: w/ q* r; ~0 \+ `" ] T! ~% n
if @.occupied then: H$ w% Q, e* M# H: O
part := @.cont;
3 U i, P6 x4 ^- g, V, X7 E/ p @.transpOrder := void;
3 m( H! u! k- _$ y0 I4 m- Z- o" Q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
! U* q5 u- x0 @, U" A2 R$ ] @,root.eventcontroller.simTime); h8 V9 O8 B. n" A |# w
@.HasOrder := false;; e- H1 `% w: c, Z5 f! A R
@.DrivingHome := true;
- u% X) {8 [- d$ Q6 k* i! h- [ rgManager.tryToStartTransOrder;
% @- H9 G& ?6 U5 ?: S if @.Destination = void
! P! K1 Z6 |/ }2 ]0 ]* M) g/ S then -- no transport order for vehicle @
5 g% o1 R: a' Y6 m @.Destination :=5 }7 B7 D- H; _% H3 k m! f& C& M+ L
rgManager.nearestFreeStation(@,track.~);8 y r6 s( _7 C$ c+ v" k
newDirection(@); 5 a3 U& W& \8 W0 E$ O/ q' p- y
if @.Destination /= void then( t A$ a( }& O( _
@.Destination.NumReservation :=
5 @5 h$ D' p" H: ?& M9 [& C+ ?- S @.Destination.NumReservation + 1;. S1 @- ~' B5 ]* B
end;) V$ t& o* [5 i; p6 R
@.CurrIcon := "drivingHome";! g4 j) a5 Y2 w7 G- [, ~# o
@.DrivingHome := true;
$ v$ D6 Z& p9 v9 n4 a' ~! w end;
' {9 K- | [ A% X else -- the vehicle @ is empty, both vehicle and part are in the same dock station
/ ^- \- t2 Q/ A b9 \ part := @.transpOrder;
) L5 B2 n2 B; S: H" C! w; ^6 h part.move(@);-- load part
3 f+ j% {) A: u+ O1 M2 z' } @.CurrIcon := "load";
6 O Z' i# ?+ Q4 E GlobalDistObj := part.globDestination;
" r$ G" s. j- J, b6 G assignLObj := rgmanager.rgAssignL;
a+ G* m" G" c3 [; E row := assignLObj.getRowNo(GlobalDistObj);# }2 s) r# u$ y1 R' o! h1 _. l
if Row = -1 then -- since 70& c) K# i/ N8 c/ ^) \' F
if lan=1 then6 [' } V6 u8 s( [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),! B1 |! `' D( }$ H; E/ E
to_str("in der Andockstation: \"",?.~.name,"\""));4 j, u- H- I1 y5 n3 X5 ^3 b
else1 f% j$ V1 |$ h. J
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. k8 V; p: B' Y7 ^5 I
to_str("in docking station: \"",?.~.name,"\"")); ' r" E D+ \+ U
end;
7 }3 ]* i; R' ~2 l. ` else1 J/ X0 c& [; `4 h6 Y
@.Destination := assignLObj[1,row]; x0 {( x. D* T& p3 \ `' v
end;
$ o& S& B* \4 K. m newDirection(@);- v# r! l9 H% V* p3 O- r
@.HasOrder := true;
# J! [1 G/ `. R2 Q! i end;7 |* [/ ^2 p8 s2 p
end;' P# R( I/ O% C) p& {
end; -- of the method
1 M+ d7 s, A3 C! G" u, n |