/* called by: entrance ctrl of the object 'track'4 z; R7 i' M) @
*/
- D5 r1 k, p7 k* yis. b* }4 ]( z6 a+ z% b
part, GlobalDistObj, assignLObj:object;row,Lan:integer;9 l" j3 b! M0 C' X) ~& n
do, ^. a% t1 ~1 I+ g5 M( I; B5 y( |
Lan := rootfolder.Internal.Tools.AOLlanguage;
) w! a8 N+ @& }+ w' b if current = @.Destination -- else return& a: s0 ~( m" v, X
then; Q ]+ j3 E+ B) K, G4 U/ C5 l d; p
@.Destination := void;
. F1 n/ `7 z+ L& V* H2 C4 w: Y0 l1 S' n O if @.occupied then. S* @8 J3 a# l' s4 t
part := @.cont;9 ^4 t v/ Y j
@.transpOrder := void;
' B/ j$ C$ k- a3 h- P part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,) G* b+ p! }+ U0 U8 a6 p
@,root.eventcontroller.simTime);
( R% j4 G! }) X+ R% j8 A- u( f4 D @.HasOrder := false;! @& d$ h: o/ h2 y) L2 w
@.DrivingHome := true;0 L/ R+ y! n4 @$ k: p6 u+ Q% K
rgManager.tryToStartTransOrder;9 ?0 q2 b$ J* q# U% R
if @.Destination = void* S, u' z. K* a! n9 N$ k
then -- no transport order for vehicle @; n8 o& X1 H: [
@.Destination :=
- m' {& M* h9 I" b. N rgManager.nearestFreeStation(@,track.~);( a+ ^/ F8 ` Q$ p- `4 J
newDirection(@);
' q) l4 f. R% n0 r" o if @.Destination /= void then: D/ Q( T+ l) j' y- I
@.Destination.NumReservation :=
8 h( `4 C) G' }7 w @.Destination.NumReservation + 1;4 m. {6 U# h( b/ g) l( B7 r# G9 t& ~
end;
" J; Z& F w% G3 o f/ E6 c' G @.CurrIcon := "drivingHome";
0 S: z5 U- O- F @.DrivingHome := true;
/ @5 j: i0 O+ K1 W. Z end;# v, E) d( E: s2 d) [
else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 D+ e4 F$ _0 `4 S9 H* Q% B9 O
part := @.transpOrder;
. a& e6 u, W. h7 t/ r! j part.move(@);-- load part7 K* k0 r0 O0 o4 w5 m1 R. j
@.CurrIcon := "load";- E {- r3 p, U( l- }! w: V
GlobalDistObj := part.globDestination;3 ?4 l* ^. s7 n. ^( |8 T* P
assignLObj := rgmanager.rgAssignL;) ~5 j6 N3 t! }5 S
row := assignLObj.getRowNo(GlobalDistObj);
6 \. ^8 H9 W1 X' ]! E' u& W. ? if Row = -1 then -- since 70
7 ~+ k1 c) i9 g& M9 E" n$ I6 O if lan=1 then9 q/ |4 S; ]" y" j+ a
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! J1 K+ O3 W1 D, \ H to_str("in der Andockstation: \"",?.~.name,"\""));
3 T; F+ Z6 R" u' h else: V! A) ?! d( E) l) a6 b" `' n
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
9 v; e- D9 j+ }! M5 t# v& o& r to_str("in docking station: \"",?.~.name,"\"")); ) U u# [& L) a0 \' h, J3 R
end;
' \! }" w3 L* [ else. n- a' I) g) n% A7 q
@.Destination := assignLObj[1,row];: w/ t1 _3 \( x1 A/ D( D2 ?* r
end;
! \# j4 E3 X9 T: F+ ^! N* ]0 Z9 Z/ M5 r newDirection(@);
% w( A% K3 Y. Q9 ~: h4 D% D @.HasOrder := true;3 Y) m4 l( U) k3 Y5 K5 v
end;
' A) I4 r+ f- ], ]. a end;
2 Y- w) A' T& \" C% {! q$ }2 dend; -- of the method) d1 k% M1 a" B" r2 D' p* _% {
|