/* called by: entrance ctrl of the object 'track'* A# b O+ P+ A8 {; \$ r. h: M
*/6 q2 I4 }8 m$ [/ C# r) b
is" x' l; m; U4 N2 j9 Z( @
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
; B8 ~$ T* {9 b. U3 R' Jdo
! ?4 G3 [ u) |6 K8 G8 { Lan := rootfolder.Internal.Tools.AOLlanguage;' i6 z: p1 \) g& i. V/ c" }
if current = @.Destination -- else return1 s: X& c6 ~; E% G* @/ a
then
8 o1 h1 M$ t9 t% K7 m. T @.Destination := void;! {9 n$ o+ ]/ L# H' A
if @.occupied then0 j( ~' w# f* J* F4 x
part := @.cont;
( F3 V \9 f. b6 L, N @.transpOrder := void;, A& q/ s' {5 U( C! Y& I' E/ G
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 R7 A9 u `) I7 F; O6 ~ Y( [* H
@,root.eventcontroller.simTime);
2 A$ X( i; I. K @.HasOrder := false;
" Z+ D% O3 q" {" p( n5 ?" \4 a0 Z @.DrivingHome := true;+ Q5 N6 w. l9 H8 ~* K9 T$ j
rgManager.tryToStartTransOrder;2 ~9 t8 A; T2 r. X& o
if @.Destination = void4 \( O" i" F! \. P: i7 ~2 @
then -- no transport order for vehicle @1 V0 D, h3 N1 ]1 B( G
@.Destination :=
@6 O+ `. b/ ~: H) K rgManager.nearestFreeStation(@,track.~);
. K- ]/ y1 \% `+ T! ~6 g, z0 f newDirection(@);
0 @$ I- E0 g7 J0 [9 { if @.Destination /= void then
5 P3 m; H7 x. W# y. W b @.Destination.NumReservation :=9 v. i- K7 I( a# O& O2 M0 [. B
@.Destination.NumReservation + 1; e" z, K3 g% Z
end;
4 o" j( I% C9 l, B" i/ s @.CurrIcon := "drivingHome";
+ Y0 I; l! o$ E' z: k# e1 Q) w @.DrivingHome := true;& W8 @2 \2 v# O2 T2 E3 q- q
end;
, h A3 x+ @- W) y: ?% Z5 V. M/ y else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 L$ m( M3 w, K! k6 }
part := @.transpOrder;
- N* C+ B0 F" f) D8 U" ] part.move(@);-- load part
+ ~& ~2 |% K6 C* F& Q8 w. T5 d5 ? @.CurrIcon := "load";
7 M* E) F% x& R; r GlobalDistObj := part.globDestination;
: ?' |: f' ~ M: }& ^% N assignLObj := rgmanager.rgAssignL;
3 U( i" X7 X5 x2 i row := assignLObj.getRowNo(GlobalDistObj);
, V, J* B# t$ N6 X) Q* f* a% d if Row = -1 then -- since 70
1 o8 C3 Z, t) h2 W6 ` if lan=1 then
% w" H Q1 A7 L$ ? promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),, S* R/ K! _, ?5 P/ Z) }
to_str("in der Andockstation: \"",?.~.name,"\""));
9 P Y6 `. M+ z, v, o2 T8 Q. K else
! @& t& ?, P! S# V D promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),& M( v3 q8 p7 l6 T" I" A
to_str("in docking station: \"",?.~.name,"\""));
1 R2 i$ Y' K+ B5 G end;( x. c% p/ O" W) X0 Y- l; b
else' ]/ @; H- g4 w K# U
@.Destination := assignLObj[1,row];
& n* v: H4 V% R: z end;
! i' O E& s) J6 Q) a newDirection(@);" T$ I/ Q+ g$ V# G+ S
@.HasOrder := true;5 d' `2 d$ F) O; L
end;5 z4 b$ M8 P$ W+ g
end;
+ R& R" W6 E2 Y# M4 ~end; -- of the method
8 ~$ M# S; ?. S |