/* called by: entrance ctrl of the object 'track'
2 p6 W- A# x4 x9 n {*/
) u' X7 D6 h; E! H; ]* \ N2 mis
: _% K' d0 X& u- H7 t, V) S part, GlobalDistObj, assignLObj:object;row,Lan:integer;+ [) x' H. G1 h, H1 M
do0 s3 F# [. U9 T4 Z+ {
Lan := rootfolder.Internal.Tools.AOLlanguage;
6 w4 {7 [6 i$ Z- f1 x if current = @.Destination -- else return
2 @& t5 E8 F5 |* h- R6 l! @9 U) b then
, H& K$ B& x4 i" s9 T @.Destination := void;
; v* [! G" O; m6 k3 r if @.occupied then
- Z1 d! L0 O$ X" W4 Q part := @.cont;" X5 Y2 a: a& ?1 G0 Z# f7 b& V6 f
@.transpOrder := void;
; w) Y% L% a2 `* P4 Q. c8 q- ^ part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,# u9 w' \ s2 C% K$ p
@,root.eventcontroller.simTime);
, P; T# w$ Q" H0 S6 W @.HasOrder := false;+ r! D, K* F$ a6 ?
@.DrivingHome := true;: B3 m% N! m. d# y0 {: s: d
rgManager.tryToStartTransOrder;
0 H: M/ ]2 f6 X$ f" C9 n* x' t if @.Destination = void
/ P, E. ^! D) n* }# ?. P, | then -- no transport order for vehicle @* v8 ?; c5 Y; {# z* r8 {
@.Destination :=
1 J( R4 ^$ P% s rgManager.nearestFreeStation(@,track.~);6 Z! c, k$ Z8 G. W( Q
newDirection(@); 0 n6 W* B1 N/ g2 x! i; Q
if @.Destination /= void then* b' ~6 i5 G+ O2 l0 X
@.Destination.NumReservation :=- i( A% p! \7 Z! Z; y$ A
@.Destination.NumReservation + 1;; A6 ?8 Z% i" `# r
end;
5 f" |3 U: l' O+ }, q. l# \ @.CurrIcon := "drivingHome";, z, a* M9 F, m. b
@.DrivingHome := true;5 O4 {9 X1 [2 i2 y$ `* P" y
end;8 f! ]' m# [- ?! r# q
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" m' J2 [$ H a& a8 v' u2 a part := @.transpOrder;6 u8 Y+ X/ [ a$ F! S5 h/ Z6 V
part.move(@);-- load part
/ \# k# Y+ h3 T' E6 u @.CurrIcon := "load";" m, l3 T# Y" B( o2 l+ ~! f, e1 P
GlobalDistObj := part.globDestination;! ?% {9 a0 I( M) A8 z: u9 \3 m6 b9 _
assignLObj := rgmanager.rgAssignL;- N3 z( Q" i6 \$ y, j/ ?$ Z
row := assignLObj.getRowNo(GlobalDistObj);
$ J( f1 C) Q, T$ p0 O) N if Row = -1 then -- since 705 Y; K: d) R1 G! P) o7 I Y
if lan=1 then
0 S. u/ U o" J, c+ Y" S$ } promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
8 t0 N" @) \: c4 S% h" u to_str("in der Andockstation: \"",?.~.name,"\""));6 A+ t" B% P% X+ |4 f
else
; l, }4 T" b% ~. w' e( T& E5 I promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- q$ V$ v4 a- Z: _0 a, G4 P! t7 Z to_str("in docking station: \"",?.~.name,"\"")); 5 @& o( g/ A& z7 O
end;
$ \1 e- ~/ c( Q: i. e else- [4 C1 X% @# L8 r& L
@.Destination := assignLObj[1,row];' `1 o# ?) K+ ?
end;
8 N) S, C7 ^7 F N! |3 q) n newDirection(@);
& {% K' g# R+ V @.HasOrder := true;
+ a3 V4 R* E! i0 r! c; d end;6 ?5 D) r; e8 u
end;
8 o/ U6 ^1 F' T. Y; `end; -- of the method
: N0 u' `+ a+ v3 j' } |