/* called by: entrance ctrl of the object 'track'4 R/ h' x" ?0 O! q$ K
*/4 e2 R c8 h" ~6 Y, r" d0 O
is
9 T. l6 r) W8 H- A part, GlobalDistObj, assignLObj:object;row,Lan:integer;) a- E$ N6 Z+ l& x( A
do
2 ~/ T! R( F/ @ Lan := rootfolder.Internal.Tools.AOLlanguage;
& | C+ D* }- o6 | if current = @.Destination -- else return
' O/ S+ N- f9 I/ {; T then% F+ \, ~0 F2 m5 E! {
@.Destination := void;. G$ G. _7 t9 U6 M. w1 a
if @.occupied then
4 S' V7 W& R0 i2 |; f, X$ M part := @.cont;% S" h5 D- K* m( ~: ^
@.transpOrder := void;
' t' ] S5 ^' a7 o0 Z4 T( J part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: x/ \; g0 |3 M, N ?. g+ C( T @,root.eventcontroller.simTime);5 Z3 H; K* U1 f' y/ G( k( R6 o
@.HasOrder := false;
+ r4 s) w6 F) ^8 P" ? @.DrivingHome := true;" t4 W$ r" n7 N" o% @9 @$ k; w8 b
rgManager.tryToStartTransOrder;
. l1 p. V- c3 g' V- j! W if @.Destination = void
4 F0 ?% K$ n& Y* F7 O% g8 g6 w: z then -- no transport order for vehicle @
2 U$ g1 Z/ a- }- _: O0 x @.Destination :=3 N0 B$ L4 I) Z; X* j1 v/ G" G
rgManager.nearestFreeStation(@,track.~);: p$ N( T7 L% p' }% T* |
newDirection(@);
7 H* X6 {- Q3 J# d7 H if @.Destination /= void then) V& @+ ^: x& x. @( l5 K
@.Destination.NumReservation :=4 Y5 H4 }) d4 b- t7 X- {# ~
@.Destination.NumReservation + 1;
4 I9 Y3 ^7 F# j6 j& p. n( X( ?; u end;! O$ \$ C( S0 o! W7 T
@.CurrIcon := "drivingHome";; E/ N% H% o* E( M$ V
@.DrivingHome := true;" ~5 G' ]8 P1 L1 V) b
end;
7 \, K8 ^/ L# g7 K# a Y else -- the vehicle @ is empty, both vehicle and part are in the same dock station% c3 K" M K: v2 t
part := @.transpOrder;5 Y& X0 ~- V* w& I% K6 r7 {
part.move(@);-- load part
5 h) @. m) [! C4 ^/ ~: \) ` @.CurrIcon := "load";
7 S }& Z" P5 p5 f; [/ `, w0 h GlobalDistObj := part.globDestination;
3 ?7 X- D- Y$ ]8 k$ Q3 @- w/ ~* H5 ? assignLObj := rgmanager.rgAssignL;7 i/ t5 s+ O: \7 d; q+ o
row := assignLObj.getRowNo(GlobalDistObj);
) t# I8 ]: a. Q if Row = -1 then -- since 70
2 p: F' ?& C% Q if lan=1 then+ B- @* `* ]& F, g
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 Y$ j$ ~ N) v4 h1 m9 ]/ M
to_str("in der Andockstation: \"",?.~.name,"\""));1 w5 f8 N |' Y% }$ R
else
% B) s4 ` i, W+ z; a1 n promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
# L) j' m7 h" I$ g( v" T- l& W to_str("in docking station: \"",?.~.name,"\"")); ! z ]3 T' Z' T" q
end;
$ \4 I1 G+ p' ~7 A else
* X4 N; o; K) o9 w7 L7 ?/ [% h @.Destination := assignLObj[1,row];
7 c/ | |- k, g7 P& b3 \& A end; " b/ I' W7 H8 w% [4 S* j# U
newDirection(@);$ {2 ?3 o6 t/ v5 I% R( [+ T2 O
@.HasOrder := true;- ?# I- M2 ?1 M# d" M
end;& L2 @! J4 _, k& l- i
end;3 y- P( P: C: ?2 }/ L
end; -- of the method
* c3 a) j" P/ O+ D0 V2 y* ^ |