/* called by: entrance ctrl of the object 'track'
- _; N D& S3 o*/! ~* x7 w, X0 o% f4 d* c
is) \3 W6 C: R1 n$ S* v, h0 V# T, ^
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
) o! F/ z, w- g3 ddo
6 g) e3 E2 P. n( G9 i Lan := rootfolder.Internal.Tools.AOLlanguage;% F, j' M' s4 |- S
if current = @.Destination -- else return$ n# |, a; t. T$ H5 Q
then
( ^$ x7 n% F; W @.Destination := void;. c1 y1 x& I" @7 ^) o M0 q, ]
if @.occupied then4 U9 S9 z3 P+ e
part := @.cont;
* L' F" j0 L2 `' M @.transpOrder := void;
4 X; [/ t4 W6 a$ t3 j+ i2 s0 i part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1," s, y$ V+ Z4 m+ C
@,root.eventcontroller.simTime);5 i- Z4 O3 w- k7 ^' h# N- S
@.HasOrder := false;
1 I' Z# G: ]! }8 H7 v @.DrivingHome := true;+ P% u! ~/ f/ a
rgManager.tryToStartTransOrder;" F2 y M6 M6 }8 Y6 y4 u+ g
if @.Destination = void6 J( w0 F7 h- J9 ?2 w! t
then -- no transport order for vehicle @
( a2 Y* N0 v) P! T @.Destination :=* Y# n6 B9 K% }' G. ^: h1 ?; F
rgManager.nearestFreeStation(@,track.~);. S# R, n* J9 G
newDirection(@); . D* D' E; _. ?2 m- t0 b6 ~
if @.Destination /= void then
3 Q- z2 Y; L% M5 w( {# X. B( ~. H @.Destination.NumReservation :=
, t7 I- S1 B6 v) O @.Destination.NumReservation + 1;
: C9 j: J3 u/ @' e$ o end;
! H0 u7 ]9 h$ u( _ @.CurrIcon := "drivingHome";" c }: m& _1 Y4 V/ M
@.DrivingHome := true;
1 f# W5 E: Q8 a end;' W( }1 I2 x# y
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
" h( s" `2 t$ } part := @.transpOrder;- ~6 g# j4 j4 |. e
part.move(@);-- load part
1 @- K1 |. R- Z* u @.CurrIcon := "load";
; A9 [$ U" V4 Y% B: h GlobalDistObj := part.globDestination;
& E& _; b8 K8 l* P+ D assignLObj := rgmanager.rgAssignL;
5 v$ W+ v' n+ L; _$ { row := assignLObj.getRowNo(GlobalDistObj);
/ M6 z* ~2 P9 ]# r. E4 R if Row = -1 then -- since 70
" j6 A; X0 l. ~" p if lan=1 then
/ X/ i0 q( ]' V0 o2 Z) t, q promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
5 E" I9 U* B; \( y: I3 i to_str("in der Andockstation: \"",?.~.name,"\""));- z- a4 V1 E$ M7 f% E# i
else
% v* Z+ v a" E- |& h7 g( h promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
- u. P+ W7 g# Q! y5 ~! M7 C0 n to_str("in docking station: \"",?.~.name,"\"")); S1 P. R' ^+ V. S# w& G
end;
; `' A( ?3 p7 ^5 l& R else) @# M- A; T+ p) N% _
@.Destination := assignLObj[1,row];
6 f& z- ~6 B j) A5 ^4 M end; 0 k: j" n* p* L4 d# @: n4 k) ^. z
newDirection(@);- S0 z4 V7 k j7 u( A
@.HasOrder := true;
3 J4 B& b; i& W: Z2 m' h1 ^ end;9 v4 I: }: r8 {2 y! N
end;
2 `: E. U j- b# O* \- j. Pend; -- of the method1 `: m2 u5 V- R( n1 N0 N* X
|