/* called by: entrance ctrl of the object 'track'
6 A$ j; n( D- f% `/ R: J*/
$ {2 A9 N# k" P) o3 a |is
$ h& h* c, j: `1 w$ J- ] part, GlobalDistObj, assignLObj:object;row,Lan:integer;7 d1 b$ `- P9 s# [
do
. E8 f& C/ t8 d2 |3 N4 J Lan := rootfolder.Internal.Tools.AOLlanguage;8 s- e/ o9 T) \5 M" @
if current = @.Destination -- else return+ G. ?4 N( Y+ u3 p }: K* F
then
) `8 L. S" F( C- d6 P @.Destination := void;
% b' K! z! }" r1 W/ s) P) m if @.occupied then9 i, A: i5 N1 j- b" r k9 `
part := @.cont;
* g2 I+ o {$ i/ [: |9 F @.transpOrder := void;7 K" {! z: `& l0 ~
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
, c5 k4 c( i* w+ | @,root.eventcontroller.simTime);
! W, P# s5 f, F6 Y9 R/ w @.HasOrder := false;
H; [/ {& i2 {. B1 i1 d) R7 u3 _ @.DrivingHome := true;
7 j) R5 X0 W6 U* _; u, e/ [+ h rgManager.tryToStartTransOrder;
- w: ~& S9 Z8 C; E$ G" M if @.Destination = void
# w# a/ ~& P5 W6 ]2 ]- J( |3 } then -- no transport order for vehicle @
4 F% c6 `7 b% k3 J; ~ @.Destination :=
. k) a+ l6 x+ T0 B( A# r rgManager.nearestFreeStation(@,track.~);5 y# ?5 u) [1 x) x7 q- @
newDirection(@);
9 Z6 Y7 h7 y# P+ {& C+ Q if @.Destination /= void then
% J' L9 ]' e, e) E3 k2 P& a0 { @.Destination.NumReservation :=2 w% o/ d% l4 ]" q4 @9 c
@.Destination.NumReservation + 1;
7 d4 g% q1 u8 I% R" f- l. ^8 X# e# Y8 e2 a end;
1 V7 j9 o. K! ^4 S, c% ] @.CurrIcon := "drivingHome";
, p# f9 i+ M- X& H V @.DrivingHome := true;
6 \# q3 D' ]8 ~& O% V& M end;
0 p4 o( h' h- p8 ] else -- the vehicle @ is empty, both vehicle and part are in the same dock station( s. F w7 y3 J5 ^8 K! g$ w' i$ w
part := @.transpOrder;& [3 p0 e# t7 `; N; Q
part.move(@);-- load part' n; O" X( e8 f" B& i8 ?
@.CurrIcon := "load";3 z6 l& o% B8 d6 \3 C. \$ O% S2 u
GlobalDistObj := part.globDestination;
% W T% B3 E: n9 z0 R: n) Y assignLObj := rgmanager.rgAssignL;
' l8 ] J: I1 H row := assignLObj.getRowNo(GlobalDistObj);
% h0 K; a8 V: c2 V. N if Row = -1 then -- since 70' s$ O' O% p( J
if lan=1 then) a3 ?9 a9 P( ^) [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),. {: _3 \" ^& e8 ~1 Q5 W
to_str("in der Andockstation: \"",?.~.name,"\""));
5 q+ l! j- X8 |" N8 r7 V' c else: }# g: Z3 z( V$ `
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
, m y9 I) n- K' n7 ?0 v to_str("in docking station: \"",?.~.name,"\""));
8 G! v/ B! G0 {; F9 y4 G end;. B' h3 B4 U7 ]$ ?" f3 `
else% b2 v$ B2 b1 e; e4 o, `: ^
@.Destination := assignLObj[1,row];7 }; Z# o1 F# R, n4 S" P6 D
end;
0 ]% L1 I. w/ N# h& z8 x. L7 `0 p! o newDirection(@);% j' j* K* ` L. G, c7 H
@.HasOrder := true;3 F7 G" ^# H1 F8 y5 a, t
end;
! R9 z7 h) k0 p- R$ Y end;6 s5 {/ N. |" w8 K: v2 h- s
end; -- of the method7 @5 V( Q3 Y$ Z3 C m
|