/* called by: entrance ctrl of the object 'track'
$ c% k3 v5 D# _3 H8 n- u8 ?. B U5 v*/* W3 Q5 R6 b! I ?% ~5 ^6 @
is
) p& R7 i& P3 |+ u. M$ C2 g- `$ S% O part, GlobalDistObj, assignLObj:object;row,Lan:integer;& u6 |" O+ C3 \% t7 K- I* w
do
) Q! E$ n2 j( j7 K Lan := rootfolder.Internal.Tools.AOLlanguage;
( t9 y0 i2 g/ D% S, m if current = @.Destination -- else return: x7 O ~1 `6 [& Y
then
( }8 ?* G) L. Z1 L @.Destination := void;7 b |4 L6 e) F7 `
if @.occupied then
9 ~6 l! z: x. |' D U5 }" @ part := @.cont;3 k, d7 d5 Y' N6 W
@.transpOrder := void;
( N0 a; b2 ^7 A part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,3 u6 Q9 q+ a: I& t( `
@,root.eventcontroller.simTime);/ r9 x( w" p% V
@.HasOrder := false;" j& N" o. ~4 b. S a" p- y
@.DrivingHome := true;
/ G3 w0 A: T' |1 ~9 a' B rgManager.tryToStartTransOrder;
7 ]3 N5 Z& V, Z5 N, [/ `% c if @.Destination = void
* U* \' S3 D& S then -- no transport order for vehicle @
) N+ f$ g4 B+ K; q0 p @.Destination :=
" E, x! b( }! J' D4 |6 }, {; y rgManager.nearestFreeStation(@,track.~);1 Q- J: Y0 a8 o- d, P
newDirection(@);
& N) |0 w: X) N2 ^" ^8 K if @.Destination /= void then
: E5 F1 M+ ~8 e! J @.Destination.NumReservation :=
1 a E G! p2 Q7 F( P( O @.Destination.NumReservation + 1;
8 O8 {) j+ c) O9 i6 Y5 d3 |: o- o end;4 t9 u6 x6 J$ {8 V6 s
@.CurrIcon := "drivingHome";6 U0 v0 |$ v) k+ y" J
@.DrivingHome := true;
1 n: d3 x: f$ q0 }5 w+ H! H- K end;
: N/ @- H# @* O; \. B3 k else -- the vehicle @ is empty, both vehicle and part are in the same dock station
. f+ W' U5 U9 Q* t5 ` part := @.transpOrder;3 E$ ^) f/ z& a% B8 C2 U1 Q
part.move(@);-- load part. {/ Y3 q% b4 R& W. {
@.CurrIcon := "load";: F$ S6 A7 C, }# A& m' u
GlobalDistObj := part.globDestination;
+ o6 t" G& p2 ^2 a; r5 M9 L' x" } assignLObj := rgmanager.rgAssignL; n9 N2 e2 F; V, g& D P
row := assignLObj.getRowNo(GlobalDistObj);. r4 O& Q$ [% y
if Row = -1 then -- since 70
3 Q* n5 n& M- y+ D Q if lan=1 then
9 q( r3 A% j. H5 {2 X0 a- n2 [7 Z) x promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),' q/ \& M* ~& U0 J3 N# ~0 s1 i
to_str("in der Andockstation: \"",?.~.name,"\""));
* M; E, F* `# [6 N else
6 a8 p2 A# `1 i$ p3 t+ U A: B/ L promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),- x$ P+ A; b" E) M! m/ r
to_str("in docking station: \"",?.~.name,"\""));
+ ?; @3 B/ ]& H* F end;* x- E( N1 V0 P3 Z8 K( @
else8 i7 p! @$ E7 @9 y* z* B
@.Destination := assignLObj[1,row];. ? M' ?+ x$ P' a: J5 q' ~9 \
end;
! H0 f4 t! n$ n: @; T2 a newDirection(@);+ D0 ]1 }3 d. ~0 h" o
@.HasOrder := true;5 p0 n5 u! J" J' }/ ?2 B: t
end;
8 M; d" D1 Q6 ?5 b, c end;
7 W+ i3 {9 |' [' d3 fend; -- of the method
* t) g( u2 u% \9 ? |