/* called by: entrance ctrl of the object 'track'
' G, |: a4 v ~6 c8 o0 \5 c*/
8 V4 n6 H) \6 Z/ V+ |$ R. v) lis
4 N1 ?' `* T- R3 v+ K( f: f2 a part, GlobalDistObj, assignLObj:object;row,Lan:integer;" Q6 C& v1 n; _* Q* |% T
do
7 ]3 U& v/ G9 K, N9 a( x9 G Lan := rootfolder.Internal.Tools.AOLlanguage;% u: a* _# [. u: V( I$ J `
if current = @.Destination -- else return
' n' {8 w* R& Z) ^: `5 M% T2 j then
4 B, n0 H/ q7 j) U# x" r! h3 U& ~7 P @.Destination := void;: h( v+ b- G! Z( ~9 q3 `' b. ~
if @.occupied then) i T, z, c# `2 G8 s
part := @.cont;
/ W( a1 X" j1 @8 e/ W; x* m @.transpOrder := void;
& E3 ?/ s/ X- M) [& N part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
* e* T) l3 O8 E3 D1 U' s5 _+ | @,root.eventcontroller.simTime);
" \5 p. {7 P# E/ o( Z9 q @.HasOrder := false;
8 Z* `7 n) W) w2 ]* a @.DrivingHome := true;( T _, [3 z( _
rgManager.tryToStartTransOrder;
; ]+ I& ]# N: ?; o: M& V if @.Destination = void& \/ K0 V2 }5 i1 m% _
then -- no transport order for vehicle @3 a- T" i7 N1 K6 Y! }
@.Destination :=
& Q, R, Q! Y$ H- [+ j rgManager.nearestFreeStation(@,track.~);+ C* p, l/ B" N* L' z0 W' I, {
newDirection(@); % w5 v6 ]6 M3 V4 c" K% D
if @.Destination /= void then& j2 D: o6 ]2 ?; G3 p) L* U; P: W; y
@.Destination.NumReservation :=
; X. I- l" m! @ @.Destination.NumReservation + 1;
) [: _" O) p7 `; R$ u5 ?( L2 x end;
& c/ Y; V" {9 x0 N8 \8 Z8 K @.CurrIcon := "drivingHome";. I$ [: j5 x3 R" X8 n) p& j0 F! L" r
@.DrivingHome := true;- ~9 `" s4 z V& d g( E
end;6 q6 Q2 j0 U6 L3 C7 a
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. a# A5 G% P* w' O9 ^. e# ] part := @.transpOrder;
# [; k5 @4 _4 t* ?4 ` part.move(@);-- load part
( j0 I0 c! I$ ? @.CurrIcon := "load";0 c; S* v" c! E6 w& E
GlobalDistObj := part.globDestination;; E8 Z8 v% x, [0 M2 R5 ]9 n! v
assignLObj := rgmanager.rgAssignL;
: W2 ?' p7 A) ]( b6 Q. ` row := assignLObj.getRowNo(GlobalDistObj);. T- [1 M- u! ?2 r @& h2 E O, k
if Row = -1 then -- since 70
7 [& x9 M M3 w" Q/ N# ?! t M if lan=1 then9 P( d: }$ _2 m$ q
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
6 e. r2 j# C3 N& P! @6 M0 U- f to_str("in der Andockstation: \"",?.~.name,"\""));: {/ J3 Q+ v! M4 m3 ]- q. n1 h) ]
else
# i- v; P8 t; L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),4 i* N4 z% u$ u0 Q4 m
to_str("in docking station: \"",?.~.name,"\"")); % Y0 V, m1 v9 r2 A
end;1 q2 d# w! e9 q6 o4 x" ?) ~5 ^
else+ R0 U9 i1 d7 L6 f$ _
@.Destination := assignLObj[1,row];
$ |& @4 T/ n a( R; B! Q' { end; ( R5 j7 c2 n, W; s+ T3 d! a
newDirection(@);
1 |" {* T) G9 P) @ @.HasOrder := true;4 a5 u- x9 {1 m. {% k! I* j
end;6 x0 G+ Q+ V* I% ~9 i" D/ t2 \4 I
end;
4 v# u+ i7 o+ N; d6 Vend; -- of the method
. [+ } w+ M! t* h8 z8 N |