/* called by: entrance ctrl of the object 'track'
$ |, Z4 s; _8 j*/ Q8 C! w8 w! ^% C1 o7 z" b
is0 X: \8 M9 a8 P- y4 V
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
& @) Q8 N# l* `" r/ X8 Mdo: T f5 `$ L$ x2 r/ _+ T, ?) P
Lan := rootfolder.Internal.Tools.AOLlanguage;
* ?* p( E; o) W0 b/ ]2 w7 N if current = @.Destination -- else return
. Y6 |- z9 l0 C0 ? then
1 f9 k* Z2 F' d0 ~# _7 J( l7 x @.Destination := void;
+ C% N3 X x% F3 `6 J if @.occupied then
+ x6 r& e, E b n( Y$ z; N# z5 \ part := @.cont;( i" E3 i- X6 m2 j% c$ x
@.transpOrder := void;
8 v/ }9 s, ^ ~/ `: t, c3 m8 g0 R6 ?8 S part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
" i w3 K0 {: g T, x) ~4 [/ f @,root.eventcontroller.simTime);- h& @2 P* s( ^! Q
@.HasOrder := false;
8 K9 H% w( ~1 k @.DrivingHome := true;! Z6 V* F2 c- y9 U
rgManager.tryToStartTransOrder;
9 T1 k; H' T' y if @.Destination = void$ h2 G, f* Z8 Q3 b: L* r
then -- no transport order for vehicle @9 E0 _6 O. A+ u) R& o* p
@.Destination :=# |+ v' G x3 K1 ~1 f
rgManager.nearestFreeStation(@,track.~);, |) A! i7 _9 v/ W8 O3 d& }! ^
newDirection(@); # J) Y1 ~/ m9 W i4 t/ r
if @.Destination /= void then/ f& F, z7 D5 x' S/ o7 ^
@.Destination.NumReservation :=' F% g1 @+ t9 A) V
@.Destination.NumReservation + 1;
. l5 `/ J' K: H) z end;/ [* h; ]0 i+ v0 n, R
@.CurrIcon := "drivingHome";0 x* e( t8 [2 j+ z5 P% L
@.DrivingHome := true;
3 ]3 H" a1 E& C end;
$ s4 I3 @9 n7 _1 E/ W3 x else -- the vehicle @ is empty, both vehicle and part are in the same dock station k6 v- x v$ `# W8 b8 V; }
part := @.transpOrder;6 e3 x' J m9 G# ^- R
part.move(@);-- load part; O$ j2 l# D3 b5 Q0 r
@.CurrIcon := "load";
3 `% B8 `1 X) O* Q+ r3 r GlobalDistObj := part.globDestination;
% D# c* x' L6 a' B- ]( l assignLObj := rgmanager.rgAssignL;
! G3 S" ~8 G4 w5 M row := assignLObj.getRowNo(GlobalDistObj);
* s, [+ r9 S2 ~1 B) c8 i5 b if Row = -1 then -- since 70
$ u; _% x* K$ b. w$ i5 P$ F if lan=1 then
; C! `( x# o9 g- d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),: w3 v+ J+ r; {: O: @
to_str("in der Andockstation: \"",?.~.name,"\""));' ~8 z! w+ u2 T; i8 N K
else
5 I) Z7 V2 M% `& \5 I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),0 T1 q4 x2 ?3 B4 t% ^
to_str("in docking station: \"",?.~.name,"\"")); . P/ Q" E) q9 l; A8 R" n9 J% s# j
end;
' X/ _) k6 x: B9 T2 R* ^7 K else
4 ~1 s0 P" ]6 A/ N; a @.Destination := assignLObj[1,row];, f( Y3 N+ K% h/ E% t8 m( T
end;
2 T1 M! B) E+ X* P6 f4 B2 S newDirection(@);
' L/ C; Y. p% v0 G3 L( \/ a @.HasOrder := true;& Z3 I& c0 g- ]9 A9 l
end;
. [7 \1 g9 T4 B k, B1 B end;8 z0 x% Y' m# l
end; -- of the method! A# d1 k/ o" O& ~ q% z, K3 D1 x
|