/* called by: entrance ctrl of the object 'track'2 T8 e. O: c+ D, W2 b
*/
1 t, t- Y# }* jis/ L8 [5 [3 X. D9 J6 z" `/ w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
- |9 f9 i% A0 i1 ^1 m- Gdo
7 s; F) i9 z- g9 ~! t4 I Lan := rootfolder.Internal.Tools.AOLlanguage;9 s* C( ?; ~& `( B+ f, x
if current = @.Destination -- else return
$ G5 ]8 L) P I, ~6 _+ r then6 | R$ x" [8 Q: G4 p; y: [& l( T( s5 [
@.Destination := void;- {7 o' n! k( E
if @.occupied then W. P2 o1 z7 W7 @$ H
part := @.cont;
6 x4 f, a9 a! e1 @ @.transpOrder := void;
5 J3 r7 b; E3 g9 e* a/ L/ q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ P& X" n' x! _0 ^0 y: @
@,root.eventcontroller.simTime); K+ d/ p) I+ h2 f
@.HasOrder := false;+ Z! @7 Q' t0 `7 }
@.DrivingHome := true;
1 t+ c3 O: ^4 K rgManager.tryToStartTransOrder;0 y2 \# j9 k' b3 y9 r
if @.Destination = void
# Y3 y; _6 K" T' E) o% V then -- no transport order for vehicle @4 h5 k: H7 [" t# p% W6 \7 @$ M
@.Destination :=
; D- D" `3 R' m7 X3 f( @( Y rgManager.nearestFreeStation(@,track.~);
; ^$ ?; Y- ~( ?6 | newDirection(@); , |" U3 f8 L; q- B0 ^1 ~: O# l
if @.Destination /= void then- j; Q# g% O7 l# G% D4 }7 a
@.Destination.NumReservation :=
" E9 D* L+ x3 F @.Destination.NumReservation + 1; S# l: _, p- ]$ G0 F5 A/ N
end;1 O) {5 U2 ^3 N* I, \
@.CurrIcon := "drivingHome";$ c( D s+ l. s7 G+ C% N
@.DrivingHome := true;" ~- `! `' H4 M1 Q/ X
end;
; y! u8 t: V9 b* R else -- the vehicle @ is empty, both vehicle and part are in the same dock station
( y, x W3 _* b2 F5 \" o7 q9 K, ^/ O part := @.transpOrder;
/ R& s5 S3 I6 ?4 q0 e- P part.move(@);-- load part& y- G. c9 M2 M+ g
@.CurrIcon := "load";" G" F t( B$ ]( k( l c+ C
GlobalDistObj := part.globDestination;
1 z5 O+ o% @; V assignLObj := rgmanager.rgAssignL;7 r+ `, ^ Y0 I* P
row := assignLObj.getRowNo(GlobalDistObj);3 Z0 W* j* s+ U" x; d7 a! ^
if Row = -1 then -- since 70- S5 V C+ M a. d) R
if lan=1 then
$ f. i! b) u% c+ v. \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
! Q: Q- \. X! }: ^ to_str("in der Andockstation: \"",?.~.name,"\""));" T" @6 }; M& Z* b* Q9 y
else, @5 k0 P* a5 v
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),+ F* I- U9 j8 k' M- q
to_str("in docking station: \"",?.~.name,"\""));
/ ?( O( j) S3 f3 q end;
2 q% t. V% I1 y9 q else, t5 d K1 Q( s
@.Destination := assignLObj[1,row];5 s- H8 c; a5 b0 a! f8 u2 ?! C
end; 3 L% W' x: t% x8 D Y$ z( \" R1 n1 B
newDirection(@);
' E+ s% c" _+ C0 H' { @.HasOrder := true;
8 q; {& J1 Q- w6 M* \1 r- z' ^& s end;% t5 m( D. X8 p4 Q
end;
7 d* n! w8 j/ x6 iend; -- of the method
* K4 x9 y1 x: V; k% F+ N |