/* called by: entrance ctrl of the object 'track'" F3 E# f& ~# ^6 w, P w% s
*/
0 F" X) d8 S* w% H" c' Pis7 H; V* k. n* B7 L
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
$ J& x$ b9 k# x4 _do
# L' X) l& t- [1 U- Q Lan := rootfolder.Internal.Tools.AOLlanguage;
: Q, Y8 I3 Z' w! F, r if current = @.Destination -- else return
: a. S+ B+ [8 e9 @9 m0 ?+ u, V# {0 f- U* e then
5 c! D4 q# Q+ H; y( E& x4 l5 B @.Destination := void;
; g1 B3 Q/ A) v+ Q- f4 P/ W0 ~ if @.occupied then1 Q" l' r* S$ `2 x6 v
part := @.cont;' p4 _+ v, k6 Q4 d2 t3 b, l
@.transpOrder := void;' b ]$ w' ?: U1 ] @& l7 G4 g) k
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) O0 R7 p* @ ?& p: R
@,root.eventcontroller.simTime);: m, N( h+ `, h) ^# l
@.HasOrder := false;
3 {: f% E$ k, a( Z @.DrivingHome := true;
+ r# Q2 Z- v8 s9 l$ W+ r1 |9 o rgManager.tryToStartTransOrder;2 K/ C4 H' Q2 w
if @.Destination = void9 t6 T. t) Z P4 y! X3 f5 J
then -- no transport order for vehicle @
3 Q0 G1 N7 b6 d2 h& c @.Destination :=5 K8 d& B3 V7 c% Y1 A# }
rgManager.nearestFreeStation(@,track.~);
: \0 q7 _7 K, h) O newDirection(@); J; F; z* H0 [- ?- @4 z
if @.Destination /= void then: L H6 S) _' {; y
@.Destination.NumReservation :=1 n0 n* Y, Z2 Q X; l9 D
@.Destination.NumReservation + 1;
( H0 B8 f9 l+ q8 v end;5 @: D- A! Z) K8 x) S& Z7 L
@.CurrIcon := "drivingHome";5 w3 z$ v$ V5 @: ?0 i/ }
@.DrivingHome := true;/ I# J Q* V) k$ Z
end;( a; u7 s9 M) V) v7 I
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 d7 f6 \, J1 |9 M* z6 j* J) K8 b part := @.transpOrder;9 ~$ Z* u9 t) |3 q5 l
part.move(@);-- load part
/ p/ t& D. r1 [4 z" k @.CurrIcon := "load";
; W$ R, X' ^2 ?5 g GlobalDistObj := part.globDestination;2 e8 @ h# B6 Q4 L
assignLObj := rgmanager.rgAssignL;
( p& _9 H1 }" ?& f4 ?9 f row := assignLObj.getRowNo(GlobalDistObj);* Z# E9 @ K! ^' A) k! V
if Row = -1 then -- since 706 k- _* u3 A% m1 ?/ F% I2 c
if lan=1 then
: j: x) L6 k4 K, ]( i) A promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),9 x Y$ R7 O: s; g/ U6 C
to_str("in der Andockstation: \"",?.~.name,"\""));
4 q# b( e! ]% C: M; U else0 E4 l, P5 m. d4 \
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' l- p5 l" ]: }1 n
to_str("in docking station: \"",?.~.name,"\""));
* ?/ I# G( S5 b2 s+ Q1 M6 e% T' f9 t end;2 e3 T l( \+ x% |( E
else+ |/ a) o4 ~3 H# g/ s
@.Destination := assignLObj[1,row];
9 q! r% ^. i) x& P; U# F end;
5 O! V) G# O* W# j! V newDirection(@);
& l$ [( G" _$ A& Y/ n @.HasOrder := true;
3 t& v& [& d0 F T; w end;
) \ H& B' \( K$ L end;
8 V$ ^: K9 T$ }) M" x* L7 Gend; -- of the method
/ U X& F) T. P! z7 x$ L5 i/ ] |