/* called by: entrance ctrl of the object 'track'( ?, e; }4 i; _% q5 o7 j
*/
1 U X, b9 B& c4 p) I- `: O' l jis1 F) b# P8 y+ b0 ~( g2 ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;5 `# W% }0 b# K# o" T
do* _1 C/ {( o! }% S
Lan := rootfolder.Internal.Tools.AOLlanguage;
8 E1 h. M$ E" v% [8 Q2 l if current = @.Destination -- else return% T( r1 K* B. O# r' c4 p% o
then* E1 U' n. M( Q& A3 G9 G
@.Destination := void;6 l& e) f2 N# l7 }$ G$ O3 ?
if @.occupied then+ k' J. N& Q3 N- V1 W3 u2 {/ e4 ~
part := @.cont;5 v0 m/ G T# {7 L. h
@.transpOrder := void;
/ o& j8 S* F3 ]; R2 i. q part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,2 |6 N5 Y& ~3 w' J- |, U+ ]
@,root.eventcontroller.simTime);& k( ^4 X2 |; e6 @( \% Y
@.HasOrder := false;
: p @/ E) O! t3 w6 ~/ b @.DrivingHome := true;& _, l. K) O) e5 n; L9 d q
rgManager.tryToStartTransOrder;
" |+ e: i) H2 v: U2 G r if @.Destination = void
3 @$ x7 K, M& ?/ J4 y+ y8 b then -- no transport order for vehicle @: }! L+ K! B# `: r7 q( D& z# f" V5 y
@.Destination :=
8 e/ J n4 _$ f+ b8 z. c- P rgManager.nearestFreeStation(@,track.~);
l( U6 X7 w6 ?# A newDirection(@);
$ C8 u/ T0 V/ z' t if @.Destination /= void then9 [1 G3 X2 y$ B- _5 n
@.Destination.NumReservation :=; m9 l# }8 N$ n5 |- L5 | P$ @
@.Destination.NumReservation + 1;* h6 o( R7 D4 R! j/ T9 s1 U
end;
) ?0 z) s- \: e N4 H1 q8 s @.CurrIcon := "drivingHome";: E+ a0 H- n1 _& @, K0 [
@.DrivingHome := true;
' J6 S5 g; ?5 j/ _ end;
$ G0 G+ i) L5 n1 X: j' H* t else -- the vehicle @ is empty, both vehicle and part are in the same dock station. D4 `8 z7 g4 i
part := @.transpOrder;2 C7 r7 O9 b3 k k$ A2 @. P
part.move(@);-- load part B# j# |8 V$ V: B
@.CurrIcon := "load";+ x. G) U' i; r6 k
GlobalDistObj := part.globDestination;0 M- k+ H/ e/ S% J w. q6 W
assignLObj := rgmanager.rgAssignL;
2 ?/ v, ~/ o; i" P, t9 S* x6 j row := assignLObj.getRowNo(GlobalDistObj);
! \, S& Q' g5 d% ~0 C9 [. b! J if Row = -1 then -- since 70 f. m& a; y5 s3 p% A
if lan=1 then
# j; z G$ d/ ~, |0 \) w+ x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),$ W0 v. y. N8 E. `
to_str("in der Andockstation: \"",?.~.name,"\""));
]( p+ a# V w else* A( u! E* B$ B, x$ f+ S# W
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),; r: z3 ^1 e/ U" E) e. l3 p$ V* t( @
to_str("in docking station: \"",?.~.name,"\"")); 5 t* g1 B# P5 I0 ` z K& \
end;" I4 X& x" L( I+ B$ C3 Z7 M! c
else
' A, v0 w1 t% \$ L* U7 Q @.Destination := assignLObj[1,row];* f3 [0 m, g) a ?5 {
end; $ }6 `8 R, T, m% J$ V4 N
newDirection(@);
, M- z5 \6 o( [! t1 m7 E! ~2 u, A @.HasOrder := true;
" ~, a: f% e) k6 y1 s6 T end;
: K9 E% A- I0 Y1 d' { a) A3 T0 m% m end;
2 ~* j( b! R* J7 I; x+ q4 y* X8 ~end; -- of the method4 t* K: d! V, @# {
|