/* called by: entrance ctrl of the object 'track' H$ N/ Q" ^; S, E$ ? T9 d
*/
- D5 H$ |/ C0 r1 y! j* a+ {5 ~6 Cis8 T: i" a2 @7 r' ]1 x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
4 p0 v7 h+ k2 z* m, C$ [0 y! ndo
$ g0 z4 A. Y( G" Q7 A Lan := rootfolder.Internal.Tools.AOLlanguage;! k X/ X B& e' [
if current = @.Destination -- else return" c( s* [7 a9 I7 f
then
, b9 w6 t+ n) I0 P2 A @.Destination := void;
% Q1 D, E2 ?: L9 h if @.occupied then
[2 e0 J3 a% h part := @.cont;
3 v9 @# Q. H" h4 e @.transpOrder := void;
5 \9 |7 R1 I/ V+ j+ R% v7 W part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,; ]3 @0 I" ]/ y& D0 |) b# J+ N
@,root.eventcontroller.simTime);6 @/ m( u. C) U
@.HasOrder := false;7 Q) f- z! H! g: R% S
@.DrivingHome := true;- F1 c0 `, C/ r+ _2 z6 N
rgManager.tryToStartTransOrder;
1 O6 [3 S; W7 j; H4 A if @.Destination = void
7 a# V' Q0 {! B% Z8 d4 Z! f then -- no transport order for vehicle @) d' ^* ^' a: a+ _2 G1 h
@.Destination :=
; y) {; u% X$ O+ | rgManager.nearestFreeStation(@,track.~);6 |8 A, }) {. j; j8 Y3 ?6 t1 b- {# Y! m
newDirection(@);
+ r3 ~! n/ }4 r if @.Destination /= void then
1 g% I) Y" r! [: V I4 Q( j @.Destination.NumReservation :=
4 t4 p; N9 p0 P* z# N9 }$ Y @.Destination.NumReservation + 1;! X4 y$ B" Z6 V
end;
# N M4 W- ~% k9 m3 N2 x, E1 F @.CurrIcon := "drivingHome";6 g4 D0 ]1 Y: E- |+ w9 Z
@.DrivingHome := true;
" r6 Y) {1 Y7 ^- |4 \ end;
! f5 ~4 r4 d' k8 H' ?" d else -- the vehicle @ is empty, both vehicle and part are in the same dock station8 v: b& U" i7 F0 b( f1 e
part := @.transpOrder;
% R" L" g' {( u; A part.move(@);-- load part
5 y0 c4 N: z( D# U1 ?# F9 t @.CurrIcon := "load";, t6 r7 c4 w3 N/ Z
GlobalDistObj := part.globDestination;
; u9 p$ w& B( [$ r assignLObj := rgmanager.rgAssignL;; s( [! ?1 o$ _, r* n0 F+ ^+ k# |
row := assignLObj.getRowNo(GlobalDistObj);0 k5 m8 b7 v! @" T; T
if Row = -1 then -- since 70
7 [1 Y" Y2 L* ]1 {6 Q- L if lan=1 then" K0 G6 L# q1 M8 u' ^
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
* t! Y! q+ l( d( c# Y% z) }2 d to_str("in der Andockstation: \"",?.~.name,"\""));
+ O2 O. p2 }8 `/ K else" `- q" a2 S, i2 }- g
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; o* L1 r3 Y8 t+ r2 o7 P$ P$ ` to_str("in docking station: \"",?.~.name,"\""));
$ j2 Q( t: z) _# u end;
& I2 _# m: ~* v* w! M else
: _% @$ `- O3 [3 j. @8 z4 K- H @.Destination := assignLObj[1,row];8 J6 ]# P- T `
end; 9 n. L* F2 N; Y$ B9 n6 u" O/ G# ]: x
newDirection(@);
6 `. n8 x% L3 @! ?- O) t* V( I$ k @.HasOrder := true;
% J0 M6 g% t+ {: f$ Q( l end;
( h8 r% J/ P z$ e. I, `0 A, t end;' ]# k# N" l$ o8 k! K q
end; -- of the method: a/ I5 {! K$ f; {
|