/* called by: entrance ctrl of the object 'track'
, U' f6 N" S) \" ^) \*/
7 W( K/ L. M% z8 ~6 |2 ^is
6 k {/ [% [6 |! ]! L part, GlobalDistObj, assignLObj:object;row,Lan:integer; V2 I' d) u7 e, W- a+ B' i1 j: F* R
do
# W) h" r( Q V9 i, G, _/ J9 |- b" Z Lan := rootfolder.Internal.Tools.AOLlanguage;
( `! a2 P3 V" U6 R- Y5 N) r# c if current = @.Destination -- else return
7 E/ w" Q' `, ^ y then0 P4 i/ `1 h" b- S
@.Destination := void;
* P6 g, Y! c7 O1 W) i5 d ^ R" `3 y! r if @.occupied then
w# ~' C9 Q2 c; i part := @.cont;
7 b6 c. i6 s P9 w @.transpOrder := void;5 k% Y; m; z4 K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
& U1 h' n, ]( F, m2 f @,root.eventcontroller.simTime);# C/ T5 P) f* L; S- v, [
@.HasOrder := false;1 Z2 B) _3 j( N9 ~- g' {
@.DrivingHome := true;
$ e# G* `) P8 P5 G$ ? F rgManager.tryToStartTransOrder;
7 E. d' D# k2 Q/ a if @.Destination = void" k$ P: E$ K+ |0 S
then -- no transport order for vehicle @0 K- U! A+ Y* B. O, T/ @! K
@.Destination :=
1 e5 t5 j! F. W! R0 t& I rgManager.nearestFreeStation(@,track.~);, z: C% n' H% L% J6 [( C+ [8 I7 \ d
newDirection(@);
( Y% U8 w5 P# n+ x' v% i if @.Destination /= void then' z2 U0 t) \: W% B2 L
@.Destination.NumReservation :=% H" h3 C9 M/ U& x1 N
@.Destination.NumReservation + 1; |4 D, Z/ N# C# \* X
end;
% l( x3 n7 y# r @.CurrIcon := "drivingHome";
6 ~. d/ \) o, d" p: L; ` @.DrivingHome := true;; O0 \, _$ Q+ o q \
end;
2 S. C3 p8 {( f F9 d* L$ V0 H0 B8 d else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 }. L, H- R5 T! c! M. g part := @.transpOrder;# h" T: G$ ]. q4 t" v
part.move(@);-- load part/ H0 q, z) ^4 ]/ D" K
@.CurrIcon := "load";% A! B3 Z3 L) n& |# }5 Y$ G: E
GlobalDistObj := part.globDestination;3 \0 J3 l0 T7 c* y
assignLObj := rgmanager.rgAssignL;* c: Z9 H; M# F5 \) V
row := assignLObj.getRowNo(GlobalDistObj);
' c* [1 W/ j7 |! P& ^ if Row = -1 then -- since 70
) C3 j: h* f7 k% ~. y if lan=1 then
# J3 F& s! `( O9 Q* f promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),+ Z+ x7 C9 i% n4 f) I
to_str("in der Andockstation: \"",?.~.name,"\""));
" B1 F1 s) e1 B& n N0 l. |; `- A else6 _: |& b8 Y/ d7 T2 B& z* x
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),! p2 h& L+ `3 Y7 A( I
to_str("in docking station: \"",?.~.name,"\""));
& y( [0 }: j3 q end;
! g& K7 ]3 p( \9 j else
$ {. c$ n3 S; `/ w. u# [ @.Destination := assignLObj[1,row];" w5 _* i5 V4 H% Q
end;
# w c% z7 s$ b8 w6 h) [ Z, S! j newDirection(@);
! G; e. A" U3 U d @.HasOrder := true;: g" _$ d# M# I+ X8 S
end;
3 v+ Z& M; e9 Z& B6 ~+ p$ H8 f end;2 Z. K' e x4 ` o4 i2 P7 g8 y+ h
end; -- of the method+ d, ^: M% u/ w2 @- h$ {
|