/* called by: entrance ctrl of the object 'track': E9 x1 s& G% e5 y* q2 P
*/, C! h3 v& `) D9 e0 R' `
is
! Y' f" \ ]: @) ]& X2 ?$ C8 R part, GlobalDistObj, assignLObj:object;row,Lan:integer;2 N$ d' {2 \0 m E
do" W2 |# G9 H4 E; o M1 \4 `& i# F
Lan := rootfolder.Internal.Tools.AOLlanguage;
! _% k5 v, x" Y1 J3 b if current = @.Destination -- else return7 I2 F7 [) ^2 o4 j. w, `! _
then
' o9 N/ U ^+ I1 Y, u7 A3 | @.Destination := void;
# Y" F) p! ?9 P# C5 }* C if @.occupied then4 q8 v8 O, N8 c6 {
part := @.cont;3 }& \ v. ^) Y& _% g
@.transpOrder := void;
# ?' K5 X: k, K3 K; D3 K part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
6 _& O9 I' \5 c$ G5 |+ ] @,root.eventcontroller.simTime);8 _" ~. X/ H, S) U0 K2 B
@.HasOrder := false;
6 F' p& g# _8 V! H B0 l/ N& c @.DrivingHome := true;7 x' k) ^# L" r$ ?
rgManager.tryToStartTransOrder;
- K" o, e$ H0 {% m/ g$ j. z if @.Destination = void
4 r" ?; P% C$ W then -- no transport order for vehicle @
* D" w$ J& ~) ?1 ?) a( f4 h/ H @.Destination :=
1 }/ J' K% j2 k( T rgManager.nearestFreeStation(@,track.~); T' o. ?( V7 O; t' h
newDirection(@); * N& S. E v% }4 H" {, `, p( H
if @.Destination /= void then4 m; r& L9 N9 V! a" N) j
@.Destination.NumReservation :=1 Z8 o+ f/ Q6 V
@.Destination.NumReservation + 1;
0 d5 h- Q2 i' T }6 D6 O% W# I end;
1 p* r; Q. g5 x I: |% ] @.CurrIcon := "drivingHome";4 n3 e+ O9 Q* G- H: x
@.DrivingHome := true;! v5 v2 e( j" _, f- Y8 F8 a
end;
; H# G0 P6 s6 V4 t" [+ f3 I3 L else -- the vehicle @ is empty, both vehicle and part are in the same dock station
: l9 L' z4 Z9 d5 X4 b- w part := @.transpOrder;. S( C% _0 c( ~' r
part.move(@);-- load part4 w8 {) T2 @* M1 g$ d: b
@.CurrIcon := "load";
. L% M. {- a& }3 B GlobalDistObj := part.globDestination;
# G- J$ x( I) m* z assignLObj := rgmanager.rgAssignL;8 s' Y2 R; r$ ~: ] E
row := assignLObj.getRowNo(GlobalDistObj);
9 P2 C# p7 h% e0 u7 B) B7 C4 `' S if Row = -1 then -- since 70
8 R0 k% l' j' Y2 @& B& B" F if lan=1 then
5 v* [% h! i+ j0 }: r5 T. P# \ promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
+ _* e+ t/ j g1 S3 a! `- u to_str("in der Andockstation: \"",?.~.name,"\""));4 S8 h. X" ?1 ?# f0 d0 t
else
' ~; j4 x k$ i; C promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\"")," q; w, i+ k6 n7 i2 J3 g
to_str("in docking station: \"",?.~.name,"\""));
; t( z2 O! H Y3 n end;
" [4 ~: M1 \- P- e5 k+ f; D& k% I else
( E$ q7 r& X5 w. g2 f @.Destination := assignLObj[1,row];& J0 C/ H% n, N2 Y
end;
8 i' ]$ V! C: |* M- K newDirection(@);
1 M+ q5 ]' C+ K" m& ?! g g1 o @.HasOrder := true;) z2 }; P; P l' J
end;% H1 r9 k" F d# Y
end;
1 r! w9 ~. H) g% h! r. A2 rend; -- of the method$ i) q$ W; {2 L+ r
|