/* called by: entrance ctrl of the object 'track'
9 m5 z+ ?5 d# s8 R( T/ {+ r( U*/
& B# `+ z# g4 K5 |* d7 w" }/ Sis% B3 Y% J: {/ e# ]) q- w
part, GlobalDistObj, assignLObj:object;row,Lan:integer;
% Z, S- K' u+ f. D1 e: j0 l' ]3 X* Cdo
) N, q( y. _0 u8 X6 l6 b6 z Lan := rootfolder.Internal.Tools.AOLlanguage;: p0 A9 j" v3 D
if current = @.Destination -- else return* n, u0 G! e5 l. j5 A
then# U5 c0 }# K- u6 r* ]6 ~
@.Destination := void;& G o& {) c* t# _2 V9 S
if @.occupied then6 ~7 H8 s) p. ~) A# X S3 I
part := @.cont;, S, y+ }" k- P; j( K" D; a: Q
@.transpOrder := void;: u: N* _2 u. b( ]
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,
# y5 u$ _8 z5 t, e: k" M* ` @,root.eventcontroller.simTime);
^/ w1 o( I, e2 I0 H _ @.HasOrder := false;# U6 c3 e, W7 a4 p
@.DrivingHome := true;' u8 B) E+ |8 i. S6 N' F
rgManager.tryToStartTransOrder;1 v2 n+ Q: [% \9 K B
if @.Destination = void. s/ x# \4 U$ {
then -- no transport order for vehicle @% C5 q% a% F5 ]- r" S! T( j
@.Destination :=7 U$ g+ w% e/ U: N( y9 E
rgManager.nearestFreeStation(@,track.~);8 Z; b6 ]; \3 |$ [$ M
newDirection(@);
3 g: I' `9 w7 @# b' K if @.Destination /= void then+ V4 Y; K: ^1 a$ O
@.Destination.NumReservation :=
9 m" Z/ ^& T0 C8 t" N! U8 ^# H W5 k @.Destination.NumReservation + 1;
2 o3 i% ]5 _; `2 w9 h end;) D/ n9 o5 d3 }
@.CurrIcon := "drivingHome";
" b; P/ m# U4 _2 Z, k( b0 ^( U @.DrivingHome := true;
: Y3 D( }/ j( k' w* c+ u end; b) n6 {4 @+ o9 j- k* n
else -- the vehicle @ is empty, both vehicle and part are in the same dock station9 N. U6 P! ~) K5 H
part := @.transpOrder;
* H! u5 C2 |$ k0 U9 g: N) Q$ h5 o part.move(@);-- load part2 l* Z. {4 n8 c: |7 G9 n
@.CurrIcon := "load";) X, N" Y$ s; X* G
GlobalDistObj := part.globDestination;9 h* W; z( s7 C" i+ j; J
assignLObj := rgmanager.rgAssignL;! j, h0 z7 |: L0 a
row := assignLObj.getRowNo(GlobalDistObj);
, b6 y: k T( a4 F! a if Row = -1 then -- since 70' C3 S4 [! e3 Y) {0 Q( ~5 d
if lan=1 then: F9 N4 _2 j$ t+ c4 B
promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),
1 ^' R9 n3 c9 t0 E to_str("in der Andockstation: \"",?.~.name,"\"")); T5 V" \+ `& f/ t0 p. {- ?
else) K: d- {7 W i+ i( A9 W" s5 E
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),/ Q! n6 M% {7 E& o8 B! j: B
to_str("in docking station: \"",?.~.name,"\""));
& O( E' o! O% a end;; }7 M; |9 ~3 d0 \! v* T
else
% x& _$ g; C+ s @.Destination := assignLObj[1,row];3 [# z3 V! J9 \) W/ {2 w
end; 0 R2 Q* z9 P2 Z; g: H
newDirection(@);
+ }. o) @& m0 k @.HasOrder := true;4 R* V. f+ `/ p5 e; F: f, b w2 a
end;2 m) J- N; W8 ]6 i" E
end;
6 J* }( f! u2 aend; -- of the method
i, Q9 S3 K t) F |