/* called by: entrance ctrl of the object 'track'7 i- b/ |9 a! O( O i) c# {
*/
# y. h1 c5 Z3 J( m3 e- Q! ^is$ R+ r. l3 f6 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;. }" M: h1 Q0 Q
do
: v( ], y3 v3 H- k1 r5 m Lan := rootfolder.Internal.Tools.AOLlanguage;
6 q5 d3 l+ g/ |: y x& `9 O if current = @.Destination -- else return
3 I" { _! w0 ], k4 ~ then
4 W/ ?2 v1 y+ W2 ^7 P" x @.Destination := void;! w8 Q0 S, f0 u) [- [
if @.occupied then& C: s- ]9 L/ {% \# G5 s* D7 d' ?+ D
part := @.cont;
; I; G3 J, S) r5 {" c0 Z) _# j4 L @.transpOrder := void;" _7 @! v1 n3 q3 } x! D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
+ S2 U4 z7 }. n- w) { @,root.eventcontroller.simTime);
8 H, T+ m: U: a @.HasOrder := false;
5 B0 N1 _: V/ u* }6 ?1 }% \ v @.DrivingHome := true;
3 {+ h4 N# p6 } rgManager.tryToStartTransOrder;4 k, k1 v4 m1 X# Y1 w ^" y) {2 |1 O
if @.Destination = void) \7 j' K8 a( v1 u, P2 u7 g7 s% J6 i
then -- no transport order for vehicle @
! f/ m6 Y9 u; N$ F2 N, [9 u @.Destination :=
' ?. s% g" A: d1 e4 v- L rgManager.nearestFreeStation(@,track.~);
2 C3 [) W* d# I# j5 g8 j9 N2 a newDirection(@); 9 i# K4 U6 m# W$ D
if @.Destination /= void then8 Q/ Q6 \. a5 r1 i' M6 { K; c4 d
@.Destination.NumReservation :=
: w) u ~5 T8 j+ O6 f @.Destination.NumReservation + 1;, D! X4 m) J* C$ l- ^1 Y$ v0 L
end;- D+ y' p/ O/ k
@.CurrIcon := "drivingHome";
, n- J, p# G% c @.DrivingHome := true;
' T3 X) e7 O; r) v0 c; b end;6 @; Y2 c& I9 Q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station" v8 Q3 w& I- }! M2 w9 y1 \+ C0 P+ X
part := @.transpOrder;$ f- }( I# m1 F, |& |! C# O
part.move(@);-- load part# C* }! Q* R% ?8 g
@.CurrIcon := "load";: P4 p4 i/ q, Z$ _8 Z
GlobalDistObj := part.globDestination;
& F; S- h6 v" x+ G3 k5 U assignLObj := rgmanager.rgAssignL;
5 j* c3 g( S+ N+ x row := assignLObj.getRowNo(GlobalDistObj);- b- @& a% ^: m: c
if Row = -1 then -- since 70
2 Z3 R# s' P3 R& T if lan=1 then
- |# I3 d" A' i3 v7 ^! l promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\"")," g0 I* l# @ E/ A2 D# O- H
to_str("in der Andockstation: \"",?.~.name,"\""));% j- ^$ q# I- n3 o( x, A0 |
else
J5 {. n3 J4 o5 d3 [7 u' j6 b promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
0 ~0 t1 @' X) ~8 O# y" k to_str("in docking station: \"",?.~.name,"\"")); : A/ T. |4 U# ~4 h9 B) ?9 {" H6 G
end;
& b" R6 ~4 L7 A( W. T' L else' m) n8 u& H7 Z1 ~4 H2 }
@.Destination := assignLObj[1,row];
: K( v1 y, K/ K7 m1 Q end; - M/ g H$ W$ Q x* L8 f/ h; ~
newDirection(@);5 N; I! e% a5 O5 i7 S& j
@.HasOrder := true;* d2 p3 D) U) J* G/ X1 L
end;
* H5 z; V8 J% k5 a0 @ end;' _9 E. p+ L& l* S5 l
end; -- of the method/ [ ?5 A# D1 G- c8 q( n# s
|