/* called by: entrance ctrl of the object 'track'
' s/ N- o/ C, j/ f; G$ T c- M% A, ~*/5 A" F% Y* e3 s0 N. @: R
is! M2 p* z. d: i7 p* Q! K x
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
G; j3 @+ z6 w9 o7 x6 R. ?" n0 Cdo: e* U: R0 ?+ u V6 e
Lan := rootfolder.Internal.Tools.AOLlanguage;
4 K9 P! ]# y3 ?- S( I v; s if current = @.Destination -- else return
1 m( a! y" a' _% |) L$ g2 e, m then
7 u* k% p& t4 L) r# i0 r0 t) W( N7 Y @.Destination := void;
$ V. Y, \: q) X if @.occupied then( S3 Q1 R7 j$ J) x$ A
part := @.cont;% L" {0 x/ }9 k) s- V( K) |
@.transpOrder := void;
* ]) A8 x; h: \ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,9 `- ~; }& x$ O' ^. k
@,root.eventcontroller.simTime);
" d- ]+ W. N& P1 O8 z: k* b) s @.HasOrder := false;: ] A$ [/ v& S2 [" m; [0 G
@.DrivingHome := true;
, R6 A7 G8 k3 r6 ~+ F0 T) W rgManager.tryToStartTransOrder;
$ t* F/ v+ F% S& z, K. c) d if @.Destination = void; J; @% J' n$ t8 s: h6 w/ ~6 _
then -- no transport order for vehicle @
2 o/ O) j( m5 A% d1 h+ S$ L @.Destination :=
( z M1 D+ d1 `& G- I rgManager.nearestFreeStation(@,track.~);3 t1 |8 O6 w' l7 p4 D" A
newDirection(@);
2 c% [: I g' V( N4 z4 k: {. b if @.Destination /= void then
\. X! C; V7 X' G( K @.Destination.NumReservation :=( h" `5 ~5 [/ R/ D
@.Destination.NumReservation + 1;5 r) B; a% Z+ R& w: ]2 M/ l
end;# ]9 c8 E- ?. V5 P c5 W
@.CurrIcon := "drivingHome";
% ]; d# e( E' V, g5 j: h @.DrivingHome := true;
; x. ^6 M% J" x& I* \/ ^) \: X( A end;
! N6 M/ U$ A+ `+ b% c- H c4 v else -- the vehicle @ is empty, both vehicle and part are in the same dock station4 u0 D* o, v# Q- n/ a, b( m
part := @.transpOrder;0 ^6 E- g, U G4 g+ y/ V
part.move(@);-- load part
4 p5 u$ g$ l, N$ [ @.CurrIcon := "load";
; a/ t& U! K( k3 @1 Z* S$ d GlobalDistObj := part.globDestination;
" r5 ~! w5 ~0 b assignLObj := rgmanager.rgAssignL;
' G6 n# z5 ~2 B) E, X8 g row := assignLObj.getRowNo(GlobalDistObj);+ Z+ C- c9 x( R' `) M6 K
if Row = -1 then -- since 70
9 j# f+ j0 `$ N, i! N$ t z( g if lan=1 then
% Q; w9 x$ h6 l, D4 N, d promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),& @" f1 R6 T, V, M9 e+ k
to_str("in der Andockstation: \"",?.~.name,"\""));
: R, o0 N9 }7 H' L; ?) d else
/ Y7 \9 H& J7 I6 ]- F' Z9 ]) ^ promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),' ?# @& k# A: `0 E! c
to_str("in docking station: \"",?.~.name,"\"")); 6 r' a% M( C; h
end;: d U1 [; r# A4 x( i5 d
else7 S* ~( X3 z, b: Q' s# d7 F
@.Destination := assignLObj[1,row];
" m! P8 T* [% o2 Y Z end; % N2 M( k8 A1 U" T( v/ @
newDirection(@);
- k" ^! R `) U+ h @.HasOrder := true;; L- J2 a) h- [! c7 V9 g
end;0 z4 ~8 f5 Z% R4 w6 |5 Z# a
end;
* E; b. h# r: x; tend; -- of the method
3 s! v( b3 x. E- v |