/* called by: entrance ctrl of the object 'track'- N& w/ Q* T% d$ d; r4 G
*/
8 F; {( K3 Y9 Q3 A, Gis
6 d5 P; U' I% ~/ l part, GlobalDistObj, assignLObj:object;row,Lan:integer;) L" W* k+ Y7 [) J
do
" }3 r4 \4 A/ m4 p Lan := rootfolder.Internal.Tools.AOLlanguage;
& f/ S- Z2 B8 B; @. f6 s7 e if current = @.Destination -- else return6 c% z9 r, \4 T( c' B
then) _; ?& ]& `' D7 K {
@.Destination := void;+ r% B7 e2 `; B* `0 [
if @.occupied then l, f- L. Y; B9 G# T
part := @.cont;
9 g3 s: Y; i0 j1 A @.transpOrder := void;
& t3 q1 G9 l0 M- p" e part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,! I! m8 v& [( X* e3 e
@,root.eventcontroller.simTime);* K/ O" A1 Y9 E
@.HasOrder := false;
: w5 b) n8 k- i: V; l @.DrivingHome := true;7 u( r6 ?4 Z- i, O
rgManager.tryToStartTransOrder;, U+ M0 ~$ I* @% L
if @.Destination = void
+ a7 }- D% u' p$ t; n( z0 @ then -- no transport order for vehicle @8 z+ }- h; y ]# i4 B7 @) \
@.Destination :=
7 R/ W4 p% E# J rgManager.nearestFreeStation(@,track.~);2 S; A# E/ m9 U ^; N( g$ N( J
newDirection(@); 4 G. m- n* [& y* |$ y! d5 E
if @.Destination /= void then& J h$ c5 \5 K1 W* l
@.Destination.NumReservation :=+ s0 Y7 k7 s0 V5 `8 u7 V% l
@.Destination.NumReservation + 1;
' A; ~8 Q- ]" G& A/ q2 o9 {# {) c" O end;$ O: U# l# l7 g# C; U: h, P, _
@.CurrIcon := "drivingHome";0 j4 L5 n+ h$ i0 Z
@.DrivingHome := true;: R5 p- g% L/ q0 w
end;5 ]2 f% b/ L& K3 M9 G/ _, {# O+ l
else -- the vehicle @ is empty, both vehicle and part are in the same dock station% [* L! ]2 x5 ~3 d$ L2 l7 T% R6 r
part := @.transpOrder;0 s( E( l6 {9 B* y& c
part.move(@);-- load part6 L5 f3 r% o; F3 W' |
@.CurrIcon := "load";7 j8 B( C0 M4 X* X! C9 s1 _
GlobalDistObj := part.globDestination;& J6 f% Y: ^4 n$ z
assignLObj := rgmanager.rgAssignL;& c" g" `1 \9 z/ `% _. A; x
row := assignLObj.getRowNo(GlobalDistObj);; v) j* j9 _: Q' @3 B: |) v! \
if Row = -1 then -- since 70
% S( m3 _$ E- C- M3 c if lan=1 then' p- e( p1 b6 Z O& ?" `+ v5 s5 I
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- u4 {: l/ g; f to_str("in der Andockstation: \"",?.~.name,"\""));
$ _3 K5 }# d/ T6 L, k# i- @+ G% x else
$ Z0 w) M+ |. H+ d3 ?5 y1 ^; F promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
S# Q- U# [, R% p, P, \$ B to_str("in docking station: \"",?.~.name,"\""));
1 n5 t1 @0 E: x8 J+ U# o C end;
# y9 ]( o$ \( |" F, c else
3 y+ c$ ~% t5 `& V1 `/ h @.Destination := assignLObj[1,row];
$ @/ u# ]: R" H; ~ end; ' \1 ?1 ]8 \" }3 s4 A
newDirection(@);
0 ^' ~, t8 ^6 B9 J @.HasOrder := true;
' l- ], b3 ^% [0 E( e end;7 W0 X$ k3 j) g+ F; s& x- ^: E) w+ y
end;$ \$ t. D# F& n0 Z
end; -- of the method
6 ^0 J2 p& q8 [) J5 g$ Y |