/* called by: entrance ctrl of the object 'track'5 K+ }. Z+ g2 {1 g# P
*/
; h( S- T4 ]. O/ z' q$ ?5 Iis5 W: p; x6 `; Q1 P
part, GlobalDistObj, assignLObj:object;row,Lan:integer;( { ~$ z1 o2 U) Q2 \4 _. O
do! H6 t6 L+ ]7 F7 ^! r3 A' o/ @
Lan := rootfolder.Internal.Tools.AOLlanguage;
% [7 m* R" i; D' v if current = @.Destination -- else return2 l. w' X% I7 p1 M$ m) M% y
then
/ ]2 K# X$ \7 R" m# D+ z2 N; S @.Destination := void;. Y' {( P* }5 U' k1 K% x
if @.occupied then
8 v; A2 y. I; r+ Z: g part := @.cont;
4 N+ p! Z7 i* T- u: e* [ @.transpOrder := void;
* b, y9 G6 v% N; _1 M9 k. l part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
2 G# B, }+ G5 B, Q: G, B: D& o @,root.eventcontroller.simTime);( c& o( @1 O) C7 G( @
@.HasOrder := false;
1 W) A) r+ l3 O! M, X @.DrivingHome := true;
% m4 [( U! @ [5 p) R# a rgManager.tryToStartTransOrder;
+ {* ?. C: g6 D3 Q5 [+ A* q if @.Destination = void
' N; b# ^( V& j' v6 j( D then -- no transport order for vehicle @% ^) j5 Q& [% W8 V# G
@.Destination :=
. x: }% Z, N3 y# O3 @ rgManager.nearestFreeStation(@,track.~);
( m/ y& V* }" X# t$ @& a newDirection(@); * b& d- X" \' V& o
if @.Destination /= void then$ h t( E) A( A- u9 I! ^! N
@.Destination.NumReservation :=; b* k5 V5 t, s& y) |
@.Destination.NumReservation + 1;: W- V3 y" t; e' K, |/ e: ?! m! [- b
end;- y/ v% G& D8 t# E7 y
@.CurrIcon := "drivingHome";
+ Z0 J( O/ r6 e4 f1 d: Q# x @.DrivingHome := true;
* I7 d, F' I9 J3 z" V' H end;- }" u# \) z" v3 c
else -- the vehicle @ is empty, both vehicle and part are in the same dock station& h; s$ D Q+ Q, e2 m8 }9 y
part := @.transpOrder;( g0 f, H: h9 [0 q3 s0 ^ \
part.move(@);-- load part
3 [) M. t5 f) J9 K( P8 V( B8 Q @.CurrIcon := "load";
' d0 A# Z9 H9 O2 ~7 s) E2 u: J7 e8 _ GlobalDistObj := part.globDestination;0 C7 l2 C( L0 p. _3 B2 P/ F" x' R |2 n
assignLObj := rgmanager.rgAssignL;# k1 V- w- A6 ]& D0 d9 L) \
row := assignLObj.getRowNo(GlobalDistObj);& G6 P6 r# k- e
if Row = -1 then -- since 705 ~! \' w; a6 z3 S1 b6 N
if lan=1 then
( B/ D+ l, v- i; n9 w y9 G promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 Q$ l" Q% e7 z2 X' t9 {: _. c/ W' \
to_str("in der Andockstation: \"",?.~.name,"\""));- p2 l% H! F& ^3 a; a
else
a0 j' s* Q3 ?4 v0 N1 b! b+ M promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
7 S( h: v$ N+ h3 T0 g7 [ to_str("in docking station: \"",?.~.name,"\""));
) Q% S1 u8 Z7 A/ _+ M- {; o end;5 Z, r% \% z7 w. ]1 V; T
else
: o. O& e5 W$ Q @.Destination := assignLObj[1,row];; J2 e$ ^2 f) k& D7 ^" ~
end;
- \+ ?, u) x5 @ O) n newDirection(@);
+ h! }2 S- R/ a/ i @.HasOrder := true;
5 F/ O+ }) j4 I$ O end;
3 s* f7 Z( ]! t4 h end;
7 m c, R X5 c7 kend; -- of the method
* t( Z$ b) M, A, {' ~0 B7 M& ^4 m |