/* called by: entrance ctrl of the object 'track': F* `2 Q: y) m: `) J* k7 d* ^) b) O
*/
/ L( ]3 s$ j: g" s2 t" t: m/ jis
( H3 @, ^. c. _4 X( `" T- a; t: ]1 k part, GlobalDistObj, assignLObj:object;row,Lan:integer;. U% d: W* d; s8 E! z
do
: r6 W4 x m6 w- p' ?( O Lan := rootfolder.Internal.Tools.AOLlanguage;# }& v0 K7 X. x+ e% }+ v) m, l
if current = @.Destination -- else return
+ ]9 ~6 P% W& Y v* y then6 Y8 [( M2 O4 A) a5 {9 f4 I( F4 r
@.Destination := void;
9 l! O( ]( Z# h4 j% {) Y if @.occupied then) q0 l- O: q2 q' T! u- \
part := @.cont;
% P7 @. b: w: x6 i* O# p! O @.transpOrder := void;6 J) G3 `0 L( F! W0 D
part.move(partExit);-- unload is already possible rgManager.freeVehL.writeRow(0,rgManager.freeVehL.yDim + 1,7 r5 d, ?0 ]- k6 r& n9 W$ e. {
@,root.eventcontroller.simTime); u& q+ \6 q. x3 P4 m9 h3 L
@.HasOrder := false;: y8 P1 u1 G) j T! m
@.DrivingHome := true;5 I- j5 g& N- {0 C" i
rgManager.tryToStartTransOrder;0 t+ a$ }" W: g! [
if @.Destination = void
9 E* z1 T# a! `: W1 s then -- no transport order for vehicle @ `6 u; ?+ M8 w |5 ?; D* s
@.Destination :=
3 g8 m) `1 S2 l2 ] P B rgManager.nearestFreeStation(@,track.~);
* P, z7 B' p- A newDirection(@);
( w) J& |# c0 d if @.Destination /= void then
5 U* p& `) j) j @.Destination.NumReservation :=
, l; S; U. ?5 m4 F9 B w/ T @.Destination.NumReservation + 1;* ?9 D( s5 y; s9 V; I! ^) N1 o
end;
1 }8 M1 a i! b1 i& x; [9 M1 w: o* a8 [ @.CurrIcon := "drivingHome";
{. E9 X0 q I5 D6 b5 T @.DrivingHome := true;; n a4 i/ g+ p' S3 s
end;: E* y4 { D5 x5 P
else -- the vehicle @ is empty, both vehicle and part are in the same dock station
8 m: q, L2 j$ O L* ? part := @.transpOrder;% o$ D% |/ `+ y k
part.move(@);-- load part
E$ a) X' H# ^# A3 { @.CurrIcon := "load";' K7 w1 |: ^& x' E# ^
GlobalDistObj := part.globDestination;
- a. m( A9 _- [) w assignLObj := rgmanager.rgAssignL;8 o9 w; z* n* I& G m3 J: L- r/ V+ M
row := assignLObj.getRowNo(GlobalDistObj);
- d# T. B @9 S& F+ |( \ if Row = -1 then -- since 70
6 y) P8 @3 n! f2 W if lan=1 then
2 L4 F+ I t: N# S# S promptmessage(to_str("Unbekanntes Ziel: \"",GlobalDistObj,"\""),0 `0 L w2 E8 W% j
to_str("in der Andockstation: \"",?.~.name,"\""));
! y- `. j8 @) ?, A6 x A7 | else8 N% M7 h$ m8 S( }+ G& L; T
promptmessage(to_str("Unknown destination: \"",GlobalDistObj,"\""),
; B- w0 n! M5 K to_str("in docking station: \"",?.~.name,"\""));
/ b6 c, i6 \, P end;( i. R% {# R. C6 [
else$ k* t4 [2 |8 I @$ a
@.Destination := assignLObj[1,row];
' m/ k( q& W$ k2 O9 l( e2 \! |1 _ end; 4 I0 |: f D$ @+ m
newDirection(@);
+ o7 J/ h( V, S @.HasOrder := true;
3 v0 E1 ?1 A' S. _ O { end;1 {' T8 }1 ~; K/ Q7 r1 f, F
end;
) }$ k) z4 ]# q) v/ dend; -- of the method* H/ p4 p9 Y! N% Y- C7 T, ]' j
|