/* called by: entrance ctrl of the object 'track'. {7 X9 |, r/ e& T, r* S
*/
) Y. H L' r# ?- h7 z- D2 qis4 u6 [) {9 c' F9 u2 a/ S
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
1 G( n: {+ Y' |2 r8 h- odo" A {8 x! J, t2 b
Lan := rootfolder.Internal.Tools.AOLlanguage;" _9 n% ~# \8 Z) f- T5 @( A
if current = @.Destination -- else return
- I5 p- F. G P* w0 Z4 J* j then( n1 ]4 a' D1 ?5 a( r% J
@.Destination := void;
6 R# ^( p4 |6 y. W if @.occupied then
! O4 l, l1 L$ U4 ?7 z part := @.cont;
4 S/ A6 Y d: T$ c1 ]2 J @.transpOrder := void;4 p3 i. x# g! a0 w/ m4 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,4 V; S7 N. d: N4 n! ]% J8 h0 I
@,root.eventcontroller.simTime);3 U; l0 `- p0 ^: w
@.HasOrder := false;
9 I0 K d. \+ g! d1 ^ @.DrivingHome := true;5 |6 S8 y3 E) V) o. ]4 d
rgManager.tryToStartTransOrder;
0 a( z4 U f8 E if @.Destination = void
- M0 v+ X; Y" K& M) _4 B( G( G then -- no transport order for vehicle @0 e# m" r- a$ ^: |7 p+ T) E- i
@.Destination :=
& a, I( K& s9 a( y) I rgManager.nearestFreeStation(@,track.~);
$ M- y+ O/ F& G0 T newDirection(@);
% l, y. a) e% B3 X/ \ if @.Destination /= void then$ y' f9 q* G& b0 E" h9 W# u
@.Destination.NumReservation :=$ L2 n# p0 K' T3 e4 |3 r" h
@.Destination.NumReservation + 1;" f* w: C, N/ N1 ?9 j& j" u5 o
end;
* i8 Z4 U6 p( l1 ^, i# U" W9 p @.CurrIcon := "drivingHome";, Y' }7 a# u5 Z6 Z" ^* v' a
@.DrivingHome := true;
) m( I$ J5 Q: Z; r3 w R' F end;1 d1 r1 c- C" N( h' e
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
# o' J/ [# A1 T: J5 c* t% m part := @.transpOrder;
& Q3 y x; f% F: `# u part.move(@);-- load part9 ~5 `7 C8 c# H5 j
@.CurrIcon := "load";
( O% Q3 R. b* D: K GlobalDistObj := part.globDestination;: k+ o! A5 H) ?- l
assignLObj := rgmanager.rgAssignL;
/ }* M1 I* I d; n! i+ Y# n row := assignLObj.getRowNo(GlobalDistObj);
; A; B# d& R$ c! p; O% ?* r if Row = -1 then -- since 701 y& t1 v" |7 \9 h9 S
if lan=1 then
4 C, Y+ u% E/ C promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),1 i% ^" ?8 a& a5 o( Y2 S5 N
to_str("in der Andockstation: \"",?.~.name,"\""));
# q3 \9 G9 X! U$ j6 V* ?7 ^9 u else
0 J' G) \3 W" O! U* m f* h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
( d! u: R7 J; p. f9 _/ p9 I& r! z: p to_str("in docking station: \"",?.~.name,"\""));
/ x4 B' y# w" G- r B6 V end;
+ g( @3 L5 V; z3 E- M! X7 j else
: ~+ D! O, x; q0 R @.Destination := assignLObj[1,row];4 ]$ \: f- o# P' O% X
end; 6 b" \( V5 v+ P) s! o$ k
newDirection(@);: A5 P" w. s( |1 |& ^9 p* \
@.HasOrder := true;5 a) L; Q! S; y+ G/ D+ d* C
end;
. \/ J- P) {& K' S3 P6 R4 B end;9 T' l5 s K9 {" Y/ Z# Q) B
end; -- of the method
% |/ {) R& Y5 u |