/* called by: entrance ctrl of the object 'track': W: y6 l" l; e0 {- s+ c
*/
% e' E; M- i. @# m9 {* S$ l+ l$ J' Z0 Zis
' d* [ U, X7 A3 b! ` part, GlobalDistObj, assignLObj:object;row,Lan:integer;. y/ }' C5 C" U1 X S
do2 A, S) n/ b" A6 P
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 Y8 C n7 Y n" H; f8 _$ P if current = @.Destination -- else return
: B/ j' v' u0 S5 c then0 C& [0 g" l! y& m( y$ O8 u
@.Destination := void;
& t8 t* X& f! a, Q# u9 U* x v if @.occupied then
. c( S: ~; R/ [" \: F* }* D- n6 h part := @.cont;; G0 J- l2 F- E$ f' K9 N2 Q$ K" M0 V6 T
@.transpOrder := void;
4 @' I" \9 c: P; { part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,1 b4 `) S/ c4 \. R
@,root.eventcontroller.simTime);
+ y% n, r# C# y) I- c7 d& S @.HasOrder := false;
* s( c! |) \5 n- { @.DrivingHome := true;1 S/ [$ M6 q# B7 r0 Y. o. H
rgManager.tryToStartTransOrder;
' Z" M) T) j7 y' Z; k/ \ x$ K9 y% b if @.Destination = void3 ] f1 d0 ?8 e) q2 l( W
then -- no transport order for vehicle @
" E9 b( |& p0 T' F: R3 Z @.Destination :=, n: k6 m, \( i) L4 X; e: S: H! L
rgManager.nearestFreeStation(@,track.~);
# _7 G3 q0 v( Q0 X newDirection(@); " ?- Z- r) G0 t7 ~4 j" r
if @.Destination /= void then% P" j: u S. @4 F& n& W8 Q
@.Destination.NumReservation :=# _8 N( o; V# D' g& m4 k# a
@.Destination.NumReservation + 1;- ?& ?+ E( |+ ^9 h2 Y. q% m
end;
* F% X5 V. \7 X8 f2 E @.CurrIcon := "drivingHome";. [2 `0 q! t: p$ ~% R
@.DrivingHome := true;; m- U, n a5 p# q' T* @
end;$ ]; p0 b6 \$ U0 s
else -- the vehicle @ is empty, both vehicle and part are in the same dock station) |7 f t4 G# r1 q
part := @.transpOrder;
2 Z% z- k# a$ u3 j O4 G" { part.move(@);-- load part
. `$ [' U9 K F. Z. e* ` @.CurrIcon := "load"; Y Y" x- C! C# w# x
GlobalDistObj := part.globDestination; |9 j9 S# }" @; I6 D
assignLObj := rgmanager.rgAssignL;
2 u6 H$ z/ g! j4 p; Z+ `3 e8 O row := assignLObj.getRowNo(GlobalDistObj); O0 b8 Q8 r _
if Row = -1 then -- since 705 v( M2 P$ b8 f9 G
if lan=1 then
( {# a8 f0 F3 O4 m5 y promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),- k/ d6 R9 o1 E) k
to_str("in der Andockstation: \"",?.~.name,"\""));
! o- N" P& k& ]9 L5 n else$ e5 y, v* P( L- x* w) X
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
4 }7 ^4 `+ [ r( R/ @, E" G' v+ ~- Q; c to_str("in docking station: \"",?.~.name,"\""));
+ O. ^. M9 K/ s/ Y( C- G: R end;' B8 g2 C9 _* Z& W
else9 B8 x6 L! u1 N1 w I$ j8 B# Y' S# Q
@.Destination := assignLObj[1,row];2 E8 \, A! r" a2 l/ ^
end;
8 H* g$ w. w @3 \2 Y newDirection(@);
2 t8 p- g' j. f @.HasOrder := true;# p( p z) R; _* ]: L7 K7 E
end;
% c; K2 Y& j# y @) R! d* D end;# I! S( U$ C8 q8 r
end; -- of the method+ K- T; ^; d g3 }6 x- i
|