/* called by: entrance ctrl of the object 'track'
, B) o0 E4 z8 O. F) t' T/ E*/
' g4 x! U) U4 wis4 q4 O1 [2 _$ S' Z
part, GlobalDistObj, assignLObj:object;row,Lan:integer;) G3 ^# x0 }! Q
do" i" g$ l, {3 B
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 K+ i) z: ~5 g if current = @.Destination -- else return
T! Y9 Z& L( Q then
" l9 z) s9 @4 c" P5 Q @.Destination := void;
8 y/ `* k2 M2 d% n1 `& O k if @.occupied then
4 m2 u: W; P% W8 @ part := @.cont;
% b: L' y0 I) W6 u @.transpOrder := void;+ z' W: G$ v: C/ F% b" v! e V
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
5 F- e. ?4 A* t+ g+ e @,root.eventcontroller.simTime);8 [# H2 P* q- }3 h1 Q# b
@.HasOrder := false;. n( f( `* L" @1 V( ^
@.DrivingHome := true;, I1 _1 ?* \, E2 j3 U" \1 W% N
rgManager.tryToStartTransOrder; {+ x/ e4 A) _
if @.Destination = void. U8 A3 s& u( J$ ~& F9 u6 G N/ Q& ?
then -- no transport order for vehicle @
: v# q$ l3 l/ \9 W @.Destination :=. K; u& i+ x$ i+ U9 a
rgManager.nearestFreeStation(@,track.~);7 \1 Y' o" v: i% n; {
newDirection(@); 5 b. r+ o/ L2 `& i* J# @
if @.Destination /= void then/ o" D2 ], {; r( f
@.Destination.NumReservation :=, [0 `8 x$ A- B& r) g
@.Destination.NumReservation + 1;
) B p- r6 i+ ]& P$ _3 `/ M. ` end;& ]" a1 L7 d! ]8 H( |' k1 f
@.CurrIcon := "drivingHome";
) K6 u- U4 H2 T- }' N8 P( k @.DrivingHome := true;! P; e+ j C# {; i( |6 p
end;
1 g1 m& C- Q& t& j else -- the vehicle @ is empty, both vehicle and part are in the same dock station, o1 s! C- G. p+ e7 N3 r
part := @.transpOrder;0 ~$ I: p {; L) b- u0 L
part.move(@);-- load part
- p/ X+ ^1 B- e @.CurrIcon := "load";
' T6 _$ x1 E4 g( z8 L) O1 g$ B GlobalDistObj := part.globDestination;7 j$ T) j: \! {
assignLObj := rgmanager.rgAssignL;" S1 T- k$ J7 V% {1 W9 d
row := assignLObj.getRowNo(GlobalDistObj);9 i+ P7 a& t( J+ M
if Row = -1 then -- since 70
8 F, R) D, {. i2 Q; C: u) j6 d5 [ if lan=1 then) ~ J+ v1 `* N7 X
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""), R9 O1 K) m) [3 T3 J$ U
to_str("in der Andockstation: \"",?.~.name,"\""));' ^. I5 ?# ?& Z/ N: Q6 M2 c
else/ o% h6 P7 g& [5 h
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- I% K h4 ? n
to_str("in docking station: \"",?.~.name,"\""));
2 G# ~7 m% E, y, r" K end;
" B, P+ a( @. k9 v V else
+ D9 ~$ N/ P: N% ]" z @.Destination := assignLObj[1,row];) u* a: C1 P% j3 t2 k( z
end;
! E! z, F7 n% F7 f newDirection(@);, l: f% ]: u. ]: R0 R
@.HasOrder := true;
: w5 p3 ^" [' K/ q4 j end;
3 q8 c( b6 Q/ D% c8 Q0 i4 F( C end; Y, g* m2 O2 i) H# j
end; -- of the method
/ D+ i5 o/ }! [! V* ` _ |