/* called by: entrance ctrl of the object 'track'; G6 T) R+ C2 T) ~ o) h
*/
| M8 K; I& g* ~& [2 T$ Iis1 m9 t6 Q4 l6 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 u1 h$ b4 K& O) V5 D* ~6 Kdo9 V, o" r9 T, p4 i3 c# a* m
Lan := rootfolder.Internal.Tools.AOLlanguage;
1 }4 m9 d/ U3 S3 Y if current = @.Destination -- else return$ W5 h2 X% ]$ p0 L* h; K
then8 u4 c, A' U$ P% q. {; a
@.Destination := void;
1 ~# u% @7 n$ ]* m* ]1 `1 [$ V if @.occupied then
4 ?) I- |9 _* b$ h. Z part := @.cont;
6 l, ^& I; E4 n2 Z @.transpOrder := void;, n+ k7 Q, C, Z I% x
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," z: f! | ~6 f3 L
@,root.eventcontroller.simTime);
: G0 H6 e2 l$ s- N @.HasOrder := false;
" `; \- [) M3 I: }; z" H @.DrivingHome := true;& g" \' D7 `8 K. r8 ]6 |$ J7 y3 U/ j
rgManager.tryToStartTransOrder;% e. f* g u, b2 `6 [1 s" [
if @.Destination = void: q) a: d! M! [% _
then -- no transport order for vehicle @
( U: q/ _ I& v& z @.Destination :=9 b" H$ I" l7 u5 z2 T( ?. x
rgManager.nearestFreeStation(@,track.~);
1 G# z5 x2 O$ M# z newDirection(@);
/ m5 H- i) I [4 j! l- A if @.Destination /= void then
+ X6 S& G6 c1 t( q0 u$ H! {9 j @.Destination.NumReservation :=& T/ v$ d5 I0 P. h
@.Destination.NumReservation + 1;; p! M" O+ D, R' g+ h
end;# B- B% n0 r# ?( n) a a8 G4 V
@.CurrIcon := "drivingHome";5 B3 Z% }, g( A$ |, l
@.DrivingHome := true;
1 H0 h! X9 c# |2 J end;
9 A( s. H/ K( U- h: H else -- the vehicle @ is empty, both vehicle and part are in the same dock station
- ^0 i$ n, w! B1 m: n S$ G part := @.transpOrder;0 w+ R Z' }# B8 b" N/ O
part.move(@);-- load part
) k" q! ]& O: c0 G @.CurrIcon := "load";
7 b+ v& Y8 Y! c GlobalDistObj := part.globDestination;
$ [. h/ U" B" E7 b4 w assignLObj := rgmanager.rgAssignL;7 I, F+ u4 y% b* |
row := assignLObj.getRowNo(GlobalDistObj);
1 o b& g3 y6 {* | if Row = -1 then -- since 70
3 Y. O0 u4 U" {" q if lan=1 then+ j* j2 Z. ?) h, ^ C9 @1 q* z
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
4 g8 Q& U9 `* w5 P: { to_str("in der Andockstation: \"",?.~.name,"\""));
! x* M+ l* U, ^5 W" Y9 R2 X else
/ W. {+ T; W: T9 z' R( z" q promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. w- B I' k, e2 c2 |- U" _* }
to_str("in docking station: \"",?.~.name,"\"")); % O+ e }& A7 x% o( t/ B6 S& I" j. y
end;
; K4 a; k" I9 r9 u4 m% w else
3 N, j7 M1 r) f+ C @.Destination := assignLObj[1,row];* N/ _0 w2 B" G
end; $ s& d1 k/ j/ Q( L, j* G
newDirection(@);, G) [1 F% a' P: \" }
@.HasOrder := true;
2 G, M6 m' x$ S2 g- f& m end;1 ]4 M/ V0 P# N. j. i; }& ^
end;; S% ?! \ ?# X0 V; {- B8 Z6 V
end; -- of the method, ?4 ]# D: D4 p# z
|