/* called by: entrance ctrl of the object 'track'* t( W! I" k! ~6 \$ n- t$ c2 _
*/
\" U4 u7 V. H* t- ^3 ^is! R( P& k& k( D8 f
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
( r6 I* }( _8 Cdo1 G1 |; i& R& c, I G
Lan := rootfolder.Internal.Tools.AOLlanguage;" k3 R* Q. B2 x
if current = @.Destination -- else return
: S$ G( _& {- C% w7 M! A# }4 F3 Y then
8 J: c0 S/ H" X! v0 Y! R @.Destination := void;6 g5 B, D, o. K' }" \
if @.occupied then
" h _% w8 x7 F3 w4 y9 c part := @.cont;
! ] \+ _& j' D0 v" M7 e @.transpOrder := void;# u$ c5 G; }9 G# x s6 y
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
9 ~4 Z& F% s% l @,root.eventcontroller.simTime);
& [" M f7 i' T; e0 T' I: c+ }: [ @.HasOrder := false;7 r- N0 E5 @- S% A" \3 e: w
@.DrivingHome := true;7 \3 t, ~1 @" I4 |
rgManager.tryToStartTransOrder;. E4 i4 h7 ^: w9 G1 C
if @.Destination = void4 M$ Z' k6 z1 s6 b6 U: Y9 P
then -- no transport order for vehicle @
7 u4 p% a% Y+ S/ \& Q @.Destination := x! p6 N* }& D+ M7 [
rgManager.nearestFreeStation(@,track.~);
- A( Z3 Q: v3 ~8 G! P, S7 F, Y newDirection(@); 2 g) h5 L; I2 _
if @.Destination /= void then- ~/ x# r6 a _
@.Destination.NumReservation :=
2 s( g3 |# D* g# R. K! G4 u* k @.Destination.NumReservation + 1;
$ s0 ^: ~/ w; U end;! m- O) c- c! } _9 p* v
@.CurrIcon := "drivingHome";
, N4 L/ s" N$ f$ ^0 l: J0 `- Z @.DrivingHome := true;
" W# {7 B% e' A+ q end;
( w, T, l' g0 r else -- the vehicle @ is empty, both vehicle and part are in the same dock station' [* h% c+ h8 ^/ E+ d0 H$ w
part := @.transpOrder;
+ ] h4 I- | F2 K: |' m part.move(@);-- load part
3 B0 i( k% }" a+ ^ @.CurrIcon := "load";( G/ Q! B1 F5 L: f/ Q
GlobalDistObj := part.globDestination;
" y8 D. i1 X, ~# M! {6 G+ j8 z assignLObj := rgmanager.rgAssignL; K N* B4 f9 y2 g: a) s9 P( T7 B
row := assignLObj.getRowNo(GlobalDistObj);9 ?5 T; B' _0 q- n8 T0 V" n `
if Row = -1 then -- since 708 U8 z" e0 W$ S3 u# [9 h+ D$ i
if lan=1 then `+ U- ]% s* w8 R% h' N; Y( e/ [
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),4 i) l) Z4 a( K& p
to_str("in der Andockstation: \"",?.~.name,"\""));
# @8 z" q/ u9 D& P5 q; q9 b else5 V% d. |( |0 v B
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," |4 c1 L. K0 r
to_str("in docking station: \"",?.~.name,"\"")); + c3 A( {# x% p$ v: N& [# @
end;$ w' m$ l/ ?( W, N2 e
else
" @. d& z2 Y: t0 Z @.Destination := assignLObj[1,row];
- q1 p6 d0 G( }3 e+ N2 r) s. g0 Q5 r end;
, p' Y6 L5 x# [+ i5 }9 ]# W5 u" G newDirection(@);: J0 x s9 r! L: k$ H% P
@.HasOrder := true;
0 |- D, A/ V; Y6 h- X" p end;
' Y6 M6 t; q$ Q8 C5 `& ] end;
9 F; l0 Q( S" \# u3 L. s# `6 ^, b& Bend; -- of the method8 ~( N6 d, [5 u7 s* i( B) Z
|