/* called by: entrance ctrl of the object 'track'9 Q* R8 m* P: @% d, k$ ? O
*/
# @; c/ P# o& m; f0 F2 Pis
! Y9 f; P$ T* k6 D part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( Q G: x1 R: O6 Q( H3 l& j0 Sdo
* Y5 U. F6 D2 U1 q Lan := rootfolder.Internal.Tools.AOLlanguage;" @' [3 R8 E" |2 e
if current = @.Destination -- else return. g; o) v$ @9 y1 M( U9 W
then k! N, k! M- m. S/ B0 i
@.Destination := void;
\; q" O. v7 X% z ^ Z9 Y if @.occupied then( J3 }0 r0 Z8 e
part := @.cont;! L. K% H! o+ \% N
@.transpOrder := void;5 k0 `! ~0 H9 z0 C* K2 v$ n4 n
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
$ x' j" {$ f# j% } V) B @,root.eventcontroller.simTime);: C2 ~" r. I8 b' z( }& z: M
@.HasOrder := false;* _+ h. x% y$ E: X" V6 D2 T
@.DrivingHome := true;
4 g8 [ c6 w) l5 G0 P/ Z rgManager.tryToStartTransOrder;" s; N: m6 G) H
if @.Destination = void0 {, j5 }7 X4 H* v' U$ ~& y1 v
then -- no transport order for vehicle @
3 y+ B1 y% U1 g$ J5 x" S% k @.Destination :=
$ z( O: P% F5 i! n rgManager.nearestFreeStation(@,track.~);& r- I! i w: |8 C( v) L
newDirection(@); 8 b0 I% i$ X9 T: E5 t6 u! V
if @.Destination /= void then
+ Y( c& T& F, t! R @.Destination.NumReservation :=8 ?1 f0 N1 T/ u. g4 B5 b! @1 g* V
@.Destination.NumReservation + 1;# _0 \0 ~- B, h7 e# j
end;
. _; y! K$ Z( y @.CurrIcon := "drivingHome";
8 H" ^' b: m+ y ]6 _. g% ^ @.DrivingHome := true;+ g# l0 H1 q6 N
end;
+ B8 S) u m5 M8 g2 r' v else -- the vehicle @ is empty, both vehicle and part are in the same dock station
+ E% V; |& c8 x: Q: E part := @.transpOrder;/ t O4 f( P5 \
part.move(@);-- load part/ p2 E% T5 p# n& `" {7 n1 S% |
@.CurrIcon := "load";
* a% T0 O8 `7 q' `/ o7 \ GlobalDistObj := part.globDestination;; v/ C u4 V I+ `
assignLObj := rgmanager.rgAssignL;" u' v( [# E1 B
row := assignLObj.getRowNo(GlobalDistObj);5 O' m1 |0 b e5 x" Z: s5 k! X
if Row = -1 then -- since 704 ~: l* z2 h u& f
if lan=1 then
! R: D& K4 w6 J9 P promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 H9 v: X( Z# ^6 W0 \/ d
to_str("in der Andockstation: \"",?.~.name,"\""));
9 L7 K7 Z1 I9 S8 @* V else
+ P# `7 s: m& c3 j E3 E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# t; ]0 Y" c- f6 n to_str("in docking station: \"",?.~.name,"\"")); ' W$ A% v& A% ]' i- S1 ~$ I- G/ a
end;
$ b0 Y6 m. f7 H _7 C* _ else
) q! q5 P9 u6 E0 Y, s" g @.Destination := assignLObj[1,row];% e# ?6 Y5 |- t& T1 Y
end;
' y. x1 i1 r* p2 X newDirection(@);
8 V' L' ]& [( \ q5 D0 F- R! } @.HasOrder := true;( @ d/ y- {. @% @+ Y8 f9 S8 f
end;) q* Z% o7 v- V$ a- c8 t; M! L6 r
end;! Z0 f3 ?2 I7 z5 Q: r' _
end; -- of the method
- w2 |' \( I8 h! j |