/* called by: entrance ctrl of the object 'track'. S Z F" p) ]% j9 k- O! k- D6 J
*/
6 v% p D3 ]) t: m# pis* c! ^" h+ M {) Y2 V0 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 p/ y& p4 K; `" t: @8 N
do, ^; V9 D3 V$ a- W# f* P; d
Lan := rootfolder.Internal.Tools.AOLlanguage;3 R. S4 u& F7 F3 ~( O8 u! a5 r
if current = @.Destination -- else return5 i9 c# ~: M% \- T H
then
8 b/ |( K( N% p/ w9 U" A @.Destination := void;5 `* Y) z! Y6 @0 R+ \: `
if @.occupied then/ o x- s1 v# h6 z' S
part := @.cont;2 w( ^8 ?7 q5 T% }! T- D! Z, H
@.transpOrder := void;9 e# J. c) c2 ~, @ J
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" t& E8 N4 P7 s" ~6 I @,root.eventcontroller.simTime);
* n: P0 n9 B- t) ?- O$ J, J4 L @.HasOrder := false;
2 L: B ^5 \. _0 c4 h5 s0 I$ }' i @.DrivingHome := true;
2 Z% }+ i5 c5 J4 I" n, c' u rgManager.tryToStartTransOrder;2 t( W# B! C) ^ i
if @.Destination = void, c% h2 d. S' } N O
then -- no transport order for vehicle @
6 B0 {8 p$ [+ p$ p @.Destination :=
5 X1 ^; V" q. `" F# g rgManager.nearestFreeStation(@,track.~);. y% n- c' s& F5 M8 j5 e
newDirection(@); ' Y- }6 v) m( ?7 W9 J @2 g4 V3 S
if @.Destination /= void then& l, B# m) ?2 X+ e/ I# Z" g4 W
@.Destination.NumReservation :=
* Y ?0 H, h/ h1 c4 \! _' f- S @.Destination.NumReservation + 1;
; T( ~: U( M$ C end;
1 s% _6 D0 X W: d2 F @.CurrIcon := "drivingHome";
' W: ?) U/ J. ?: F. H, } @.DrivingHome := true;3 n" f7 l. |+ @% B4 j0 [) H" H0 o
end;
" {3 e E' _3 d. j' r) n else -- the vehicle @ is empty, both vehicle and part are in the same dock station
2 L3 g$ O$ f5 K2 P0 U" U' A part := @.transpOrder;
$ H& H0 r/ b7 M8 K/ @6 S; M0 J, h part.move(@);-- load part
7 ~* l# k, ?) U6 }6 H @.CurrIcon := "load";
2 x! F& o8 K9 U: m, ~" S1 J7 o GlobalDistObj := part.globDestination;
! Z. ^& h5 y8 j, G5 p assignLObj := rgmanager.rgAssignL;5 N; A2 }) W0 |( K) y8 K
row := assignLObj.getRowNo(GlobalDistObj);
* I9 T- X8 D- m! L0 m if Row = -1 then -- since 70
& B0 w. ?) P% C T$ e& L if lan=1 then
" M5 [7 D* a8 i4 G! U3 m! `( ~ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),3 U0 W5 M+ K4 L; N( N/ y& x
to_str("in der Andockstation: \"",?.~.name,"\""));3 [) R7 o: O# x1 v, o
else
% P. H6 @: J( _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
' I e' I) h5 @) D' d$ m; `' O% P to_str("in docking station: \"",?.~.name,"\""));
2 [* S6 h V. G; G9 P2 _! ]4 F end;
3 Z6 ?' S/ [" t ~ else
( G2 x; Q, Q3 O8 q, f2 W @.Destination := assignLObj[1,row];1 i1 B8 A& e% r. w+ j: M3 t0 w
end;
) }* L7 g; m( K! d newDirection(@);
1 P* K5 @8 l P ~' f2 C: r; O @.HasOrder := true;4 }" z& `+ w1 w7 C3 E
end;
- q) @8 h: X& X ]% T8 y' H& H( h end;
! H9 M7 Q# @5 L- v* _) \' z+ Xend; -- of the method
/ L/ w& ]/ P/ @. I1 o7 D |