/* called by: entrance ctrl of the object 'track'
$ w0 B. P$ I' A' b, w2 c*/
8 r4 }0 R; i/ C ^; \ His
- J4 N2 Q8 d, o" v2 l* a5 J$ e part, GlobalDistObj, assignLObj:object;row,Lan:integer;3 C, A, W9 w. a! R; l$ ~3 @: f0 V" K7 s
do& E( e9 K# `2 F1 F6 i
Lan := rootfolder.Internal.Tools.AOLlanguage;: z0 b) _) Z1 d, ^2 u3 v
if current = @.Destination -- else return& }1 D% w3 ^. A
then
6 j7 X2 \8 Q# J& k" d; q) u' t- A @.Destination := void;
; `# W" E$ t0 N3 w$ y if @.occupied then
8 X# W* G+ J( S1 N part := @.cont;9 c: u- H. u9 O |: o: a5 `% K
@.transpOrder := void;2 U/ i8 E3 y$ P- j# q8 C3 |
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,/ c) S0 K% i4 x( X- Y; O- K0 r
@,root.eventcontroller.simTime);1 d0 ]3 ^- O' N9 s! Z+ G( P
@.HasOrder := false;$ C1 Y+ N1 t1 t5 _: H0 @! x
@.DrivingHome := true;0 s( ?8 E! n8 |& A" f' k
rgManager.tryToStartTransOrder;5 V* I# U L9 e- I! a- W
if @.Destination = void* B4 i, `" {, x' P
then -- no transport order for vehicle @) {0 _$ |6 v- z1 ^
@.Destination :=1 r& w% z v! {( O: T# @( l
rgManager.nearestFreeStation(@,track.~);1 o# z" r F9 p# W* c
newDirection(@);
, a6 P; g9 G% V4 ~: o if @.Destination /= void then
q- s4 d0 h2 {) U1 D, x+ `3 b% \ @.Destination.NumReservation :=
0 N( t+ v f5 q1 n3 D @.Destination.NumReservation + 1;
& N1 ~$ Z& }6 d' j) K end;
& o' Q- \& Z6 x2 w* q4 A! U @.CurrIcon := "drivingHome";9 H/ g" W d% w8 c
@.DrivingHome := true;/ J/ O! f2 i4 `8 B4 x
end;; T% M% \& ]7 Y7 v$ D6 V
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" y! z0 D' M" L part := @.transpOrder;1 E# J& j- j5 y' h3 l T
part.move(@);-- load part
+ o; b( f: C) v r$ m: o2 ^ @.CurrIcon := "load";
5 ?1 P7 B, Z% j: ?* s; [& ] GlobalDistObj := part.globDestination;
( w- ]) ~: x( D% X" V8 h assignLObj := rgmanager.rgAssignL;
2 d9 [# S! r1 H row := assignLObj.getRowNo(GlobalDistObj);: e* j+ H8 ]3 w% K& Q' p% r" a
if Row = -1 then -- since 70
: q; ?( H( O8 l if lan=1 then
P0 L8 r- \4 M8 ]; |# l& E( v promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' k ~' E9 q6 k0 J. f- K" q
to_str("in der Andockstation: \"",?.~.name,"\""));1 }6 T: y& F8 X% z9 d
else& ^& I6 o) W9 U4 z. w
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),8 C% b0 q/ J' R/ q/ g+ p; [
to_str("in docking station: \"",?.~.name,"\""));
' Q0 _$ W% D( K v) ?9 a$ N3 Y end;% G Q- F0 h9 h5 A) D! L
else
& A$ P |7 f5 a! U2 W1 k0 t @.Destination := assignLObj[1,row];
- q7 X, o0 Y5 J1 _% K* z7 k end;
/ M7 `; R9 k# [" z1 H! J newDirection(@);
2 G- @8 A, b7 l* r% |6 F, S, c @.HasOrder := true;
% ]) t2 j! {( r* @& l. c' r end;" {* f4 N, _& H
end;
6 C* E% ^# U& E- {end; -- of the method
$ k. N/ j. \6 F2 i# A& T5 g |