/* called by: entrance ctrl of the object 'track'4 g: \0 w Y1 b0 e
*/
# y: J) b8 _3 Q% W& Sis
1 D. M( j9 g @ part, GlobalDistObj, assignLObj:object;row,Lan:integer;! ] K9 ~5 o, q) t7 u- Q l% ?5 z
do
- l Z# q7 s3 z2 ?3 i; i3 ?; E Lan := rootfolder.Internal.Tools.AOLlanguage;- s) E T8 m5 j- F! A9 s! C5 a* y
if current = @.Destination -- else return2 B/ a" }0 q1 n% s7 X
then
9 W Z. j7 m4 h6 M, y1 X5 ~ d @.Destination := void;0 o; d1 u) W0 q& m+ _2 W* D! ?9 b
if @.occupied then
; z F# I! E4 w5 Y# k) ]9 i8 G part := @.cont;: _( A0 e; d# V
@.transpOrder := void;
' M& R2 }! B- |6 v) T0 m part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," q, [9 l5 B- j, c1 [
@,root.eventcontroller.simTime);9 P+ N6 x' q$ {* G( V1 B* B
@.HasOrder := false;
( U& F; O6 f1 V# Q" Y& _ @.DrivingHome := true;' H" h: H: U3 [" p
rgManager.tryToStartTransOrder;) g n, D7 P" W/ i9 n& h9 _7 `4 D; E' `
if @.Destination = void2 i0 v9 p, \4 r& f' ~7 l' C: b
then -- no transport order for vehicle @' [1 e7 f4 M4 I/ _2 W* g
@.Destination :=2 R8 T+ H9 X0 [5 k( y6 [
rgManager.nearestFreeStation(@,track.~);
& M. _2 f7 t) \) g1 D. l5 g newDirection(@);
/ @/ k, k& D4 @4 n0 d if @.Destination /= void then
2 H1 z0 Q3 a, X @.Destination.NumReservation :=
+ r! p# Q2 f8 x7 P) Z @.Destination.NumReservation + 1;* S5 X; }# n0 t- h. Z9 j
end;2 \5 ]" l7 H. B7 h5 y4 ^
@.CurrIcon := "drivingHome";% P2 S7 X& M Q; J4 `% w
@.DrivingHome := true; N2 q+ V, G' H% f
end;
' ?, @; l. a# K+ E1 u( { else -- the vehicle @ is empty, both vehicle and part are in the same dock station
) u2 {3 ~8 p; N+ b part := @.transpOrder;; c) R% F! W e; L1 ?: S# q
part.move(@);-- load part& M9 D) S: e/ ?7 [0 s9 K$ a5 V+ r
@.CurrIcon := "load";7 g; J9 C2 p' j, Z+ \
GlobalDistObj := part.globDestination;
* e J* [5 C% v8 j) W% J6 q! ]5 f assignLObj := rgmanager.rgAssignL;
, }8 G% v" |* B% }4 g$ m row := assignLObj.getRowNo(GlobalDistObj);/ a9 D3 ~% Y: h- T8 E7 G+ _
if Row = -1 then -- since 70
. t* A2 d& c l9 Q9 u" { if lan=1 then
1 j% q" D% Z) [' i+ R$ O promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),6 H4 S; L; q3 f" `
to_str("in der Andockstation: \"",?.~.name,"\""));
' S/ A& |! f8 N1 `% d else
9 g4 T8 T+ h6 y& V# I7 t0 A3 Y promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),. u# j: j1 L) _9 l! u$ I1 ^$ W
to_str("in docking station: \"",?.~.name,"\""));
/ O" ]- _. ?. |. c end; X$ a0 K8 z( [# P1 U3 ?- I
else
. e1 }% U J& L0 n, n @.Destination := assignLObj[1,row];! |( q7 A$ j8 f5 T/ B# r o- J
end; - s, T$ S$ a8 e. C; X
newDirection(@);
# r- `6 d; G: C- d: C& M6 Z @.HasOrder := true;: u1 V8 I5 h# [; y, t3 [& L
end;
7 Z3 D a6 r/ L3 G8 U$ U4 s, b end;
4 c; U& c% r. C {# Y( U. |1 s( [end; -- of the method- H8 D x2 t! t- r
|