/* called by: entrance ctrl of the object 'track'. } a$ _- y- l' u7 }
*/
( k$ [: U9 c' eis
; J; F! N/ C( Q; u6 n' Y part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- W3 e, k# p) E3 N# a8 ^; g" v' s: mdo
! V9 s0 t) q6 b7 ]% K2 |. T Lan := rootfolder.Internal.Tools.AOLlanguage;, e! s. ^! `5 A* h7 u) s# d6 L
if current = @.Destination -- else return
. A$ Y; N7 I8 I/ ?9 x- s& m then
) g8 y3 U9 ?8 ?+ @ @.Destination := void;
$ @) M- X, |/ I% ?6 p7 z& g if @.occupied then
6 N& P: e. o: O+ d part := @.cont;
) a9 U2 f; t m# H5 }( Q0 _/ A" _' g @.transpOrder := void;$ i0 P' i; U K
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 i) O5 @( D, M; J k6 S
@,root.eventcontroller.simTime);
; O! |: k/ } g+ g, Q' j @.HasOrder := false;
. I' Q- m" \! U' A1 D+ j7 U$ b @.DrivingHome := true;# L2 a4 I2 A. J6 p9 u
rgManager.tryToStartTransOrder;, M4 ~+ j% s5 ?. P/ [" t
if @.Destination = void
1 Q2 I- d+ d: e. B) I% G( C; c then -- no transport order for vehicle @
, G2 j4 J% ?) X/ \9 U8 `- ? @.Destination :=
* K7 U- u; g/ }, x rgManager.nearestFreeStation(@,track.~);
; U4 Z+ \% i7 l* K( ]: \' q newDirection(@); " [( j4 i4 n4 h, {7 w% r2 s+ v
if @.Destination /= void then
% C1 @6 X# \% h6 x @.Destination.NumReservation :=
, @ F* v" k! @* m7 ^) K @.Destination.NumReservation + 1;
4 |; ]0 i' U Y3 [% J3 [1 y end;
2 a! m T2 j9 h4 O8 v8 ^' y/ w @.CurrIcon := "drivingHome";7 R; k W: x- i, [
@.DrivingHome := true;
" e7 D6 y/ g2 t/ ]4 F end;1 h5 ^& ^, D2 N/ i# b7 b" P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station' b; ~) L1 Y8 V0 v
part := @.transpOrder;
8 | R6 |0 `! E8 U; S part.move(@);-- load part, A$ q3 m0 h& J! r- }
@.CurrIcon := "load";& l$ ]! P8 W/ @; N
GlobalDistObj := part.globDestination;- i R0 ]" e$ J! ]9 S4 o
assignLObj := rgmanager.rgAssignL;/ O' y# x" o8 w
row := assignLObj.getRowNo(GlobalDistObj);
4 `* G( a: `- T. V3 ? if Row = -1 then -- since 702 V& t% y, B8 @4 {# I! H
if lan=1 then
2 `$ N) J+ |, H/ ]+ P5 l1 r. f1 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
; P$ v$ t( j1 U/ g$ `6 ]9 z& j" {1 E to_str("in der Andockstation: \"",?.~.name,"\""));
, P9 B9 c: S: Z: Y G/ V3 S& W else
* X* G; l4 m) D4 ^& }! E promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
" Q8 r6 w1 d' O+ e+ s. I% z to_str("in docking station: \"",?.~.name,"\"")); + X( Z: g( D' Y2 a/ f
end;- i" m6 K; a" ?4 t
else
7 i5 _ z* V! K$ C- U6 M @.Destination := assignLObj[1,row];
" m" X! S0 H! {9 S" g+ I7 e end; 0 ]/ H' P, A( D) M( w
newDirection(@);. k; D$ X8 L' }4 z8 ^6 g
@.HasOrder := true;
+ S$ H" v0 ~8 p; g% Z end;7 x4 [. M; o4 I" V- ]6 L9 p5 A% ]
end;
6 T* h5 w, o$ ?4 g( Y. `0 _7 Lend; -- of the method
6 _ R. {2 K+ Y; w% R( P( n* @; L. o" V |