/* called by: entrance ctrl of the object 'track'
" ~5 p8 L- I/ X; m*/
) D( E6 u$ j2 ]4 n# xis
( k. t1 {# F& J part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% M. ]( ^) O6 }/ S# Wdo
" w+ U: A. t, j3 |+ J. S Lan := rootfolder.Internal.Tools.AOLlanguage;
( o3 e6 r6 g- v* u. i( T" ? if current = @.Destination -- else return
. Y1 x/ o. I6 E then
. Q: j/ {7 z- o7 \) H; Y @.Destination := void;
1 \. X- e- ^0 K if @.occupied then' G# p+ @1 [2 e. j1 o2 S, Q
part := @.cont;
& W& \2 s; E3 t! P0 i# [, Z @.transpOrder := void;
7 N: G$ }( R% L5 ?" ` part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
: k9 J8 ?$ \5 ]! X) ~* I* e6 H; D) n @,root.eventcontroller.simTime);
6 j3 Y% F) K, [, k/ C' I6 A @.HasOrder := false;) C# v4 j( m+ A1 `' z
@.DrivingHome := true;4 F/ x1 G: M' Y/ r$ ~
rgManager.tryToStartTransOrder;
. t, F( j5 ~" G* D3 ` if @.Destination = void
; u! J! T( @/ r0 X; S7 n. b4 ~ then -- no transport order for vehicle @
$ m0 D n8 G S- }8 [! v% O @.Destination :=, A4 k) ]2 g {
rgManager.nearestFreeStation(@,track.~);
4 W0 O8 C( y# M3 p newDirection(@);
9 S: [7 G3 H. k& \# j0 H- E if @.Destination /= void then
7 Z) i; R; M' l/ |6 g [8 c @.Destination.NumReservation :=
' |. G4 [2 a* p7 E, f- T; c @.Destination.NumReservation + 1;
6 [' |# N: O: x& ^# \ end;
) S0 l Q& o: |- s8 c+ m @.CurrIcon := "drivingHome";
- j$ H& _7 l4 i) {7 Q @.DrivingHome := true;
, m' O6 a3 C$ F+ P6 v0 g5 } end;6 b& W4 h2 }% a! A4 K' U
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
4 e1 H* h' C% r7 w) g part := @.transpOrder;$ h" T* p, a/ G& u- J8 b/ ]
part.move(@);-- load part
! p* K! C' C+ R+ z) T# s @.CurrIcon := "load";' F8 z% I4 y5 O8 h* u' e
GlobalDistObj := part.globDestination;( v P: |+ w; Y, x: @- ]
assignLObj := rgmanager.rgAssignL;7 ?1 Q7 ]% w: S# a; r; A
row := assignLObj.getRowNo(GlobalDistObj);7 y5 C! S& _$ ~! l" M/ E
if Row = -1 then -- since 702 A0 W" ]& s e4 k+ l
if lan=1 then, ]2 o. _2 ?( l* t. a6 R
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
- I6 }. `/ ?: r- y- t to_str("in der Andockstation: \"",?.~.name,"\""));
! k' R- K4 e: ~2 J8 I7 g# [; g else- m1 I2 I+ ?( G- `6 V% B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
+ k# W$ j# [* J8 r to_str("in docking station: \"",?.~.name,"\"")); ( h/ L. p2 l+ q7 G4 b3 ?
end;, E# ~, z5 T. v8 L8 P; `& A
else
$ e+ O) z. q8 ]$ Z @.Destination := assignLObj[1,row];6 K0 C( F+ U: x( }8 w" h5 s& y" m8 a7 ]
end; 5 n9 d7 t/ z7 P& o
newDirection(@);) _' T* }' ?$ g6 Q, h
@.HasOrder := true;1 W; v% i. q& Y# x2 Y' b2 }/ i
end;
% }" B' ~7 M& c- g6 p end;
6 [$ S" ^: b5 A( I5 {7 Eend; -- of the method
' Q3 w- }& g G$ | |