/* called by: entrance ctrl of the object 'track'6 G& v8 _$ N! d9 c# h) N& u
*/
7 k, M, x( O5 y1 ^9 ]' Sis
7 f! g6 L* s3 w6 } part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- @- ^# c# \- X b) ]) [' ido
& D9 U& R9 i, O- w \( R4 u Lan := rootfolder.Internal.Tools.AOLlanguage;( ?% _( X* Z/ X8 T2 v r! E
if current = @.Destination -- else return; O1 W4 i3 _2 u% R% c5 n2 h0 a
then3 o9 D& O: l0 S0 z+ v: z
@.Destination := void;
& e, o% G; g' l, X+ Y3 C if @.occupied then4 ^4 c$ I) E" [( V x( x+ I% H
part := @.cont;
2 r {, X5 ]8 L/ z% a9 E% B @.transpOrder := void;
c) x. b! ~% u part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,8 I D1 p, r, l) K% u. |/ y
@,root.eventcontroller.simTime);7 ^ Q1 C! R4 e' a$ n
@.HasOrder := false;1 `( e3 w9 L' Y
@.DrivingHome := true;0 r5 X3 q$ f9 x; y6 L3 x
rgManager.tryToStartTransOrder;2 R) O1 b! X, h- n3 k, T7 z
if @.Destination = void+ r7 a, q* t5 t5 l% \$ l2 P4 A
then -- no transport order for vehicle @! o$ P& W% S' {+ a2 R
@.Destination :=1 G3 B5 v9 {* Y% x3 q
rgManager.nearestFreeStation(@,track.~);
$ C/ E; h" j: ^/ @ newDirection(@);
3 T/ q% T7 V7 f( [ if @.Destination /= void then# y& G; U8 f8 g2 r/ ^! H" g
@.Destination.NumReservation :=3 \/ Y8 q. T; \. \9 E$ N
@.Destination.NumReservation + 1;( A- {9 F- n9 _
end;* ]) x0 t3 m' B* R( \
@.CurrIcon := "drivingHome";- {! n" Z% @, M- o/ e( x/ C
@.DrivingHome := true;
- f) \# L( f# o8 W5 O% S' O end;
+ n3 M; N" d& F. n) B( N. _ else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 Q; O. f7 l. W& C1 G" m part := @.transpOrder;
4 s1 u s9 G$ ~2 m- O part.move(@);-- load part
9 W9 b, c( O$ S! V ~8 f @.CurrIcon := "load";4 p7 O" Q& P3 f% ~: W |
GlobalDistObj := part.globDestination;
7 ^8 Y) b. L# j/ |: B assignLObj := rgmanager.rgAssignL;) L6 K- x5 `3 k2 V& s
row := assignLObj.getRowNo(GlobalDistObj);
6 r/ r; l. Z) L+ w6 ~. n: Z if Row = -1 then -- since 70( y) v- Z+ P1 E$ f
if lan=1 then! r& K" L" o3 \( w2 r. n# q. D
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
% Z8 R/ k8 n/ L% b0 H6 h to_str("in der Andockstation: \"",?.~.name,"\""));5 y. B+ d+ K: i
else
1 E2 S* g; q6 _ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( L7 G' B" ]. H: c! ^) W+ C1 a! c to_str("in docking station: \"",?.~.name,"\"")); / f' _+ o7 i) D7 H; m# v
end;& }0 j1 p' z; Z( F& f% J
else7 v7 ]4 b1 t& C) f. \8 k8 v: p% N
@.Destination := assignLObj[1,row];) S! x" U4 e/ z2 _
end; / r7 j0 a5 `. ~6 {; k, y
newDirection(@);5 c1 A6 s2 i+ m, _
@.HasOrder := true;
5 Y# L2 u( D$ U6 e; N end;( U6 p( }: i7 W4 d- Y
end;: K! T( W% e: A8 r; d
end; -- of the method
+ }) `$ W e! F0 K, l; g |